Re: Serious Winbind packaging bug in 2.2.7 binaries
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 3 Dec 2002, Matthew Mastracci wrote: I just spent a few hours diagnosing a problem with 2.2.7 on Redhat 7.3 that turned out to be (what I believe) is a packaging bug. The symbolic link from libnss_winbind.so to libnss_winbind.so.2 is missing. This made nsswitch unable to enumerate windows users, and as such, disabled use of my samba server for everyone logging in. I should have picked up on this when getent passwd failed to show the domain users, but I ended up looking at everything else instead. I think it is probably just a problem with the RPM script. Here is the RPM dumped output: Thanks. Good catch. I've fixed this in CVS now. cheers, jerry -- Hewlett-Packard- http://www.hp.com SAMBA Team -- http://www.samba.org GnuPG Key http://www.plainjoe.org/gpg_public.asc ISBN 0-672-32269-2 SAMS Teach Yourself Samba in 24 Hours 2ed You can never go home again, Oatman, but I guess you can shop there. --John Cusack - Grosse Point Blank (1997) -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.0 (GNU/Linux) Comment: For info see http://quantumlab.net/pine_privacy_guard/ iD8DBQE97gJ7IR7qMdg1EfYRAroVAKCbbKxuKgreAbIF9KQmbuoltgAyrwCgsVKs d1UfIUIEN6v82EtR8k9rnPM= =/Upw -END PGP SIGNATURE-
STAT_ST_BLOCKSIZE on HP-UX
Hi, noticed that very recently a bunch of patches was checked in the SAMBA_2_2 CVS tree, correcting STAT_ST_BLOCKSIZE to be 512 for a number of platforms. (see configure and configure.in) It remained on 8192 for HP-UX (which is the number given by st_blksize) and which seems to be just as wrong there. The correct unit of st_blocks is 1024, instead. Cheers! Michael
NetBSD STAT_ST_BLOCKSIZE prob
With cvs code from Dec 4 16:55 GMT on i386-unknown-netbsdelf1.6K, Compiling smbd/trans2.c smbd/trans2.c: In function `get_allocation_size': smbd/trans2.c:42: request for member `st_size' in something not a structure or union smbd/trans2.c 39-43: #if defined(HAVE_STAT_ST_BLOCKS) defined(STAT_ST_BLOCKSIZE) ret = (SMB_BIG_UINT)STAT_ST_BLOCKSIZE * (SMB_BIG_UINT)sbuf-st_blocks; #else ret = (SMB_BIG_UINT)get_file_size(*sbuf); #endif include/config.h: #define HAVE_STAT_ST_BLOCKS 1 /* #undef STAT_ST_BLOCKSIZE */ #define HAVE_STAT_ST_BLKSIZE 1 (Why isn't STAT_ST_BLOCKSIZE defined in configure.in for netbsd?) smbd/trans2.c 32: #define get_file_size(sbuf) (sbuf.st_size) (lib/util.c: SMB_OFF_T get_file_size(char *file_name)?) Ah: the patch which fixes this is: (tut tut coding style! ;) ) Cheers, Patrick Index: smbd/trans2.c === RCS file: /cvsroot/samba/source/smbd/trans2.c,v retrieving revision 1.238 diff -u -r1.238 trans2.c --- smbd/trans2.c 4 Dec 2002 03:21:18 - 1.238 +++ smbd/trans2.c 4 Dec 2002 17:38:53 - @@ -29,7 +29,7 @@ extern int global_oplock_break; extern uint32 global_client_caps; -#define get_file_size(sbuf) (sbuf.st_size) +#define get_file_size(sbuf) ((sbuf).st_size) /* given a stat buffer return the allocated size on disk, taking into account sparse files */
More Re: LDAP machine lookup
I'm using a Debian woody based system (partially upgraded to 'testing' in order to use tls with ldap), with samba_2.2.7 source built by debian/rules with LDAP turned on, using gcc 3.0.4, libldap2-tls_2.0.23-14, and libldap2_2.0.23-14. I'm setting up PDC service -- when I try to join a windows machine (this is XP) to the domain, I get 'specified user does not exist' on the windows system and the following lines appear in log.smbd (with -d 5): [2002/12/04 11:01:01, 2, pid=22667] passdb/pdb_ldap.c:get_single_attribute(360) get_single_attribute: [rid] = [3357] Here the rid of the machine account (3357) is retrieved from the ldap server. Then later, this: [2002/12/04 11:01:01, 5, pid=22667] rpc_server/srv_samr_nt.c:_samr_lookup_names(1191) _samr_lookup_names: looking name on SID S-1-5-21-1231883349-2047018666-1483395064 . . . [2002/12/04 11:01:01, 5, pid=22667] rpc_parse/parse_prs.c:prs_uint32(588) 000c rid[00] : 1e22 (== 7714) . . . [2002/12/04 11:01:01, 5, pid=22667] rpc_parse/parse_prs.c:prs_uint32(588) 0018 user_rid : 1e22 . . . [2002/12/04 11:01:01, 2, pid=22667] passdb/pdb_ldap.c:ldap_search_one_user(262) ldap_search_one_user: searching for:[rid=7714] [2002/12/04 11:01:01, 0, pid=22667] passdb/pdb_ldap.c:pdb_getsampwrid(907) We don't find this rid [7714] count=0 And the join fails. Where is it getting the SID that seems to be related to the incorrect rid? How can I get it working? Thanks. Don Hayward [EMAIL PROTECTED] Mote Marine Laboratory Office: 941.388.4441 Cell: 941.302.4982 1600 Ken Thompson Parkway Fax: 941.388.4312 Sarasota, FL 34236 See: http://www.mote.org Independent, non-profit, marine and estuarine research and education facility. For PGP public key do: http://www.mote.org/~don/donpgp.asc use DISCLAIMER; # We run Debian Linux Taxes feed the starving and clothe the naked. Don Hayward [EMAIL PROTECTED] Mote Marine Laboratory Office: 941.388.4441 Cell: 941.302.4982 1600 Ken Thompson Parkway Fax: 941.388.4312 Sarasota, FL 34236 See: http://www.mote.org Independent, non-profit, marine and estuarine research and education facility. For PGP public key do: http://www.mote.org/~don/donpgp.asc use DISCLAIMER; # We run Debian Linux Taxes feed the starving and clothe the naked.
Re: STAT_ST_BLOCKSIZE on HP-UX
On Wed, Dec 04, 2002 at 04:48:32PM +0100, Michael Steffens wrote: Hi, noticed that very recently a bunch of patches was checked in the SAMBA_2_2 CVS tree, correcting STAT_ST_BLOCKSIZE to be 512 for a number of platforms. (see configure and configure.in) It remained on 8192 for HP-UX (which is the number given by st_blksize) and which seems to be just as wrong there. The correct unit of st_blocks is 1024, instead. I got this value from the HPUX team (who site near me in Cupertino) but I'll check again Jeremy.
Re: Multiple IPs for PDC?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, 25 Nov 2002, Ken Cross wrote: G'Day: In the get_pdc_ip routine in libsmb/namequery.c in -current, there's an assertion: SMB_ASSERT(count == 1); which bombs out if the PDC has multiple IP addresses. I have a PDC with 3 network interfaces, so it isn't too happy. Yup. YOu're right. I'm working on it now. Thanks for letting us know. cheers, jerry -- Hewlett-Packard- http://www.hp.com SAMBA Team -- http://www.samba.org GnuPG Key http://www.plainjoe.org/gpg_public.asc ISBN 0-672-32269-2 SAMS Teach Yourself Samba in 24 Hours 2ed You can never go home again, Oatman, but I guess you can shop there. --John Cusack - Grosse Point Blank (1997) -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.0 (GNU/Linux) Comment: For info see http://quantumlab.net/pine_privacy_guard/ iD8DBQE97ko3IR7qMdg1EfYRAhZnAJ0Y3FwseLwE1/EItOKly9zZfJlkXgCfQapJ 3b/GR8KbaJrp/FWncpmoBDY= =HoIv -END PGP SIGNATURE-
Re: NetBSD STAT_ST_BLOCKSIZE prob
On Wed, Dec 04, 2002 at 05:48:43PM +, Patrick Welche wrote: With cvs code from Dec 4 16:55 GMT on i386-unknown-netbsdelf1.6K, Compiling smbd/trans2.c smbd/trans2.c: In function `get_allocation_size': smbd/trans2.c:42: request for member `st_size' in something not a structure or union Good catch - thanks. Applied to all active branches. (Why isn't STAT_ST_BLOCKSIZE defined in configure.in for netbsd?) There is no specific configure section for netbsd. Care to write one ? Jeremy
smbclient core dump
With aforementioned Dec 4 17:52 GMT CVS code, I get a core dump from smbclient -L //machine Core was generated by `smbclient'. Program terminated with signal 11, Segmentation fault. #0 0x807ccff in push_string (base_ptr=0x0, dest=0x8130028, src=0x80a70a0 PC NETWORK PROGRAM 1.0, dest_len=4294967295, flags=1) at lib/charcnv.c:721 721 if (!(flags STR_ASCII) \ (gdb) bt #0 0x807ccff in push_string (base_ptr=0x0, dest=0x8130028, src=0x80a70a0 PC NETWORK PROGRAM 1.0, dest_len=4294967295, flags=1) at lib/charcnv.c:721 #1 0x806d367 in clistr_push (cli=0x812d000, dest=0x8130028, src=0x80a70a0 PC NETWORK PROGRAM 1.0, dest_len=-1, flags=1) at /usr/src/local/samba/source/libsmb/clistr.c:25 #2 0x805eb11 in cli_negprot (cli=0x812d000) at libsmb/cliconnect.c:899 #3 0x804f1bc in do_connect (server=0xbfbfb670 machine, share=0x80a2309 IPC$) at client/client.c:2399 #4 0x804f926 in do_host_query (query_host=0xbfbfb670 machine) at client/client.c:2589 #5 0x805074e in main (argc=3, argv=0xbfbfbbe0) at client/client.c:3023 #6 0x804a8c4 in ___start () I think the clue is dest_len: it is set to -1 in libsmb/cliconnect.c:899, libsmb/clistr.c:25 clistr_push(... int dest_len ...) lib/charcnv.c:719 push_string(... size_t dest_len ...) and for me size_t is unsigned int. push_ascii then does the right thing if it receives a -1, but of course it doesn't as dest_len has just becomed unsigned, on the otherhand, you do compare to (size_t)-1... so it should be alright.. Thoughts? Cheers, Patrick
Samba Helios Ethershare Integration
Hi everybody , my name is Marte, Actually, I'm testing Helios EtherShare(afp-smb-opi Software) to my company, however we have trouble with the resource fork when copying a mac file from a pc via samba. Is there a way to support resource fork in samba. I'm using samba-2.2.6 RedHat 7.3 XFS Regards
Re: NetBSD STAT_ST_BLOCKSIZE prob
On Wed, Dec 04, 2002 at 06:51:25PM +, [EMAIL PROTECTED] wrote: On Wed, Dec 04, 2002 at 05:48:43PM +, Patrick Welche wrote: (Why isn't STAT_ST_BLOCKSIZE defined in configure.in for netbsd?) There is no specific configure section for netbsd. Care to write one ? I just had a look and got worried: what happens if I make some strange filesystem where blocksize isn't 512, stat.st_blksize should contain the correct value, and presumably samba will work. If I make a configure section which defines STAT_ST_BLOCKSIZE 512, presumably samba would then not work in that strange case? Cheers, Patrick
Re: NetBSD STAT_ST_BLOCKSIZE prob
On Wed, Dec 04, 2002 at 07:08:29PM +, Patrick Welche wrote: On Wed, Dec 04, 2002 at 06:51:25PM +, [EMAIL PROTECTED] wrote: On Wed, Dec 04, 2002 at 05:48:43PM +, Patrick Welche wrote: (Why isn't STAT_ST_BLOCKSIZE defined in configure.in for netbsd?) There is no specific configure section for netbsd. Care to write one ? I just had a look and got worried: what happens if I make some strange filesystem where blocksize isn't 512, stat.st_blksize should contain the correct value, and presumably samba will work. If I make a configure section which defines STAT_ST_BLOCKSIZE 512, presumably samba would then not work in that strange case? Ah you see this is the *exact* problem. This is why I ditched the code that uses stat.st_blksize. It was causing 64-bit copies on IRIX to fail. The fundamental misunderstanding (and it was mine also when I wrote this code) is that stat.st_blksize is the units of stat.st_blocks. It is *NOT*. stat.st_blksize is a guide to the best I/O size for the filesystem. It has nothing to do with stat.st_blocks. The unfortunate problem is that neither stat.st_blocks, or stat.st_blksize are defined by POSIX so vendors set them as they wish. Jeremy.
Re: NetBSD STAT_ST_BLOCKSIZE prob
On Wed, Dec 04, 2002 at 07:12:20PM +, [EMAIL PROTECTED] wrote: Ah you see this is the *exact* problem. This is why I ditched the code that uses stat.st_blksize. It was causing 64-bit copies on IRIX to fail. The fundamental misunderstanding (and it was mine also when I wrote this code) is that stat.st_blksize is the units of stat.st_blocks. It is *NOT*. stat.st_blksize is a guide to the best I/O size for the filesystem. It has nothing to do with stat.st_blocks. The unfortunate problem is that neither stat.st_blocks, or stat.st_blksize are defined by POSIX so vendors set them as they wish. So is your STAT_ST_BLOCKSIZE the units of stat.st_blocks? In that case st_blocks The actual number of blocks allocated for the file in 512-byte units. As short symbolic links are stored in the inode, this number may be zero. the ubiquitous 512 should do it for netbsd too... Cheers, Patrick
Re: NetBSD STAT_ST_BLOCKSIZE prob
On Wed, Dec 04, 2002 at 11:17:16AM -0800, Herb Lewis wrote: STAT_ST_BLOCKSIZE should not depend on the filesystem blocksize. Look at the man page for stat(2) and see how st_blocks is defined. That is the number that needs to be used for STAT_ST_BLOCKSIZE Yes - I should have seen your note earlier.. Patrick
3.0 requires an admin account to join samba to a domain?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Anyone? Can someone confirm or deny that there is not net equivalent of smbpasswd -j DOMAIN -R PDC in HEAD? All I see requires an admin username/pw cheers, jerry -- Hewlett-Packard- http://www.hp.com SAMBA Team -- http://www.samba.org GnuPG Key http://www.plainjoe.org/gpg_public.asc ISBN 0-672-32269-2 SAMS Teach Yourself Samba in 24 Hours 2ed You can never go home again, Oatman, but I guess you can shop there. --John Cusack - Grosse Point Blank (1997) -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.0 (GNU/Linux) Comment: For info see http://quantumlab.net/pine_privacy_guard/ iD8DBQE97lyGIR7qMdg1EfYRAt6jAKDttSzfttjQfeMCdOhrX8Y1QbsaEACeIM1M my3xKYHQSFjp6nlQADkdRR0= =CJGo -END PGP SIGNATURE-
Clean up of spool files
I'm using Samba 2.2.5 and CUPS to handle printing on our network. Unfortunately, the smbprn.xx spool files are not being cleaned up and instead are quickly filling the spool directory. Is their a setting or option to ensure the files are cleaned up once sent to the printer? I am aware that using a cron job would work but this can't be the best solution. Thanks.
Re: 3.0 requires an admin account to join samba to a domain?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 4 Dec 2002, Jim McDonough wrote: Can someone confirm or deny that there is not net equivalent of smbpasswd -j DOMAIN -R PDC in HEAD? All I see requires an admin username/pw Just net rpc join should do it. Try net help rpc join I found it. Who came up with the function names? They're horrible! jerry -- Hewlett-Packard- http://www.hp.com SAMBA Team -- http://www.samba.org GnuPG Key http://www.plainjoe.org/gpg_public.asc ISBN 0-672-32269-2 SAMS Teach Yourself Samba in 24 Hours 2ed You can never go home again, Oatman, but I guess you can shop there. --John Cusack - Grosse Point Blank (1997) -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.0 (GNU/Linux) Comment: For info see http://quantumlab.net/pine_privacy_guard/ iD8DBQE97mEKIR7qMdg1EfYRAjXJAKCIpGWvUpI+r1opx11rQpvTk/T+uQCfZ+Fm S9Cb08ZEq6xkuDgxiPElxbs= =w8hO -END PGP SIGNATURE-
Re: 3.0 requires an admin account to join samba to a domain?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 4 Dec 2002, Jim McDonough wrote: Can someone confirm or deny that there is not net equivalent of smbpasswd -j DOMAIN -R PDC in HEAD? All I see requires an admin username/pw Just net rpc join should do it. Try net help rpc join And why are there two functions for changing a machine trust account? jerry -- Hewlett-Packard- http://www.hp.com SAMBA Team -- http://www.samba.org GnuPG Key http://www.plainjoe.org/gpg_public.asc ISBN 0-672-32269-2 SAMS Teach Yourself Samba in 24 Hours 2ed You can never go home again, Oatman, but I guess you can shop there. --John Cusack - Grosse Point Blank (1997) -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.0 (GNU/Linux) Comment: For info see http://quantumlab.net/pine_privacy_guard/ iD8DBQE97mFEIR7qMdg1EfYRAhFuAJ46LHH+ni18cfxge6bv14ZJ6bu6AwCeKZLV ArPJT0UhFBjU+ksEA7d6gqY= =vR43 -END PGP SIGNATURE-
RE: 3.0 requires an admin account to join samba to a domain?
To Jerry's original question: it seems to fail without an admin username/pw. With the old smbpasswd, it would work if a machine account was first set up on the PDC -- now it doesn't. Ken -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Gerald (Jerry) Carter Sent: Wednesday, December 04, 2002 3:10 PM To: Jim McDonough Cc: [EMAIL PROTECTED] Subject: Re: 3.0 requires an admin account to join samba to a domain? -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 4 Dec 2002, Jim McDonough wrote: Can someone confirm or deny that there is not net equivalent of smbpasswd -j DOMAIN -R PDC in HEAD? All I see requires an admin username/pw Just net rpc join should do it. Try net help rpc join I found it. Who came up with the function names? They're horrible! jerry -- Hewlett-Packard- http://www.hp.com SAMBA Team -- http://www.samba.org GnuPG Key http://www.plainjoe.org/gpg_public.asc ISBN 0-672-32269-2 SAMS Teach Yourself Samba in 24 Hours 2ed You can never go home again, Oatman, but I guess you can shop there. --John Cusack - Grosse Point Blank (1997) -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.0 (GNU/Linux) Comment: For info see http://quantumlab.net/pine_privacy_guard/ iD8DBQE97mEKIR7qMdg1EfYRAjXJAKCIpGWvUpI+r1opx11rQpvTk/T+uQCfZ+Fm S9Cb08ZEq6xkuDgxiPElxbs= =w8hO -END PGP SIGNATURE-
RE: 3.0 requires an admin account to join samba to a domain?
To Jerry's original question: it seems to fail without an admin username/pw. With the old smbpasswd, it would work if a machine account was first set up on the PDC -- now it doesn't. Hmmm, I'll have to look into that. At one point it was net rpc join oldstyle or something like that... Jim McDonough IBM Linux Technology Center Samba Team 6 Minuteman Drive Scarborough, ME 04074 USA [EMAIL PROTECTED] [EMAIL PROTECTED] Phone: (207) 885-5565 IBM tie-line: 776-9984
RE: 3.0 requires an admin account to join samba to a domain?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 4 Dec 2002, Ken Cross wrote: To Jerry's original question: it seems to fail without an admin username/pw. With the old smbpasswd, it would work if a machine account was first set up on the PDC -- now it doesn't. I found some code named rpc_join_oldstyle_internals() should do it, but I've not actually verified this. cheers, jerry -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.0 (GNU/Linux) Comment: For info see http://quantumlab.net/pine_privacy_guard/ iD8DBQE97mNPIR7qMdg1EfYRAnNaAJ4sW++GB7Bcsbtdh1hdUUKDLOFdAgCfbQn3 BWEL2H4NFt1mZQOrI7fc6So= =rB9g -END PGP SIGNATURE-
Re: 3.0 requires an admin account to join samba to a domain?
I found it. Who came up with the function names? They're horrible! That's one part of net I won't claim responsibility for... :-) Jim McDonough IBM Linux Technology Center Samba Team 6 Minuteman Drive Scarborough, ME 04074 USA [EMAIL PROTECTED] [EMAIL PROTECTED] Phone: (207) 885-5565 IBM tie-line: 776-9984
Re: 3.0 requires an admin account to join samba to a domain?
And why are there two functions for changing a machine trust account? Dunno. Perhaps Rafal knows? Jim McDonough IBM Linux Technology Center Samba Team 6 Minuteman Drive Scarborough, ME 04074 USA [EMAIL PROTECTED] [EMAIL PROTECTED] Phone: (207) 885-5565 IBM tie-line: 776-9984
RE: 3.0 requires an admin account to join samba to a domain?
I found some code named rpc_join_oldstyle_internals() should do it, but I've not actually verified this. Yeah, it looks like net rpc join oldstyle or net rpc join should both execute this... Jim McDonough IBM Linux Technology Center Samba Team 6 Minuteman Drive Scarborough, ME 04074 USA [EMAIL PROTECTED] [EMAIL PROTECTED] Phone: (207) 885-5565 IBM tie-line: 776-9984
RE: 3.0 requires an admin account to join samba to a domain?
To Jerry's original question: it seems to fail without an admin username/pw. With the old smbpasswd, it would work if a machine account was first set up on the PDC -- now it doesn't. Hmmm, I'll have to look into that. At one point it was net rpc join oldstyle or something like that... It works for me. I just created the account on my DC, then did: net rpc join -S PDC and deleted and re-added the acccount and did: net rpc join oldstyle -S PDC Both work for me. It's not working for you? Jim McDonough IBM Linux Technology Center Samba Team 6 Minuteman Drive Scarborough, ME 04074 USA [EMAIL PROTECTED] [EMAIL PROTECTED] Phone: (207) 885-5565 IBM tie-line: 776-9984
RE: 3.0 requires an admin account to join samba to a domain?
Possible -- just wasn't aware of it. (It's *really* fun trying to figure out how these guys work by tearing into the sources. Ah, well...) That's why we put the help online for net. Please let us know if you find any problems with it... Jim McDonough IBM Linux Technology Center Samba Team 6 Minuteman Drive Scarborough, ME 04074 USA [EMAIL PROTECTED] [EMAIL PROTECTED] Phone: (207) 885-5565 IBM tie-line: 776-9984
Samba 2.2.7 and logon script processing
Hi All, samba 2.2.7 built with: ./configure make make install (That is, no special build options) in our smb.conf the line: logon script = %u.bat: ^ | lowercase -- When trying to login (from Windows 9x,NT, 2K or Linux with winbindd), several (hundred) of these messages appear in the server logs: [the date shows up here] lib/util_str.c: string_sub (1217) ERROR: string overflow by 2 in string_sub(%u, 7) ^ | and this number --- is the user name length + 2 The workstation trying to login eventually times out with an incorrect password message. On the server, smbd and nmbd stop responding to /etc/init.d/samba stop or other commands and need to be stopped with kill -9 if we change the line in smb.conf to logon script = %U.bat: ^ | uppercase -- Then everything works fine. So the question is, is there a patch for 2.2.7 I missed somewhere? TIA Randy Cox Senior Technical Resource randy.cox @ allegroassociates.com
Code improvment in printing area.
Hi. I suggest the following small SAMBA code improvement in printing area. All known SAMBA versions can't return to Windows client any return code after calling "print command". I need it therefore I made the following SAMBA changes: Change prototype of function "print_job_end" (in file "proto.h"): int print_job_end(int jobid, BOOL normal_close); Add new error into file "doserr.h" #define ERRfiledeleted 63 /* Your file waiting to be printed was deleted. */ I try to use this code in case of errors happened before calling "print command" Change function "print_job_end" in file "printing.c": /* return codes -1 means error before call current_printif-job_submit, 0 means that job_submit was called OK, * other positive codes means job_submit was called and brings this error code */ int print_job_end(int jobid, BOOL normal_close) { struct printjob *pjob = print_job_find(jobid); int snum, ret = 0; SMB_STRUCT_STAT sbuf; if (!pjob) return -1; if (pjob-spooled || pjob-pid != local_pid) return -1; snum = print_job_snum(jobid); if (normal_close (sys_fstat(pjob-fd, sbuf) == 0)) { pjob-size = sbuf.st_size; close(pjob-fd); pjob-fd = -1; } else { /* * Not a normal close or we couldn't stat the job file, * so something has gone wrong. Cleanup. */ close(pjob-fd); pjob-fd = -1; DEBUG(3,(print_job_end: failed to stat file for jobid %d\n, jobid )); goto fail; } /* Technically, this is not quit right. If the printer has a separator * page turned on, the NT spooler prints the separator page even if the * print job is 0 bytes. 010215 JRR */ if (pjob-size == 0 || pjob-status == LPQ_DELETING) { /* don't bother spooling empty files or something being deleted. */ DEBUG(5,(print_job_end: canceling spool of %s (%s)\n, pjob-filename, pjob-size ? deleted : zero length )); unlink(pjob-filename); tdb_delete(tdb, print_key(jobid)); return 0; } ret = (*(current_printif-job_submit))(snum, pjob); if (ret) goto fail; /* The print job has been sucessfully handed over to the back-end */ pjob-spooled = True; pjob-status = LPQ_QUEUED; print_job_store(jobid, pjob); /* make sure the database is up to date */ if (print_cache_expired(snum)) print_queue_update(snum); return ret; /* must be 0 */ fail: /* The print job was not succesfully started. Cleanup */ /* Still need to add proper error return propagation! 010122:JRR */ unlink(pjob-filename); tdb_delete(tdb, print_key(jobid)); if ( ret == 0) { /* current_printif-job_submit was not called */ return -1; } return ret; } Change function "spoolss_enddocprinter_internal" in file "srv_spoolss_nt.c": static uint32 _spoolss_enddocprinter_internal(pipes_struct *p, POLICY_HND *handle) { int rc; Printer_entry *Printer=find_printer_index_by_hnd(p, handle); if (!Printer) { DEBUG(0,(_spoolss_enddocprinter_internal: Invalid handle (%s)\n, OUR_HANDLE(handle))); return ERRbadfid; } Printer-document_started=False; rc = print_job_end(Printer-jobid,True); if ( rc != 0) { DEBUG(0,(_spoolss_enddocprinter_internal: print_job_end returns, %d \n, rc)); }else{ DEBUG(3,(_spoolss_enddocprinter_internal: print_job_end returns, %d \n, rc)); } if ( rc == -1) { rc = ERRfiledeleted; /* It means that any problem happened before calling "print command" */ } return rc; } I have made it, compiled and installed on Debian Linux. It works fine and brings error codes to Windows clients. Main assumption here: The "print command" returns 0 if job submitted OK and valid Windows/Dos error code in other cases. Best regards Arcady [EMAIL PROTECTED]
Re: Porting guide Samba 2.2.x - 3.0
[follow-up myself .. :) ] unfortunately I wasn't able to follow the 3.0 development nor this ML very closely. Does a porting guide from 2.2.x to 3.0 exist? I've just discovered that the following code void send_message(pstring msg) { [..] unix_to_dos(msg); len = strlen(msg); if (!cli_message_start(cli, remote_machine, username, grp_id)) { DEBUG(0,(message start: %s, cli_errstr(cli))); return; } [..] I fixed it this way, it works with Samba 3.0 alpha21, but probably not the best way :) [..] #if SAMBA_VERSION_MAJOR==3 fstrcpy(remote_machine, get_remote_machine_name()); DEBUG(5, (remote machine is: %s\n, remote_machine)); #endif [..] #if SAMBA_VERSION_MAJOR==2 pstrcpy(msg_conv, unix_to_dos(msg)); #elif SAMBA_VERSION_MAJOR==3 push_ascii_pstring(msg_conv, msg); #endif Hm, still I have to figure out, how a newline has to be encoded correctly, as the winpop pane of Win98 shows text1|text2 instead of text1 text2. best regards, Rainer Link
Re: 3.0 requires an admin account to join samba to a domain?
On Wed, Dec 04, 2002 at 02:09:45PM -0600, Gerald (Jerry) Carter wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 4 Dec 2002, Jim McDonough wrote: Can someone confirm or deny that there is not net equivalent of smbpasswd -j DOMAIN -R PDC in HEAD? All I see requires an admin username/pw Just net rpc join should do it. Try net help rpc join I found it. Who came up with the function names? They're horrible! Originally it was an attempt to follow underlying mechanism name. As 'net' gets general and therefore complicated tool, we getting farther from this intend. Perhaps synonyms could help, but only for a while. After that it would be a straight way to horrible mess. Maybe it's time to start 'net search key=...' ? ;-) -- cheers, ++ |Rafal 'Mimir' Szczesniak [EMAIL PROTECTED] | |*BSD, GNU/Linux and Samba / |__/
Re: 3.0 requires an admin account to join samba to a domain?
On Wed, Dec 04, 2002 at 03:20:58PM -0500, Jim McDonough wrote: And why are there two functions for changing a machine trust account? Dunno. Perhaps Rafal knows? Rafal know only what he read in the code. Are we talking about net_rpc_join_oldstyle() and net_rpc_join_newstyle() functions ? Just want to make sure... -- cheers, ++ |Rafal 'Mimir' Szczesniak [EMAIL PROTECTED] | |*BSD, GNU/Linux and Samba / |__/
Re: 3.0 requires an admin account to join samba to a domain?
And why are there two functions for changing a machine trust account? Dunno. Perhaps Rafal knows? Rafal know only what he read in the code. Are we talking about net_rpc_join_oldstyle() and net_rpc_join_newstyle() functions ? Just want to make sure... Whoops, I was just reading too fast. Machine trust account, not domain trust accountsorry. Jim McDonough IBM Linux Technology Center Samba Team 6 Minuteman Drive Scarborough, ME 04074 USA [EMAIL PROTECTED] [EMAIL PROTECTED] Phone: (207) 885-5565 IBM tie-line: 776-9984
Re: 3.0 requires an admin account to join samba to a domain?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 5 Dec 2002, Rafal Szczesniak wrote: I found it. Who came up with the function names? They're horrible! Originally it was an attempt to follow underlying mechanism name. As 'net' gets general and therefore complicated tool, we getting farther from this intend. Perhaps synonyms could help, but only for a while. After that it would be a straight way to horrible mess. Maybe it's time to start 'net search key=...' ? ;-) I meant things like just_change_the_password() cheers, jerry -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.0 (GNU/Linux) Comment: For info see http://quantumlab.net/pine_privacy_guard/ iD8DBQE97qAaIR7qMdg1EfYRAgV2AJ9DdsCdwldhBYmZJfX6Jd0i6jb5bgCgpQxl Vnr2DwMHgsMUIUgXyk+YAVM= =HmP7 -END PGP SIGNATURE-