[Samba] Smbd using too much CPU
I recently got the problem that my smbd process takes up a lot of CPU (about 60%). It's running this high even if I don't access the server through my samba clients. I have tried restarting samba, rebooting the computer and I have been looking at several logs but I can't see what's wrong. It never seems to relax. I need to fix this as fast as possible because my CPU fan is running so high I can't even think. This is an extract from top: [EMAIL PROTECTED] /]# top PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ COMMAND 13320 root 16 0 190m 181m 2400 R 77.2 36.1 43:36.14 smbd This is the result from running strace for about five seconds: [EMAIL PROTECTED] /]# strace -p 13320 -cfqrT % time seconds usecs/call callserrors syscall -- --- --- - - 75.610.085973 6 13814 1740 stat64 9.710.011036 7 1560 select 5.660.006436 4 1561 write 4.300.004889 6 847 open 1.930.002193 1 1774 getdents64 1.520.001728 1 3120 read 1.100.001249 1 2231 fcntl64 0.090.000107 0 847 close 0.090.98 0 847 fstat64 0.000.00 0 8 time 0.000.00 0 6 lseek 0.000.00 0 1560 gettimeofday 0.000.00 025 mremap -- --- --- - - 100.000.113709 28200 1740 total Here's an extract from strace -p 13320 -f. I don't understand anything from it. gettimeofday({1145270319, 463254}, NULL) = 0 stat64(proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/self/task/133 20/cwd/proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/self/task/1332 0/cwd/proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/2/root/proc/6/c wd/proc/13123/fd, {st_mode=S_IFDIR|0500, st_size=0, ...}) = 0 fcntl64(13, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=672, len=1}, 0xbfec6344) = 0 fcntl64(13, F_SETLKW64, {type=F_UNLCK, whence=SEEK_SET, start=672, len=1}, 0xbfec6284) = 0 write(23, \0\0\0d\377SMB2\0\0\0\0\210A\310\0\0\0\0\0\0\0\0\0\0\0..., 104) = 104 select(24, [5 23], NULL, NULL, {60, 0}) = 1 (in [23], left {60, 0}) read(23, \0\0\0020, 4)= 4 read(23, \377SMB2\0\0\0\0\30\7\310\0\0\0\0\0\0\0\0\0\0\0\0\2\0\204..., 560) = 560 gettimeofday({1145270319, 495271}, NULL) = 0 stat64(proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/self/task/133 20/cwd/proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/self/task/1332 0/cwd/proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/2/root/proc/6/c wd/proc/13123/fd, {st_mode=S_IFDIR|0500, st_size=0, ...}) = 0 stat64(proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/self/task/133 20/cwd/proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/self/task/1332 0/cwd/proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/2/root/proc/6/c wd/proc/13123/fd/*, 0xbfec57d0) = -1 ENOENT (No such file or directory) stat64(proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/self/task/133 20/cwd/proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/self/task/1332 0/cwd/proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/2/root/proc/6/c wd/proc/13123/fd/*, 0xbfec57d0) = -1 ENOENT (No such file or directory) open(proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/self/task/13320 /cwd/proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/self/task/13320/ cwd/proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/2/root/proc/6/cwd /proc/13123/fd, O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 24 fstat64(24, {st_mode=S_IFDIR|0500, st_size=0, ...}) = 0 fcntl64(24, F_SETFD, FD_CLOEXEC)= 0 stat64(proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/self/task/133 20/cwd/proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/self/task/1332 0/cwd/proc/self/task/13320/cwd/proc/self/task/13320/cwd/proc/2/root/proc/6/c wd/proc/13123/fd/., {st_mode=S_IFDIR|0500, st_size=0, ...}) = 0 The samba logs doesn't tell me anything and neither does /var/log/messages. What is going on? The computer is a ~2GHz Intel, 512MB ram, Fedora Core 5. Kim Lindberg -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Smbd using too much CPU
On Mon, Apr 17, 2006 at 12:46:04PM +0200, Kim Lindberg wrote: I recently got the problem that my smbd process takes up a lot of CPU (about 60%). It's running this high even if I don't access the server through my samba clients. I have tried restarting samba, rebooting the computer and I have been looking at several logs but I can't see what's wrong. It never seems to relax. I need to fix this as fast as possible because my CPU fan is running so high I can't even think. Don't share /proc via samba. Volker pgpdDfPssAsCk.pgp Description: PGP signature -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Fwd: domain member server authentication problem
I'm still unable to pinpoint this problem and am getting desperate! It appears to be something PAM related,as winbindd authenticates the use fine, then fails at PAM: From /var/log/auth.log: Apr 17 20:24:22 localhost pam_winbind[29408]: user 'STATEART+test' granted access at the terminal: SPNEGO login failed: Logon failurelang_tdb_init: /usr/share/samba/ en_AU:en_US:en_GB:en.msg: No such file or directory session setup failed: NT_STATUS_LOGON_FAILURE From /var/log/samba/log.berthog [2006/04/17 20:44:39, 3] auth/auth.c:check_ntlm_password(268) check_ntlm_password: winbind authentication for user [test] succeeded [2006/04/17 20:44:39, 3] smbd/sec_ctx.c:push_sec_ctx(256) push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1 [2006/04/17 20:44:39, 3] smbd/uid.c:push_conn_ctx(365) push_conn_ctx (0) : conn_ctx_stack_ndx = 0[2006/04/17 20:44:39, 3] smbd/ sec_ctx.c:set_sec_ctx(288) setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1 [2006/04/17 20:44:39, 5] auth/auth_util.c:debug_nt_user_token(485) NT user token: (NULL)[2006/04/17 20:44:39, 5] auth/ auth_util.c:debug_unix_user_token(506) UNIX token of user 0 Primary group is 0 and contains 0 supplementary groups [2006/04/17 20:44:39, 4] auth/pampass.c:smb_pam_start(459) smb_pam_start: PAM: Init user: STATEART+test [2006/04/17 20:44:39, 4] auth/pampass.c:smb_pam_start(476) smb_pam_start: PAM: setting rhost to: 127.0.0.1 [2006/04/17 20:44:39, 4] auth/pampass.c:smb_pam_start(485) smb_pam_start: PAM: setting tty [2006/04/17 20:44:39, 4] auth/pampass.c:smb_pam_start(493) smb_pam_start: PAM: Init passed for user: STATEART+test [2006/04/17 20:44:39, 4] auth/pampass.c:smb_pam_account(551) smb_pam_account: PAM: Account Management for User: STATEART+test [2006/04/17 20:44:39, 0] auth/pampass.c:smb_pam_account(573) smb_pam_account: PAM: UNKNOWN PAM ERROR (9) during Account Management for User: STATEART+test [2006/04/17 20:44:39, 2] auth/pampass.c:smb_pam_error_handler(73) smb_pam_error_handler: PAM: Account Check Failed : Authentication service cannot retrieve authentication info. [2006/04/17 20:44:39, 0] auth/pampass.c:smb_pam_accountcheck(781) smb_pam_accountcheck: PAM: Account Validation Failed - Rejecting User STATEART+test! Begin forwarded message: From: Emrys Hughes [EMAIL PROTECTED] Date: 9 April 2006 11:21:33 PM To: samba@lists.samba.org Subject: Fwd: domain member server authentication problem I still haven't been able to resolve this problem and have received no response so I re-post.apologies if this is bad manners. I have tried altering /etc/pam.d/samba so it reads as follows, but still no joy: @include common-auth @include common-account @include common-session account required/lib/security/pam_winbind.so authrequired/lib/security/pam_winbind.so Begin forwarded message: From: Emrys Hughes [EMAIL PROTECTED] Date: 5 April 2006 8:31:04 PM To: samba@lists.samba.org Subject: domain member server authentication problem Hi I'm having problems implementing a domain member server using winbind. I've setup a test share on the server (BERTHOG) and test user (alex) on the PDC (RODNEY). Winbind seems to be running fine: berthog:/srv$ wbinfo -n alex S-1-5-21-2502943273-132007109-1129902423-3006 User (1) But when I try to connect to the share: berthog:/srv$ smbclient //BERTHOG/shared -U alex Password: session setup failed: NT_STATUS_LOGON_FAILURE The machine log shows this: [2006/04/05 20:14:36, 0] auth/pampass.c:smb_pam_account(573) smb_pam_account: PAM: UNKNOWN PAM ERROR (9) during Account Management for User : STATEART+alex [2006/04/05 20:14:36, 0] auth/pampass.c:smb_pam_accountcheck(781) smb_pam_accountcheck: PAM: Account Validation Failed - Rejecting User STATEART +alex! I don't believe any modifications have to be made to the PAM files to get samba/winbind working? Any advice would be gratefully recieved! My smb.conf follows: [global] ## Browsing/Identification ### workgroup = stateart netbios name = BERTHOG server string = %h server (Samba %v) wins support = no wins server = 192.168.2.97 winbind use default domain = yes idmap uid = 1-2 idmap gid = 1-2 winbind enum users = yes winbind enum groups = yes template primary group = Domain Users winbind separator = + # This will prevent nmbd to search for NetBIOS names through DNS. dns proxy = no # What naming service and in what order should we use to resolve host names # to IP addresses name resolve order = wins bcast hosts Debugging/Accounting log file = /var/log/samba/log.%m max log size = 1000 ; syslog only = no syslog = 0 # Do something sensible when Samba crashes: mail the admin a backtrace panic action = /usr/share/samba/panic-action %d ### Authentication ### security = domain ; security = share password server = * domain master = no # You may wish to use password encryption.
[Samba] Oplocks break and no route to host problems
Hi, I' m experiencing many problems with oplocks break failure and Error: no route to host.essentialy onto \profiles dir and \netlogon dir. So My clients cannot update many files on the SAMBA/PDC and cannot read the NTconfig.pol file to update their policies. I have many PC that are old computers with Win2k and have an Antivirus and are slower machines ... This problem less occurs on newer machines. I have seen searching the web that I may disable oplock (oplock = False) into the smb.conf and level 2 oplock too. I don' t now if my default configuration have this parameter set cause I don't see it into my smb.conf. But perhaps I can play with a delay parameter that I could but bigger, is it possible ? I would like to now if there is a solution to test in a good way this problem. thanks My configuration is : Samba 3.0.20 under Linux Mandrake 9.2 compiled with acl and quotas support under an XFS filesystem working great. recycle and vscan/clamav modules compiled with but not enabled on all shares (disabled onto \netlogon and \profiles) Xavier -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
RE: [Samba] Smbd using too much CPU
Thanks, this helped! I had shared / and didn't think of proc as something bad to share. Kim Lindberg -Original Message- From: Volker Lendecke [mailto:[EMAIL PROTECTED] On Behalf Of Volker Lendecke Sent: den 17 april 2006 13:02 To: Kim Lindberg Cc: samba@lists.samba.org Subject: Re: [Samba] Smbd using too much CPU On Mon, Apr 17, 2006 at 12:46:04PM +0200, Kim Lindberg wrote: I recently got the problem that my smbd process takes up a lot of CPU (about 60%). It's running this high even if I don't access the server through my samba clients. I have tried restarting samba, rebooting the computer and I have been looking at several logs but I can't see what's wrong. It never seems to relax. I need to fix this as fast as possible because my CPU fan is running so high I can't even think. Don't share /proc via samba. Volker -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Why Can I Delete?
Because everyone has read-write access to the directory, anyone can delete any file. It's basic unix permissions that are catching you on this one. I think what you are looking for is something more like /tmp where everone can read-write there own files, if that is the case you need to do the following. chmod a+t /var/www/advertising This will make the files sticky just like in /tmp so that only the owner can delete them. Cheers, Eric On 4/17/06, Michael Stearne [EMAIL PROTECTED] wrote: On 4/15/06, Eric Warnke [EMAIL PROTECTED] wrote: Please supply a `ls -ald /var/www/advertising` [EMAIL PROTECTED] www]# ls -ald /var/www/advertising drwxrwxrwx 2 root root 70 Apr 17 01:07 /var/www/advertising Thanks Cheers, Eric On 4/15/06, Michael Stearne [EMAIL PROTECTED] wrote: If user1 creates a file on the share, why with this configuration can user2 delete that file created by user1? Thanks, Michael [global] idmap gid = 16777216-33554431 idmap uid = 16777216-33554431 path = /var/www/ unix password sync = yes workgroup = cmny os level = 20 auto services = advertising editorial null passwords = yes encrypt passwords = yes winbind use default domain = no security = user template shell = /bin/false lock directory = /var/lock/smb share modes = yes locking = yes [advertising] wide links = no path = /var/www/advertising strict locking = yes valid users = @advertising oplocks = False level2 oplocks = False public = no writable = yes create mask = 0700 force create mode = 0700 directory mask = 0700 force directory mode = 0700 -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Re: authentication performance problem
Le vendredi 07 avril 2006 à 16:26 +0200, Thomas Limoncelli a écrit : Jerome Warnier wrote: Le jeudi 06 avril 2006 à 23:18 +0200, Thomas Limoncelli a écrit : I strongly suggest running Ethereal while you see the delays. It has helped me a lot in the past for those type of performance problems. The problem is that it seems to happen consistently every Sunday morning (night) early, and there's no physical access to the machine during the week-end. So, yes, I could probably run Ethereal from a distance, but it would probably be sooo slw. You can easily capture remotely (or in the background) to a file using tcpdump or tethereal and later investigate the capture file with Ethereal itself. Maybe you could help about the filters to apply to get only the interesting trafic out of it? Thanks -TL -- Jérôme Warnier FLOSS Consultant http://beeznest.net -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] If you ever wondered about Samba and the Golden Penguin Bowl and that suit...
Woohoo! Thanks for sharing. =) Henrik 17 apr 2006 kl. 04:19 skrev Jeremy Allison: I got a message from the organizer, for the first time the video feed of the Golden Penguin Bowl is available So if you never saw me making a complete fool of myself live, now's your chance to see it second hand :-) :-). John Mark Walker wrote : Hey ho... so the Golden Penguin Bowl video is now up, and you can get to it from http://www.linuxworldblog.com/ Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Understanding NT_STATUS_OBJECT_PATH_NOT_FOUND
[For those on both this and samba-technical - sorry for the duplication. I meant to send this here, but I experienced a user error. :-) ] I'm having a problem related to the NT_STATUS_OBJECT_PATH_NOT_FOUND error and I am having a little difficulty discovering what this means. [EMAIL PROTECTED] admin]# smbclient dapper\\dfs mypassword -U Myuser -E -W CISNET -D home\\staff\\fran -d0 -Tqca /tmp/test.tar Domain=[CISNET] OS=[Windows Server 2003 3790 Service Pack 1] Server=[Windows Server 2003 5.2] NT_STATUS_OBJECT_PATH_NOT_FOUND opening remote file \home\staff\fran\2005 LRF\2004 LRF Summary FINAL.doc (\home\staff\fran\2005 LRF\) NT_STATUS_OBJECT_PATH_NOT_FOUND opening remote file \home\staff\fran\2005 LRF\2004 LRF Summary Revised.doc (\home\staff\fran\2005 LRF\) NT_STATUS_OBJECT_PATH_NOT_FOUND opening remote file \home\staff\fran\2005 LRF\2005 LRF FINAL.doc (\home\staff\fran\2005 LRF\) ... and so on, one for each file in my directory. Now, the files are there... [EMAIL PROTECTED] admin]# smbclient dapper\\dfs mypassword -U Myuser -W CISNET Domain=[CISNET] OS=[Windows Server 2003 3790 Service Pack 1] Server=[Windows Server 2003 5.2] smb: \ cd home\staff\fran smb: \home\staff\fran\ ls . D0 Tue Mar 21 12:01:04 2006 .. D0 Tue Mar 21 12:01:04 2006 2005 LRFD0 Wed Dec 15 13:16:46 2004 CS640 D0 Thu Dec 9 14:01:27 2004 [snip] smb: \home\staff\fran\ cd 2005 LRF smb: \home\staff\fran\2005 LRF\ ls . D0 Wed Dec 15 13:16:46 2004 .. D0 Wed Dec 15 13:16:46 2004 2004 LRF Summary FINAL.doc 232448 Wed Dec 15 13:09:35 2004 2004 LRF Summary Revised.doc227840 Fri Dec 10 12:40:39 2004 [snip] This is happening on smbclient Version 3.0.14a-2. Has anyone seen this before or know what causes this error? Thanks, Fran -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Re: Smbd using too much CPU
What is the problem when sharing /proc? Volker Lendecke wrote: On Mon, Apr 17, 2006 at 12:46:04PM +0200, Kim Lindberg wrote: I recently got the problem that my smbd process takes up a lot of CPU (about 60%). It's running this high even if I don't access the server through my samba clients. I have tried restarting samba, rebooting the computer and I have been looking at several logs but I can't see what's wrong. It never seems to relax. I need to fix this as fast as possible because my CPU fan is running so high I can't even think. Don't share /proc via samba. Volker -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Some files not showing...
Hi there Matt, I cahnged ownership of the whole directory from root to the user logging from windows. Still the mp3 is not showing up but the txt file is. Both the files are owned by the same user now. Any thoughts? thanks Mark -- View this message in context: http://www.nabble.com/Some-files-not-showing...-t1459162.html#a3949742 Sent from the Samba - General forum at Nabble.com. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Re: Smbd using too much CPU
It might have to do with the infinite recursion problem or other such weirdness that occurs in the /proc directory. I would also not trust explorer not to munge some of the files if permissions were set wrong, and that could be very bad ( tm ). Just like you don't want to share /dev since just openeing some of the files ( eg. Tape drives ) can had effects. Cheers, Eric On 4/17/06, Blaž Primc [EMAIL PROTECTED] wrote: What is the problem when sharing /proc? -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] If you ever wondered about Samba and the Golden Penguin Bowl and that suit...
Jeremy Allison wrote: I got a message from the organizer, for the first time the video feed of the Golden Penguin Bowl is available So if you never saw me making a complete fool of myself live, now's your chance to see it second hand :-) :-) . John Mark Walker wrote : Hey ho... so the Golden Penguin Bowl video is now up, and you can get to it from http://www.linuxworldblog.com/ in that video, when it shows the like question screen after the example bonus question and the mouse goes over the image of the 2 guys... is that internet explorers little 4 icons that appear in the top left or am i just being silly? Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Oplocks break and no route to host problems
On Mon, Apr 17, 2006 at 01:44:31PM +0200, xavier wrote: I' m experiencing many problems with oplocks break failure and Error: no route to host.essentialy onto \profiles dir and \netlogon dir. So My clients cannot update many files on the SAMBA/PDC and cannot read the NTconfig.pol file to update their policies. I have many PC that are old computers with Win2k and have an Antivirus and are slower machines ... This problem less occurs on newer machines. I have seen searching the web that I may disable oplock (oplock = False) into the smb.conf and level 2 oplock too. I don' t now if my default configuration have this parameter set cause I don't see it into my smb.conf. But perhaps I can play with a delay parameter that I could but bigger, is it possible ? The only thing that makes sense here is to completely disable oplocks, although this does not solve your real problem. 99% this is your network, maybe some broken switch, more likely problems with network card drivers either on clients or the server. Volker pgpFFc5w6rzGK.pgp Description: PGP signature -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] If you ever wondered about Samba and the Golden Penguin Bowl and that suit...
On Mon, Apr 17, 2006 at 03:30:47PM +0100, Matt Richards wrote: in that video, when it shows the like question screen after the example bonus question and the mouse goes over the image of the 2 guys... is that internet explorers little 4 icons that appear in the top left or am i just being silly? Nope, the AV guys couldn't get the Linux laptop to sync correctly to the big projector (worked ok on all the projectors in the breakout sessions) so in desparation to get the show on the road (we were less than 20 mins before showtime) we ran the web server off Jerry's Linux laptop and let the AV guy use his own laptop (the one he'd set up earlier) to feed the big screen projector. Unfortunately that was running Windows. Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Samba 3 - Rebuild WINS database
Is there a way - without killing off Samba - to force a rebuild of the WINS database that Samba is maintaining? I've got a couple of completely bogus entries in WINS and I need to get rid of them, but I can't take the Samba server down to do it. I'm hoping that I can issue a couple of commands and poof the WINS database is blown away and it starts to repopulate with good data. If I *HAVE* to take Samba down then I will but I'd prefer not to. -- Kevin L. Collins, MCSE Systems Manager Nesbitt Engineering, Inc. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Samba 3 - Rebuild WINS database
You can do it by just edit the wins.dat file and restart nmbd. No need to stop smbd while you do that, of course while nmbd is down you will have some limited functionality (read problems resolving names), but you should be able to do that in a very short time frame. Simo. On Mon, 2006-04-17 at 11:33 -0400, Collins, Kevin wrote: Is there a way - without killing off Samba - to force a rebuild of the WINS database that Samba is maintaining? I've got a couple of completely bogus entries in WINS and I need to get rid of them, but I can't take the Samba server down to do it. I'm hoping that I can issue a couple of commands and poof the WINS database is blown away and it starts to repopulate with good data. If I *HAVE* to take Samba down then I will but I'd prefer not to. -- Kevin L. Collins, MCSE Systems Manager Nesbitt Engineering, Inc. -- Simo Sorce Samba Team GPL Compliance Officer email: [EMAIL PROTECTED] http://samba.org -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] If you ever wondered about Samba and the Golden Penguin Bowl and that suit...
Yes, good performance! Made me laugh (sometimes). Can't believe noone got the Solaris question! Wish I could attend (as an audience, of course). Woohoo! Thanks for sharing. =) Henrik 17 apr 2006 kl. 04:19 skrev Jeremy Allison: I got a message from the organizer, for the first time the video feed of the Golden Penguin Bowl is available So if you never saw me making a complete fool of myself live, now's your chance to see it second hand :-) :-). John Mark Walker wrote : Hey ho... so the Golden Penguin Bowl video is now up, and you can get to it from http://www.linuxworldblog.com/ Jeremy. Arc C. [EMAIL PROTECTED] -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] If you ever wondered about Samba and the Golden Penguin Bowl and that suit...
On Mon, Apr 17, 2006 at 11:54:58AM -0500, Arkadiy Chapkis - Arc wrote: Yes, good performance! Made me laugh (sometimes). Can't believe noone got the Solaris question! Wish I could attend (as an audience, of course). Funny that no one seems to want to be on stage :-). I've been trying to get Jerry to take over as host for a while (even if just as a guest host) but he never seems to want to do it... :-) :-). Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] hardware to use with samba?????
From the sounds of it, your server won't be breaking into a sweat trying to handle the workload. :) If you are experiencing performance problems, you need to look at where the bottlenecks are. Monitor first, then optimize. Right now it sounds like you've got a lot of machine with very little load. Optimizing is a waste of time if you can't see any performance changes. Mazen Ghalayini wrote: it's an environment where 30 mac machines and 10 windows machines will need to upload multimedia photoshop, illustrator files to the server. users can not delete files on the server; they can only upload or download. that's the setup i have now. if i have 4gb of ram on my new server, what caching parameters i should set in the samba conf file? and how do i optimize my linux filesystem to allow optimal performance for samba? - Original Message - From: Gary Dale [EMAIL PROTECTED] To: Mazen Ghalayini [EMAIL PROTECTED] Subject: Re: [Samba] hardware to use with samba? Date: Fri, 14 Apr 2006 15:01:39 -0400 ECC memory is useful for preventing memory errors. It doesn't matter how long it takes to get the wrong answer. :) I recommend it for anything critical. The memory access speed is minuscule compared with the disk I/O speed and network speed. The type of memory is not important. The amount of memory usually plays a bigger role on servers. How much caching helps depends on usage patterns. If your users are accessing the same files frequently, it can really boost performance. If they don't, you won't see a great performance increase. The processor you've chosen has a lot of power for simple file serving. I gather from the questions, you're not doing this for a large organization, so you're unlikely to need more performance. You should do some performance monitoring on the server to find out if you need to change anything. Put it up in the live environment and see how much CPU is being used, what percentage of cache hits you're getting, etc., and upgrade it accordingly. Mazen Ghalayini wrote: thanks a lot gary. do u know if ECC memory or registered memory helps? also how much does caching provide performance increase, and i will be using two gigabit ethernets using link aggregation, right now i am thinking of getting one AMD Dual-Core Opteron 275 Italy 1GHz HT Socket 940 but the motherboard allows two of that. shall i go for two of them or just one? - Original Message - From: Gary Dale [EMAIL PROTECTED] To: samba@lists.samba.org Subject: Re: [Samba] hardware to use with samba? Date: Fri, 14 Apr 2006 14:08:16 -0400 Mazen Ghalayini wrote: if you are to build a samba file server what hardware would you pick? does samba benifit from dual core, or dual processors or even quad? also does it benifit from memory? and how does it benifit from memory? more ram is better for samba? any ideas here? regards, Mazen Like any file server, you'd want the fastest drives available, which means SCSI, put into a RAID array. Beyond that, more memory allows for more caching. Processor speed is not a huge concern unless you're running gigabit Ethernet, in which case you may need a fast processor just to be able to pump the data into the pipe. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Why Can I Delete?
On 4/17/06, Eric Warnke [EMAIL PROTECTED] wrote: Because everyone has read-write access to the directory, anyone can delete any file. It's basic unix permissions that are catching you on this one. I think what you are looking for is something more like /tmp where everone can read-write there own files, if that is the case you need to do the following. chmod a+t /var/www/advertising This will make the files sticky just like in /tmp so that only the owner can delete them. Thanks so much! Michael -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] samba-vscan package for debian
Hi people, anyone knows where I can find a package por Debian Stable with vscan support? Tnxs in advance. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
svn commit: samba r15099 - in branches/SAMBA_4_0/source: heimdal_build lib/registry script
Author: ab Date: 2006-04-17 07:04:56 + (Mon, 17 Apr 2006) New Revision: 15099 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15099 Log: An attempt to fix BSD make portability issues. With these changes Samba 4 builds successfully on NetBSD 3.0 Modified: branches/SAMBA_4_0/source/heimdal_build/config.mk branches/SAMBA_4_0/source/lib/registry/config.mk branches/SAMBA_4_0/source/script/buildtree.pl branches/SAMBA_4_0/source/script/cflags.pl Changeset: Modified: branches/SAMBA_4_0/source/heimdal_build/config.mk === --- branches/SAMBA_4_0/source/heimdal_build/config.mk 2006-04-16 11:47:26 UTC (rev 15098) +++ branches/SAMBA_4_0/source/heimdal_build/config.mk 2006-04-17 07:04:56 UTC (rev 15099) @@ -436,6 +436,9 @@ .hin.h: @cp $ $@ +heimdal/lib/roken/vis.h: heimdal/lib/roken/vis.hin +heimdal/lib/roken/err.h: heimdal/lib/roken/err.hin + $(patsubst heimdal/lib/des/%.h,heimdal/lib/des/hcrypto/%.h,$(wildcard heimdal/lib/des/*.h)): heimdal/lib/des/hcrypto heimdal/lib/des/hcrypto: Modified: branches/SAMBA_4_0/source/lib/registry/config.mk === --- branches/SAMBA_4_0/source/lib/registry/config.mk2006-04-16 11:47:26 UTC (rev 15098) +++ branches/SAMBA_4_0/source/lib/registry/config.mk2006-04-17 07:04:56 UTC (rev 15099) @@ -22,7 +22,7 @@ lib/registry/tdr_regf.c: $(srcdir)/lib/registry/regf.idl @CPP=$(CPP) $(PERL) $(srcdir)/pidl/pidl $(PIDL_ARGS) \ --header --outputdir=lib/registry \ - --tdr-parser -- $^ + --tdr-parser -- $(srcdir)/lib/registry/regf.idl clean:: @-rm -f lib/registry/regf.h lib/registry/tdr_regf* Modified: branches/SAMBA_4_0/source/script/buildtree.pl === --- branches/SAMBA_4_0/source/script/buildtree.pl 2006-04-16 11:47:26 UTC (rev 15098) +++ branches/SAMBA_4_0/source/script/buildtree.pl 2006-04-17 07:04:56 UTC (rev 15099) @@ -1,5 +1,5 @@ -#! /usr/bin/perl -w -eval 'exec /usr/bin/perl -S $0 ${1+$@}' +#! /usr/bin/env perl -w +eval 'exec /usr/bin/env perl -S $0 ${1+$@}' if 0; #$running_under_some_shell use strict; Modified: branches/SAMBA_4_0/source/script/cflags.pl === --- branches/SAMBA_4_0/source/script/cflags.pl 2006-04-16 11:47:26 UTC (rev 15098) +++ branches/SAMBA_4_0/source/script/cflags.pl 2006-04-17 07:04:56 UTC (rev 15099) @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # This is a hack to allow per target cflags. It isn't very elegant, but it # is the most portable idea we have come up with yet
svn commit: samba r15100 - in branches/SAMBA_4_0/source: lib/tdb/common lib/tdb/include lib/tdb/tools smbd
Author: vlendec Date: 2006-04-17 11:42:59 + (Mon, 17 Apr 2006) New Revision: 15100 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15100 Log: Port the bugfix for #3569 to Samba4 Modified: branches/SAMBA_4_0/source/lib/tdb/common/open.c branches/SAMBA_4_0/source/lib/tdb/include/tdb.h branches/SAMBA_4_0/source/lib/tdb/tools/tdbtorture.c branches/SAMBA_4_0/source/smbd/process_standard.c Changeset: Modified: branches/SAMBA_4_0/source/lib/tdb/common/open.c === --- branches/SAMBA_4_0/source/lib/tdb/common/open.c 2006-04-17 07:04:56 UTC (rev 15099) +++ branches/SAMBA_4_0/source/lib/tdb/common/open.c 2006-04-17 11:42:59 UTC (rev 15100) @@ -424,11 +424,27 @@ } /* reopen all tdb's */ -int tdb_reopen_all(void) +int tdb_reopen_all(int parent_longlived) { struct tdb_context *tdb; for (tdb=tdbs; tdb; tdb = tdb-next) { + /* +* If the parent is longlived (ie. a +* parent daemon architecture), we know +* it will keep it's active lock on a +* tdb opened with CLEAR_IF_FIRST. Thus +* for child processes we don't have to +* add an active lock. This is essential +* to improve performance on systems that +* keep POSIX locks as a non-scalable data +* structure in the kernel. +*/ + if (parent_longlived) { + /* Ensure no clear-if-first. */ + tdb-flags = ~TDB_CLEAR_IF_FIRST; + } + if (tdb_reopen(tdb) != 0) return -1; } Modified: branches/SAMBA_4_0/source/lib/tdb/include/tdb.h === --- branches/SAMBA_4_0/source/lib/tdb/include/tdb.h 2006-04-17 07:04:56 UTC (rev 15099) +++ branches/SAMBA_4_0/source/lib/tdb/include/tdb.h 2006-04-17 11:42:59 UTC (rev 15100) @@ -87,7 +87,7 @@ tdb_hash_func hash_fn); int tdb_reopen(struct tdb_context *tdb); -int tdb_reopen_all(void); +int tdb_reopen_all(int parent_longlived); void tdb_logging_function(struct tdb_context *tdb, tdb_log_func); enum TDB_ERROR tdb_error(struct tdb_context *tdb); const char *tdb_errorstr(struct tdb_context *tdb); Modified: branches/SAMBA_4_0/source/lib/tdb/tools/tdbtorture.c === --- branches/SAMBA_4_0/source/lib/tdb/tools/tdbtorture.c2006-04-17 07:04:56 UTC (rev 15099) +++ branches/SAMBA_4_0/source/lib/tdb/tools/tdbtorture.c2006-04-17 11:42:59 UTC (rev 15100) @@ -149,7 +149,7 @@ #if REOPEN_PROB if (in_transaction == 0 random() % REOPEN_PROB == 0) { - tdb_reopen_all(); + tdb_reopen_all(0); goto next; } #endif Modified: branches/SAMBA_4_0/source/smbd/process_standard.c === --- branches/SAMBA_4_0/source/smbd/process_standard.c 2006-04-17 07:04:56 UTC (rev 15099) +++ branches/SAMBA_4_0/source/smbd/process_standard.c 2006-04-17 11:42:59 UTC (rev 15100) @@ -105,7 +105,7 @@ socket_dup(sock2); /* tdb needs special fork handling */ - if (tdb_reopen_all() == -1) { + if (tdb_reopen_all(1) == -1) { DEBUG(0,(standard_accept_connection: tdb_reopen_all failed.\n)); } @@ -169,7 +169,7 @@ talloc_free(ev); /* tdb needs special fork handling */ - if (tdb_reopen_all() == -1) { + if (tdb_reopen_all(1) == -1) { DEBUG(0,(standard_accept_connection: tdb_reopen_all failed.\n)); }
svn commit: samba r15101 - branches/SAMBA_3_0/source/groupdb branches/SAMBA_3_0/source/lib branches/SAMBA_3_0/source/passdb branches/SAMBA_3_0/source/printing branches/SAMBA_3_0/source/rpc_server bran
Author: vlendec Date: 2006-04-17 11:49:06 + (Mon, 17 Apr 2006) New Revision: 15101 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15101 Log: Little step towards getting Samba4 tdb into 3: tdb_lock_bystring does not have the timeout argument in Samba4. Add a new routine tdb_lock_bystring_with_timeout. Volker Modified: branches/SAMBA_3_0/source/groupdb/mapping.c branches/SAMBA_3_0/source/lib/account_pol.c branches/SAMBA_3_0/source/lib/gencache.c branches/SAMBA_3_0/source/lib/sharesec.c branches/SAMBA_3_0/source/passdb/pdb_tdb.c branches/SAMBA_3_0/source/passdb/secrets.c branches/SAMBA_3_0/source/printing/notify.c branches/SAMBA_3_0/source/printing/nt_printing.c branches/SAMBA_3_0/source/printing/printing.c branches/SAMBA_3_0/source/rpc_server/srv_eventlog_lib.c branches/SAMBA_3_0/source/rpc_server/srv_eventlog_nt.c branches/SAMBA_3_0/source/tdb/tdbutil.c trunk/source/groupdb/mapping.c trunk/source/lib/account_pol.c trunk/source/lib/gencache.c trunk/source/lib/sharesec.c trunk/source/passdb/pdb_tdb.c trunk/source/passdb/secrets.c trunk/source/printing/notify.c trunk/source/printing/nt_printing.c trunk/source/printing/printing.c trunk/source/rpc_server/srv_eventlog_lib.c trunk/source/rpc_server/srv_eventlog_nt.c trunk/source/tdb/tdbutil.c Changeset: Sorry, the patch is too large (563 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15101
svn commit: samba r15102 - branches/SAMBA_3_0/source/smbd trunk/source/smbd
Author: vlendec Date: 2006-04-17 12:23:38 + (Mon, 17 Apr 2006) New Revision: 15102 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15102 Log: u32 is a tdb-only thing that's not exported by samba4 tdb. Replace by uint32. Volker Modified: branches/SAMBA_3_0/source/smbd/mangle_hash2.c branches/SAMBA_3_0/source/smbd/statcache.c trunk/source/smbd/mangle_hash2.c trunk/source/smbd/statcache.c Changeset: Modified: branches/SAMBA_3_0/source/smbd/mangle_hash2.c === --- branches/SAMBA_3_0/source/smbd/mangle_hash2.c 2006-04-17 11:49:06 UTC (rev 15101) +++ branches/SAMBA_3_0/source/smbd/mangle_hash2.c 2006-04-17 12:23:38 UTC (rev 15102) @@ -101,7 +101,7 @@ hashing the resulting cache entry to match the known hash */ static char **prefix_cache; -static u32 *prefix_cache_hashes; +static uint32 *prefix_cache_hashes; /* these are the characters we use in the 8.3 hash. Must be 36 chars long */ static const char *basechars = 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ; @@ -119,10 +119,10 @@ this hash needs to be fast with a low collision rate (what hash doesn't?) */ -static u32 mangle_hash(const char *key, unsigned int length) +static uint32 mangle_hash(const char *key, unsigned int length) { - u32 value; - u32 i; + uint32 value; + uint32 i; fstring str; /* we have to uppercase here to ensure that the mangled name @@ -139,8 +139,8 @@ /* Set the initial value from the key size. */ for (value = FNV1_INIT, i=0; i length; i++) { -value *= (u32)FNV1_PRIME; -value ^= (u32)(str[i]); +value *= (uint32)FNV1_PRIME; +value ^= (uint32)(str[i]); } /* note that we force it to a 31 bit hash, to keep within the limits @@ -162,7 +162,7 @@ return False; } - prefix_cache_hashes = SMB_CALLOC_ARRAY(u32, MANGLE_CACHE_SIZE); + prefix_cache_hashes = SMB_CALLOC_ARRAY(uint32, MANGLE_CACHE_SIZE); if (!prefix_cache_hashes) { return False; } @@ -173,7 +173,7 @@ /* insert an entry into the prefix cache. The string might not be null terminated */ -static void cache_insert(const char *prefix, int length, u32 hash) +static void cache_insert(const char *prefix, int length, uint32 hash) { int i = hash % MANGLE_CACHE_SIZE; @@ -188,7 +188,7 @@ /* lookup an entry in the prefix cache. Return NULL if not found. */ -static const char *cache_lookup(u32 hash) +static const char *cache_lookup(uint32 hash) { int i = hash % MANGLE_CACHE_SIZE; @@ -372,7 +372,7 @@ */ static BOOL check_cache(char *name, size_t maxlen, int snum) { - u32 hash, multiplier; + uint32 hash, multiplier; unsigned int i; const char *prefix; char extension[4]; @@ -386,7 +386,7 @@ /* we need to extract the hash from the 8.3 name */ hash = base_reverse[(unsigned char)name[7]]; for (multiplier=36, i=5;i=mangle_prefix;i--) { - u32 v = base_reverse[(unsigned char)name[i]]; + uint32 v = base_reverse[(unsigned char)name[i]]; hash += multiplier * v; multiplier *= 36; } @@ -517,7 +517,7 @@ char extension[4]; unsigned int extension_length, i; unsigned int prefix_len; - u32 hash, v; + uint32 hash, v; char new_name[13]; /* reserved names are handled specially */ Modified: branches/SAMBA_3_0/source/smbd/statcache.c === --- branches/SAMBA_3_0/source/smbd/statcache.c 2006-04-17 11:49:06 UTC (rev 15101) +++ branches/SAMBA_3_0/source/smbd/statcache.c 2006-04-17 12:23:38 UTC (rev 15102) @@ -291,12 +291,12 @@ JRA. Use a djb-algorithm hash for speed. ***/ -u32 fast_string_hash(TDB_DATA *key) +uint32 fast_string_hash(TDB_DATA *key) { -u32 n = 0; +uint32 n = 0; const char *p; for (p = key-dptr; *p != '\0'; p++) { -n = ((n 5) + n) ^ (u32)(*p); +n = ((n 5) + n) ^ (uint32)(*p); } return n; } Modified: trunk/source/smbd/mangle_hash2.c === --- trunk/source/smbd/mangle_hash2.c2006-04-17 11:49:06 UTC (rev 15101) +++ trunk/source/smbd/mangle_hash2.c2006-04-17 12:23:38 UTC (rev 15102) @@ -101,7 +101,7 @@ hashing the resulting cache entry to match the known hash */ static char **prefix_cache; -static u32 *prefix_cache_hashes; +static uint32 *prefix_cache_hashes; /* these are the characters we use in the 8.3 hash. Must be 36 chars long */ static const char *basechars
svn commit: samba r15103 - branches/SAMBA_3_0/source/smbd trunk/source/smbd
Author: vlendec Date: 2006-04-17 12:27:35 + (Mon, 17 Apr 2006) New Revision: 15103 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15103 Log: Okay, looking closer: Samba4 tdb not exporting u32 is a bug in samba4's tdb. tdb_open_ex needs it. Can someone from samba4 tell me how this should be handled? Thanks, Volker Modified: branches/SAMBA_3_0/source/smbd/mangle_hash2.c branches/SAMBA_3_0/source/smbd/statcache.c trunk/source/smbd/mangle_hash2.c trunk/source/smbd/statcache.c Changeset: Modified: branches/SAMBA_3_0/source/smbd/mangle_hash2.c === --- branches/SAMBA_3_0/source/smbd/mangle_hash2.c 2006-04-17 12:23:38 UTC (rev 15102) +++ branches/SAMBA_3_0/source/smbd/mangle_hash2.c 2006-04-17 12:27:35 UTC (rev 15103) @@ -101,7 +101,7 @@ hashing the resulting cache entry to match the known hash */ static char **prefix_cache; -static uint32 *prefix_cache_hashes; +static u32 *prefix_cache_hashes; /* these are the characters we use in the 8.3 hash. Must be 36 chars long */ static const char *basechars = 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ; @@ -119,10 +119,10 @@ this hash needs to be fast with a low collision rate (what hash doesn't?) */ -static uint32 mangle_hash(const char *key, unsigned int length) +static u32 mangle_hash(const char *key, unsigned int length) { - uint32 value; - uint32 i; + u32 value; + u32 i; fstring str; /* we have to uppercase here to ensure that the mangled name @@ -139,8 +139,8 @@ /* Set the initial value from the key size. */ for (value = FNV1_INIT, i=0; i length; i++) { -value *= (uint32)FNV1_PRIME; -value ^= (uint32)(str[i]); +value *= (u32)FNV1_PRIME; +value ^= (u32)(str[i]); } /* note that we force it to a 31 bit hash, to keep within the limits @@ -162,7 +162,7 @@ return False; } - prefix_cache_hashes = SMB_CALLOC_ARRAY(uint32, MANGLE_CACHE_SIZE); + prefix_cache_hashes = SMB_CALLOC_ARRAY(u32, MANGLE_CACHE_SIZE); if (!prefix_cache_hashes) { return False; } @@ -173,7 +173,7 @@ /* insert an entry into the prefix cache. The string might not be null terminated */ -static void cache_insert(const char *prefix, int length, uint32 hash) +static void cache_insert(const char *prefix, int length, u32 hash) { int i = hash % MANGLE_CACHE_SIZE; @@ -188,7 +188,7 @@ /* lookup an entry in the prefix cache. Return NULL if not found. */ -static const char *cache_lookup(uint32 hash) +static const char *cache_lookup(u32 hash) { int i = hash % MANGLE_CACHE_SIZE; @@ -372,7 +372,7 @@ */ static BOOL check_cache(char *name, size_t maxlen, int snum) { - uint32 hash, multiplier; + u32 hash, multiplier; unsigned int i; const char *prefix; char extension[4]; @@ -386,7 +386,7 @@ /* we need to extract the hash from the 8.3 name */ hash = base_reverse[(unsigned char)name[7]]; for (multiplier=36, i=5;i=mangle_prefix;i--) { - uint32 v = base_reverse[(unsigned char)name[i]]; + u32 v = base_reverse[(unsigned char)name[i]]; hash += multiplier * v; multiplier *= 36; } @@ -517,7 +517,7 @@ char extension[4]; unsigned int extension_length, i; unsigned int prefix_len; - uint32 hash, v; + u32 hash, v; char new_name[13]; /* reserved names are handled specially */ Modified: branches/SAMBA_3_0/source/smbd/statcache.c === --- branches/SAMBA_3_0/source/smbd/statcache.c 2006-04-17 12:23:38 UTC (rev 15102) +++ branches/SAMBA_3_0/source/smbd/statcache.c 2006-04-17 12:27:35 UTC (rev 15103) @@ -291,12 +291,12 @@ JRA. Use a djb-algorithm hash for speed. ***/ -uint32 fast_string_hash(TDB_DATA *key) +u32 fast_string_hash(TDB_DATA *key) { -uint32 n = 0; +u32 n = 0; const char *p; for (p = key-dptr; *p != '\0'; p++) { -n = ((n 5) + n) ^ (uint32)(*p); +n = ((n 5) + n) ^ (u32)(*p); } return n; } Modified: trunk/source/smbd/mangle_hash2.c === --- trunk/source/smbd/mangle_hash2.c2006-04-17 12:23:38 UTC (rev 15102) +++ trunk/source/smbd/mangle_hash2.c2006-04-17 12:27:35 UTC (rev 15103) @@ -101,7 +101,7 @@ hashing the resulting cache entry to match the known hash */ static char **prefix_cache; -static uint32 *prefix_cache_hashes; +static u32 *prefix_cache_hashes; /* these are the
svn commit: samba r15104 - branches/SAMBA_3_0/source/registry branches/SAMBA_3_0/source/tdb trunk/source/registry trunk/source/tdb
Author: vlendec Date: 2006-04-17 13:06:57 + (Mon, 17 Apr 2006) New Revision: 15104 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15104 Log: Implement Samba4's tdb_name(). Volker Modified: branches/SAMBA_3_0/source/registry/reg_perfcount.c branches/SAMBA_3_0/source/tdb/tdbutil.c trunk/source/registry/reg_perfcount.c trunk/source/tdb/tdbutil.c Changeset: Modified: branches/SAMBA_3_0/source/registry/reg_perfcount.c === --- branches/SAMBA_3_0/source/registry/reg_perfcount.c 2006-04-17 12:27:35 UTC (rev 15103) +++ branches/SAMBA_3_0/source/registry/reg_perfcount.c 2006-04-17 13:06:57 UTC (rev 15104) @@ -172,7 +172,7 @@ /* If a key isn't there, just bypass it -- this really shouldn't happen unless someone's mucking around with the tdb */ DEBUG(3, (_reg_perfcount_multi_sz_from_tdb: failed to find key [%s] in [%s].\n, - temp, tdb-name)); + temp, tdb_name(tdb))); return buffer_size; } /* First encode the name_index */ Modified: branches/SAMBA_3_0/source/tdb/tdbutil.c === --- branches/SAMBA_3_0/source/tdb/tdbutil.c 2006-04-17 12:27:35 UTC (rev 15103) +++ branches/SAMBA_3_0/source/tdb/tdbutil.c 2006-04-17 13:06:57 UTC (rev 15104) @@ -805,6 +805,14 @@ return tdb; } +/ + return the name of the current tdb file useful for external logging + functions +/ +const char *tdb_name(struct tdb_context *tdb) +{ + return tdb-name; +} / Allow tdb_delete to be used as a tdb_traversal_fn. Modified: trunk/source/registry/reg_perfcount.c === --- trunk/source/registry/reg_perfcount.c 2006-04-17 12:27:35 UTC (rev 15103) +++ trunk/source/registry/reg_perfcount.c 2006-04-17 13:06:57 UTC (rev 15104) @@ -172,7 +172,7 @@ /* If a key isn't there, just bypass it -- this really shouldn't happen unless someone's mucking around with the tdb */ DEBUG(3, (_reg_perfcount_multi_sz_from_tdb: failed to find key [%s] in [%s].\n, - temp, tdb-name)); + temp, tdb_name(tdb))); return buffer_size; } /* First encode the name_index */ Modified: trunk/source/tdb/tdbutil.c === --- trunk/source/tdb/tdbutil.c 2006-04-17 12:27:35 UTC (rev 15103) +++ trunk/source/tdb/tdbutil.c 2006-04-17 13:06:57 UTC (rev 15104) @@ -805,6 +805,14 @@ return tdb; } +/ + return the name of the current tdb file useful for external logging + functions +/ +const char *tdb_name(struct tdb_context *tdb) +{ + return tdb-name; +} / Allow tdb_delete to be used as a tdb_traversal_fn.
svn commit: samba r15105 - in trunk/source: . include nsswitch smbd tdb utils
Author: vlendec Date: 2006-04-17 15:07:23 + (Mon, 17 Apr 2006) New Revision: 15105 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15105 Log: This is a backport of the samba4 tdb implementation to samba3. I did one change to samba4's tdb: Samba4's TDB_DATA has an 'unsigned char *' as buffer pointer, Samba3 has 'char *'. While 'unsigned char' is probably more correct, this creates a ton of warnings in Samba3. So I changed that. We might go through that later. I did some basic tests, 'make test' works. Lets see how Coverity likes this :-) Volker Added: trunk/source/tdb/dump.c trunk/source/tdb/error.c trunk/source/tdb/freelist.c trunk/source/tdb/io.c trunk/source/tdb/lock.c trunk/source/tdb/open.c trunk/source/tdb/tdb_private.h trunk/source/tdb/transaction.c trunk/source/tdb/traverse.c Removed: trunk/source/tdb/spinlock.c trunk/source/tdb/spinlock.h Modified: trunk/source/Makefile.in trunk/source/include/includes.h trunk/source/include/smb.h trunk/source/nsswitch/winbindd_cache.c trunk/source/nsswitch/winbindd_util.c trunk/source/smbd/mangle_hash2.c trunk/source/smbd/statcache.c trunk/source/tdb/tdb.c trunk/source/tdb/tdb.h trunk/source/tdb/tdbback.c trunk/source/tdb/tdbutil.c trunk/source/tdb/tdbutil.h trunk/source/utils/smbcontrol.c Changeset: Sorry, the patch is too large (6657 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15105
svn commit: samba r15106 - in trunk/source/nsswitch: .
Author: jra Date: 2006-04-17 17:16:35 + (Mon, 17 Apr 2006) New Revision: 15106 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15106 Log: 64 bit fixes. size_t on a 64-bit box is not uint32. Jeremy. Modified: trunk/source/nsswitch/winbindd_group.c Changeset: Modified: trunk/source/nsswitch/winbindd_group.c === --- trunk/source/nsswitch/winbindd_group.c 2006-04-17 15:07:23 UTC (rev 15105) +++ trunk/source/nsswitch/winbindd_group.c 2006-04-17 17:16:35 UTC (rev 15106) @@ -208,6 +208,7 @@ fstring name_domain, name_group; char *tmp, *gr_mem; size_t gr_mem_len; + size_t num_gr_mem; gid_t gid; union unid_t id; NTSTATUS status; @@ -311,12 +312,14 @@ if (!fill_grent(state-response.data.gr, name_domain, name_group, gid) || !fill_grent_mem(domain, group_sid, name_type, - state-response.data.gr.num_gr_mem, + num_gr_mem, gr_mem, gr_mem_len)) { request_error(state); return; } + state-response.data.gr.num_gr_mem = (uint32)num_gr_mem; + /* Group membership lives at start of extra data */ state-response.data.gr.gr_mem_ofs = 0; @@ -336,6 +339,7 @@ fstring dom_name; fstring group_name; size_t gr_mem_len; + size_t num_gr_mem; char *gr_mem; NTSTATUS status; @@ -405,12 +409,14 @@ if (!fill_grent(state-response.data.gr, dom_name, group_name, state-request.data.gid) || !fill_grent_mem(domain, group_sid, name_type, - state-response.data.gr.num_gr_mem, + num_gr_mem, gr_mem, gr_mem_len)) { request_error(state); return; } + state-response.data.gr.num_gr_mem = (uint32)num_gr_mem; + /* Group membership lives at start of extra data */ state-response.data.gr.gr_mem_ofs = 0; @@ -756,6 +762,7 @@ /* Fill in group membership entry */ if (result) { + size_t num_gr_mem = 0; DOM_SID member_sid; group_list[group_list_ndx].num_gr_mem = 0; gr_mem = NULL; @@ -771,8 +778,10 @@ domain, member_sid, SID_NAME_DOM_GRP, - group_list[group_list_ndx].num_gr_mem, + num_gr_mem, gr_mem, gr_mem_len); + + group_list[group_list_ndx].num_gr_mem = (uint32)num_gr_mem; } }
svn commit: samba r15107 - in branches/SAMBA_3_0/source/nsswitch: .
Author: jra Date: 2006-04-17 17:16:46 + (Mon, 17 Apr 2006) New Revision: 15107 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15107 Log: 64 bit fixes. size_t on a 64-bit box is not uint32. Jeremy. Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_group.c Changeset: Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_group.c === --- branches/SAMBA_3_0/source/nsswitch/winbindd_group.c 2006-04-17 17:16:35 UTC (rev 15106) +++ branches/SAMBA_3_0/source/nsswitch/winbindd_group.c 2006-04-17 17:16:46 UTC (rev 15107) @@ -208,6 +208,7 @@ fstring name_domain, name_group; char *tmp, *gr_mem; size_t gr_mem_len; + size_t num_gr_mem; gid_t gid; union unid_t id; NTSTATUS status; @@ -311,12 +312,14 @@ if (!fill_grent(state-response.data.gr, name_domain, name_group, gid) || !fill_grent_mem(domain, group_sid, name_type, - state-response.data.gr.num_gr_mem, + num_gr_mem, gr_mem, gr_mem_len)) { request_error(state); return; } + state-response.data.gr.num_gr_mem = (uint32)num_gr_mem; + /* Group membership lives at start of extra data */ state-response.data.gr.gr_mem_ofs = 0; @@ -336,6 +339,7 @@ fstring dom_name; fstring group_name; size_t gr_mem_len; + size_t num_gr_mem; char *gr_mem; NTSTATUS status; @@ -405,12 +409,14 @@ if (!fill_grent(state-response.data.gr, dom_name, group_name, state-request.data.gid) || !fill_grent_mem(domain, group_sid, name_type, - state-response.data.gr.num_gr_mem, + num_gr_mem, gr_mem, gr_mem_len)) { request_error(state); return; } + state-response.data.gr.num_gr_mem = (uint32)num_gr_mem; + /* Group membership lives at start of extra data */ state-response.data.gr.gr_mem_ofs = 0; @@ -756,6 +762,7 @@ /* Fill in group membership entry */ if (result) { + size_t num_gr_mem = 0; DOM_SID member_sid; group_list[group_list_ndx].num_gr_mem = 0; gr_mem = NULL; @@ -771,8 +778,10 @@ domain, member_sid, SID_NAME_DOM_GRP, - group_list[group_list_ndx].num_gr_mem, + num_gr_mem, gr_mem, gr_mem_len); + + group_list[group_list_ndx].num_gr_mem = (uint32)num_gr_mem; } }
svn commit: samba r15108 - in trunk/source: passdb tdb
Author: vlendec Date: 2006-04-17 17:56:57 + (Mon, 17 Apr 2006) New Revision: 15108 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15108 Log: Implement tdb_trans_store() and use it in secrets_store(). Tridge, did I use the transaction stuff right in tdb_trans_store? Thanks, Volker Modified: trunk/source/passdb/secrets.c trunk/source/tdb/tdbutil.c Changeset: Modified: trunk/source/passdb/secrets.c === --- trunk/source/passdb/secrets.c 2006-04-17 17:16:46 UTC (rev 15107) +++ trunk/source/passdb/secrets.c 2006-04-17 17:56:57 UTC (rev 15108) @@ -104,8 +104,8 @@ secrets_init(); if (!tdb) return False; - return tdb_store(tdb, string_tdb_data(key), make_tdb_data(data, size), -TDB_REPLACE) == 0; + return tdb_trans_store(tdb, string_tdb_data(key), + make_tdb_data(data, size), TDB_REPLACE) == 0; } Modified: trunk/source/tdb/tdbutil.c === --- trunk/source/tdb/tdbutil.c 2006-04-17 17:16:46 UTC (rev 15107) +++ trunk/source/tdb/tdbutil.c 2006-04-17 17:56:57 UTC (rev 15108) @@ -907,3 +907,32 @@ return tdb-flags; } +/ + tdb_store, wrapped in a transaction. This way we make sure that a process + that dies within writing does not leave a corrupt tdb behind. +/ + +int tdb_trans_store(struct tdb_context *tdb, TDB_DATA key, TDB_DATA dbuf, + int flag) +{ + int res; + + if ((res = tdb_transaction_start(tdb)) != 0) { + DEBUG(5, (tdb_transaction_start failed\n)); + return res; + } + + if ((res = tdb_store(tdb, key, dbuf, flag)) != 0) { + DEBUG(10, (tdb_store failed\n)); + if (tdb_transaction_cancel(tdb) != 0) { + smb_panic(Cancelling transaction failed\n); + } + return res; + } + + if ((res = tdb_transaction_commit(tdb)) != 0) { + DEBUG(5, (tdb_transaction_commit failed\n)); + } + + return res; +}
svn commit: samba r15109 - in branches/SAMBA_4_0/source/lib/ldb/swig: .
Author: tpot Date: 2006-04-17 21:59:44 + (Mon, 17 Apr 2006) New Revision: 15109 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15109 Log: Wrap ldb_global_init() Modified: branches/SAMBA_4_0/source/lib/ldb/swig/ldb.i Changeset: Modified: branches/SAMBA_4_0/source/lib/ldb/swig/ldb.i === --- branches/SAMBA_4_0/source/lib/ldb/swig/ldb.i2006-04-17 17:56:57 UTC (rev 15108) +++ branches/SAMBA_4_0/source/lib/ldb/swig/ldb.i2006-04-17 21:59:44 UTC (rev 15109) @@ -199,6 +199,8 @@ * Wrap ldb functions */ +int ldb_global_init(void); + struct ldb_context *ldb_init(TALLOC_CTX *mem_ctx); const char *ldb_errstring(struct ldb_context *ldb);
svn commit: samba r15110 - in branches/SAMBA_4_0/source/lib/ldb/swig: .
Author: tpot Date: 2006-04-17 22:00:30 + (Mon, 17 Apr 2006) New Revision: 15110 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15110 Log: Start rewriting higher level ldb wrapper. Modified: branches/SAMBA_4_0/source/lib/ldb/swig/Ldb.py Changeset: Modified: branches/SAMBA_4_0/source/lib/ldb/swig/Ldb.py === --- branches/SAMBA_4_0/source/lib/ldb/swig/Ldb.py 2006-04-17 21:59:44 UTC (rev 15109) +++ branches/SAMBA_4_0/source/lib/ldb/swig/Ldb.py 2006-04-17 22:00:30 UTC (rev 15110) @@ -20,73 +20,71 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # -import ldb +from ldb import * +ldb_global_init() + class LdbError(Exception): An exception raised when a ldb error occurs. pass -class LdbElement: -A class representing a ldb element as an array of values. - -def __init__(self, elt): -self.name = elt.name -self.flags = elt.flags -self.values = [ldb.ldb_val_array_getitem(elt.values, x) - for x in range(elt.num_values)] - -def __repr__(self): -return '%s(name=%s) instance at 0x%x' % (self.__class__.__name__, - `self.name`, id(self)) - -def __len__(self): -return self.values.len() - -def __getitem__(self, key): -return self.values[key] - class LdbMessage: -A class representing a ldb message as a dict of ldb elements. +A class representing a ldb message as a Python dictionary. def __init__(self, msg = None): -self.dn = None -self.private_data = None -self.elements = [] +self._msg = msg +if self._msg is None: +self._msg = ldb_msg_new(None) -if msg is not None: -self.dn = msg.dn -self.private_data = msg.private_data -eltlist = \ -[LdbElement(ldb.ldb_message_element_array_getitem( -msg.elements, x)) - for x in range(msg.num_elements)] -self.elements = dict([(x.name, x) for x in eltlist]) +def __del__(self): +talloc_free(self._msg) -def __repr__(self): -return '%s(dn=%s) instance at 0x%x' % (self.__class__.__name__, - `self.dn`, id(self)) +def len(self): +return self._msg.num_elements def __getitem__(self, key): -return self.elements[key] +elt = ldb_msg_find_element(self._msg, key) +if elt is None: +raise KeyError, No such attribute '%s' % key +return [ldb_val_array_getitem(elt.values, i) +for i in range(elt.num_values)] -def keys(self): -return self.elements.keys() - +def __setitem__(self, key, value): +result = ldb_msg_add_value(self._msg, key, str(value)) +if result != LDB_SUCCESS: +raise LdbError, (result, ldb.strerror(result)) + class Ldb: A class representing a binding to a ldb file. -def __init__(self): -self.mem_ctx = ldb.talloc_init('python ldb') -self.ldb_ctx = ldb.init(self.mem_ctx) +def __init__(self, url, flags = 0): +Initialise underlying ldb. + +self.mem_ctx = talloc_init('mem_ctx for ldb 0x%x' % id(self)) +self.ldb_ctx = ldb_init(self.mem_ctx) + +result = ldb_connect(self.ldb_ctx, url, flags, None) + +if result != LDB_SUCCESS: +raise ldbError, (result, ldb.strerror(result)) def __del__(self): ldb.talloc_free(self.mem_ctx) +self.mem_ctx = None +self.ldb_ctx = None -def connect(self, url, flags = 0): -ldb.connect(self.ldb_ctx, url, flags, None) +def _ldb_call(self, fn, *args): +Call a ldb function with args. Raise a LdbError exception +if the function returns a non-zero return value. + +result = fn(*args) +if result != ldb.LDB_SUCCESS: +raise LdbError, (result, ldb.strerror(result)) + def search(self, expression): +Search a ldb for a given expression. self._ldb_call(ldb.search, self.ldb_ctx, None, ldb.LDB_SCOPE_DEFAULT, expression, None); @@ -94,16 +92,20 @@ return [LdbMessage(ldb.ldb_message_ptr_array_getitem(result.msgs, ndx)) for ndx in range(result.count)] -def _ldb_call(self, fn, *args): -result = fn(*args) -if result != ldb.LDB_SUCCESS: -raise LdbError, (result, ldb.strerror(result)) - def delete(self, dn): -self._ldb_call(ldb.delete, self.ldb_ctx, dn) +Delete a dn. +_dn = ldb_dn_explode(self.ldb_ctx, dn) + +self._ldb_call(ldb.delete, self.ldb_ctx, _dn) + def rename(self, olddn, newdn): -self._ldb_call(ldb.rename, self.ldb_ctx, olddn, newdn) +Rename a dn. + +
svn commit: samba r15111 - in trunk/source: param smbd
Author: jra Date: 2006-04-17 22:32:35 + (Mon, 17 Apr 2006) New Revision: 15111 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15111 Log: Move strict locking default to auto. Fix up the error return for one of the Samba4 torture tests. Jeremy. Modified: trunk/source/param/loadparm.c trunk/source/smbd/reply.c Changeset: Modified: trunk/source/param/loadparm.c === --- trunk/source/param/loadparm.c 2006-04-17 22:00:30 UTC (rev 15110) +++ trunk/source/param/loadparm.c 2006-04-17 22:32:35 UTC (rev 15111) @@ -551,7 +551,7 @@ False, /* bStoreDosAttributes */ False, /* bDmapiSupport */ True, /* bLocking */ - True, /* iStrictLocking */ + Auto, /* iStrictLocking */ True, /* bPosixLocking */ True, /* bShareModes */ True, /* bOpLocks */ Modified: trunk/source/smbd/reply.c === --- trunk/source/smbd/reply.c 2006-04-17 22:00:30 UTC (rev 15110) +++ trunk/source/smbd/reply.c 2006-04-17 22:32:35 UTC (rev 15111) @@ -5221,7 +5221,7 @@ /* we don't support these - and CANCEL_LOCK makes w2k and XP reboot so I don't really want to be compatible! (tridge) */ - return ERROR_DOS(ERRDOS, ERRnoatomiclocks); + return ERROR_FORCE_DOS(ERRDOS, ERRnoatomiclocks); } if (locktype LOCKING_ANDX_CANCEL_LOCK) {
svn commit: samba r15112 - in branches/SAMBA_3_0/source: param smbd
Author: jra Date: 2006-04-17 22:32:38 + (Mon, 17 Apr 2006) New Revision: 15112 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15112 Log: Move strict locking default to auto. Fix up the error return for one of the Samba4 torture tests. Jeremy. Modified: branches/SAMBA_3_0/source/param/loadparm.c branches/SAMBA_3_0/source/smbd/reply.c Changeset: Modified: branches/SAMBA_3_0/source/param/loadparm.c === --- branches/SAMBA_3_0/source/param/loadparm.c 2006-04-17 22:32:35 UTC (rev 15111) +++ branches/SAMBA_3_0/source/param/loadparm.c 2006-04-17 22:32:38 UTC (rev 15112) @@ -551,7 +551,7 @@ False, /* bStoreDosAttributes */ False, /* bDmapiSupport */ True, /* bLocking */ - True, /* iStrictLocking */ + Auto, /* iStrictLocking */ True, /* bPosixLocking */ True, /* bShareModes */ True, /* bOpLocks */ Modified: branches/SAMBA_3_0/source/smbd/reply.c === --- branches/SAMBA_3_0/source/smbd/reply.c 2006-04-17 22:32:35 UTC (rev 15111) +++ branches/SAMBA_3_0/source/smbd/reply.c 2006-04-17 22:32:38 UTC (rev 15112) @@ -5221,7 +5221,7 @@ /* we don't support these - and CANCEL_LOCK makes w2k and XP reboot so I don't really want to be compatible! (tridge) */ - return ERROR_DOS(ERRDOS, ERRnoatomiclocks); + return ERROR_FORCE_DOS(ERRDOS, ERRnoatomiclocks); } if (locktype LOCKING_ANDX_CANCEL_LOCK) {
svn commit: samba-docs r936 - in trunk/smbdotconf/locking: .
Author: jra Date: 2006-04-17 22:35:57 + (Mon, 17 Apr 2006) New Revision: 936 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=samba-docsrev=936 Log: Document default change from yes to auto. Jeremy. Modified: trunk/smbdotconf/locking/strictlocking.xml Changeset: Modified: trunk/smbdotconf/locking/strictlocking.xml === --- trunk/smbdotconf/locking/strictlocking.xml 2006-04-03 10:08:54 UTC (rev 935) +++ trunk/smbdotconf/locking/strictlocking.xml 2006-04-17 22:35:57 UTC (rev 936) @@ -1,22 +1,29 @@ samba:parameter name=strict locking context=S -type=boolean +type=enum xmlns:samba=http://www.samba.org/samba/DTD/samba-doc; description para - This is a boolean that controls the handling of file locking in the server. When this is set to constantyes/constant, + This is an enumberated type that controls the handling of file locking in the server. When this is set to constantyes/constant, the server will check every read and write access for file locks, and deny access if locks exist. This can be slow on some systems. /para para + When strict locking is set to Auto (the default), the server performs file lock checks only on non-oplocked files. + As most Windows redirectors perform file locking checks locally on oplocked files this is a good trade off for + inproved performance. + /para + + para When strict locking is disabled, the server performs file lock checks only when the client explicitly asks for them. /para para Well-behaved clients always ask for lock checks when it is important. So in the vast majority of cases, + command moreinfo=nonestrict locking = Auto/command or command moreinfo=nonestrict locking = no/command is acceptable. /para /description -value type=defaultyes/value +value type=defaultAuto/value /samba:parameter
svn commit: samba r15113 - in branches/SAMBA_4_0/source/lib/ldb: common include
Author: tpot Date: 2006-04-17 23:25:25 + (Mon, 17 Apr 2006) New Revision: 15113 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15113 Log: Add a ldb_strerror() function. Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb.c branches/SAMBA_4_0/source/lib/ldb/include/ldb.h Changeset: Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb.c === --- branches/SAMBA_4_0/source/lib/ldb/common/ldb.c 2006-04-17 22:32:38 UTC (rev 15112) +++ branches/SAMBA_4_0/source/lib/ldb/common/ldb.c 2006-04-17 23:25:25 UTC (rev 15113) @@ -474,7 +474,102 @@ return NULL; } +/* + return a string explaining what a ldb error constant meancs +*/ +const char *ldb_strerror(int ldb_err) +{ + switch (ldb_err) { + case LDB_SUCCESS: + return Success; + case LDB_ERR_OPERATIONS_ERROR: + return Operations error; + case LDB_ERR_PROTOCOL_ERROR: + return Protocol error; + case LDB_ERR_TIME_LIMIT_EXCEEDED: + return Time limit exceeded; + case LDB_ERR_SIZE_LIMIT_EXCEEDED: + return Size limit exceeded; + case LDB_ERR_COMPARE_FALSE: + return Compare false; + case LDB_ERR_COMPARE_TRUE: + return Compare true; + case LDB_ERR_AUTH_METHOD_NOT_SUPPORTED: + return Auth method not supported; + case LDB_ERR_STRONG_AUTH_REQUIRED: + return Strong auth required; +/* 9 RESERVED */ + case LDB_ERR_REFERRAL: + return Referral error; + case LDB_ERR_ADMIN_LIMIT_EXCEEDED: + return Admin limit exceeded; + case LDB_ERR_UNSUPPORTED_CRITICAL_EXTENSION: + return Unsupported critical extension; + case LDB_ERR_CONFIDENTIALITY_REQUIRED: + return Confidentiality required; + case LDB_ERR_SASL_BIND_IN_PROGRESS: + return SASL bind in progress; + case LDB_ERR_NO_SUCH_ATTRIBUTE: + return No such attribute; + case LDB_ERR_UNDEFINED_ATTRIBUTE_TYPE: + return Undefined attribute type; + case LDB_ERR_INAPPROPRIATE_MATCHING: + return Inappropriate matching; + case LDB_ERR_CONSTRAINT_VIOLATION: + return Constraint violation; + case LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS: + return Attribute or value exists; + case LDB_ERR_INVALID_ATTRIBUTE_SYNTAX: + return Invalid attribute syntax; +/* 22-31 unused */ + case LDB_ERR_NO_SUCH_OBJECT: + return No such object; + case LDB_ERR_ALIAS_PROBLEM: + return Alias problem; + case LDB_ERR_INVALID_DN_SYNTAX: + return Invalid DN syntax; +/* 53 RESERVED */ + case LDB_ERR_ALIAS_DEREFERENCING_PROBLEM: + return Alias dereferencing problem; +/* 37-47 unused */ + case LDB_ERR_INAPPROPRIATE_AUTHENTICATION: + return Inappropriate authentication; + case LDB_ERR_INVALID_CREDENTIALS: + return Invalid credentials; + case LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS: + return insufficient access rights; + case LDB_ERR_BUSY: + return Busy; + case LDB_ERR_UNAVAILABLE: + return Unavailable; + case LDB_ERR_UNWILLING_TO_PERFORM: + return Unwilling to perform; + case LDB_ERR_LOOP_DETECT: + return Loop detect; +/* 55-63 unused */ + case LDB_ERR_NAMING_VIOLATION: + return Naming violation; + case LDB_ERR_OBJECT_CLASS_VIOLATION: + return Object class violation; + case LDB_ERR_NOT_ALLOWED_ON_NON_LEAF: + return Not allowed on non-leaf; + case LDB_ERR_NOT_ALLOWED_ON_RDN: + return Not allowed on RDN; + case LDB_ERR_ENTRY_ALREADY_EXISTS: + return Entry already exists; + case LDB_ERR_OBJECT_CLASS_MODS_PROHIBITED: + return Object class mods prohibited; +/* 70 RESERVED FOR CLDAP */ + case LDB_ERR_AFFECTS_MULTIPLE_DSAS: + return Affects multiple DSAs; +/* 72-79 unused */ + case LDB_ERR_OTHER: + return Other; + } + return Unknown error; +} + /* set backend specific opaque parameters */ Modified: branches/SAMBA_4_0/source/lib/ldb/include/ldb.h === --- branches/SAMBA_4_0/source/lib/ldb/include/ldb.h 2006-04-17 22:32:38 UTC (rev 15112) +++ branches/SAMBA_4_0/source/lib/ldb/include/ldb.h 2006-04-17 23:25:25 UTC (rev 15113) @@ -827,6 +827,11 @@ const char *ldb_errstring(struct ldb_context *ldb); /** + return a string explaining what a ldb error constant meancs +*/ +const char *ldb_strerror(int ldb_err); + +/** setup the default utf8 functions FIXME: these functions do not yet handle utf8 */
Build status as of Tue Apr 18 00:00:02 2006
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2006-04-17 00:00:04.0 + +++ /home/build/master/cache/broken_results.txt 2006-04-18 00:00:08.0 + @@ -1,17 +1,17 @@ -Build status as of Mon Apr 17 00:00:02 2006 +Build status as of Tue Apr 18 00:00:02 2006 Build counts: Tree Total Broken Panic -ccache 35 5 0 -distcc 34 4 0 -lorikeet-heimdal 32 32 0 -ppp 19 0 0 -rsync35 2 0 +ccache 7 0 0 +distcc 8 1 0 +lorikeet-heimdal 20 20 0 +ppp 17 0 0 +rsync33 9 0 samba2 0 0 samba-docs 0 0 0 -samba4 40 29 2 -samba_3_037 7 0 -smb-build28 0 0 -talloc 33 18 0 -tdb 33 3 0 +samba4 38 23 2 +samba_3_035 7 0 +smb-build27 0 0 +talloc 10 7 0 +tdb 31 3 0
svn commit: samba r15114 - in trunk/source/smbd: .
Author: jra Date: 2006-04-18 03:44:55 + (Tue, 18 Apr 2006) New Revision: 15114 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15114 Log: Fix error return on sessionsetup. Ensure no data blob is added if the logon call failed. Jeremy. Modified: trunk/source/smbd/sesssetup.c Changeset: Modified: trunk/source/smbd/sesssetup.c === --- trunk/source/smbd/sesssetup.c 2006-04-17 23:25:25 UTC (rev 15113) +++ trunk/source/smbd/sesssetup.c 2006-04-18 03:44:55 UTC (rev 15114) @@ -95,21 +95,25 @@ { char *p; - set_message(outbuf,4,0,True); + if (!NT_STATUS_IS_OK(nt_status) !NT_STATUS_EQUAL(nt_status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { + ERROR_NT(nt_status); + } else { + set_message(outbuf,4,0,True); - nt_status = nt_status_squash(nt_status); - SIVAL(outbuf, smb_rcls, NT_STATUS_V(nt_status)); - SSVAL(outbuf, smb_vwv0, 0xFF); /* no chaining possible */ - SSVAL(outbuf, smb_vwv3, blob.length); - p = smb_buf(outbuf); + nt_status = nt_status_squash(nt_status); + SIVAL(outbuf, smb_rcls, NT_STATUS_V(nt_status)); + SSVAL(outbuf, smb_vwv0, 0xFF); /* no chaining possible */ + SSVAL(outbuf, smb_vwv3, blob.length); + p = smb_buf(outbuf); - /* should we cap this? */ - memcpy(p, blob.data, blob.length); - p += blob.length; + /* should we cap this? */ + memcpy(p, blob.data, blob.length); + p += blob.length; - p += add_signature( outbuf, p ); + p += add_signature( outbuf, p ); - set_message_end(outbuf,p); + set_message_end(outbuf,p); + } show_msg(outbuf); return send_smb(smbd_server_fd(),outbuf);
svn commit: samba r15115 - in branches/SAMBA_3_0/source/smbd: .
Author: jra Date: 2006-04-18 03:45:09 + (Tue, 18 Apr 2006) New Revision: 15115 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=15115 Log: Fix error return on sessionsetup. Ensure no data blob is added if the logon call failed. Jeremy. Modified: branches/SAMBA_3_0/source/smbd/sesssetup.c Changeset: Modified: branches/SAMBA_3_0/source/smbd/sesssetup.c === --- branches/SAMBA_3_0/source/smbd/sesssetup.c 2006-04-18 03:44:55 UTC (rev 15114) +++ branches/SAMBA_3_0/source/smbd/sesssetup.c 2006-04-18 03:45:09 UTC (rev 15115) @@ -95,21 +95,25 @@ { char *p; - set_message(outbuf,4,0,True); + if (!NT_STATUS_IS_OK(nt_status) !NT_STATUS_EQUAL(nt_status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { + ERROR_NT(nt_status); + } else { + set_message(outbuf,4,0,True); - nt_status = nt_status_squash(nt_status); - SIVAL(outbuf, smb_rcls, NT_STATUS_V(nt_status)); - SSVAL(outbuf, smb_vwv0, 0xFF); /* no chaining possible */ - SSVAL(outbuf, smb_vwv3, blob.length); - p = smb_buf(outbuf); + nt_status = nt_status_squash(nt_status); + SIVAL(outbuf, smb_rcls, NT_STATUS_V(nt_status)); + SSVAL(outbuf, smb_vwv0, 0xFF); /* no chaining possible */ + SSVAL(outbuf, smb_vwv3, blob.length); + p = smb_buf(outbuf); - /* should we cap this? */ - memcpy(p, blob.data, blob.length); - p += blob.length; + /* should we cap this? */ + memcpy(p, blob.data, blob.length); + p += blob.length; - p += add_signature( outbuf, p ); + p += add_signature( outbuf, p ); - set_message_end(outbuf,p); + set_message_end(outbuf,p); + } show_msg(outbuf); return send_smb(smbd_server_fd(),outbuf);