[Samba] Problem with samba 3.0.14a-3sarge9 on Debian Sarge
Hi list. My box is a Debian Sarge with samba 3.0.14a-3sarge4. I created many shares for a Windows network, and everything has been working with no flaw. The filesystem is Reiser. After I upgraded to 3.0.14a-3sarge9, I observed a strange behaviour with no apparent explanation. One of shared folders is fed with PDF obtained by scanning documents. Yesterday one user clained that somebody deleted a part of these files. When I tried to restore the folder from a backup, I had that: - files seems to be copied correctly on the samba share (at least I can see them with an ls command on the server console); - from a windows machine, I can see only a subset of them. I tried to copy this list with scp, smb but the outcome is always the same. After a bit of panic, I downgraded back to 3.0.14a-3sarge4 and the problem disappeared. Did anybody experience strangeness like that? Regards -- Alessandro -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] help me (log.nmbd is to big)
Hi everyone. I am used slackware version 12, and kernel version 2.6.23.8. My samba server verison 3.0.25b. server running the log.nmbd file recoder the mesage repeatedly like this. 2007/11/29 15:26:01, 0] nmbd/nmbd.c:main(697) Netbios nameserver version 3.0.27a started. Copyright Andrew Tridgell and the Samba Team 1992-2007 [2007/11/29 15:26:01, 0] /usr/src/samba-3.0.27a/source/lib/pidfile.c:pidfile_create(112) ERROR: nmbd is already running. File /usr/local/samba/var/locks/nmbd.pid exists and process id 5664 is running. the log.nmbdfile increase to 800MB in 8 hours. how can i soluteion this problems? thanks. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] help me (log.nmbd is to big)
Jimmy wrote: Hi everyone. I am used slackware version 12, and kernel version 2.6.23.8. My samba server verison 3.0.25b. server running the log.nmbd file recoder the mesage repeatedly like this. 2007/11/29 15:26:01, 0] nmbd/nmbd.c:main(697) Netbios nameserver version 3.0.27a started. Copyright Andrew Tridgell and the Samba Team 1992-2007 [2007/11/29 15:26:01, 0] /usr/src/samba-3.0.27a/source/lib/pidfile.c:pidfile_create(112) ERROR: nmbd is already running. File /usr/local/samba/var/locks/nmbd.pid exists and process id 5664 is running. the log.nmbdfile increase to 800MB in 8 hours. how can i soluteion this problems? thanks. You have mentioned that your samba version is 3.0.25b and if you see the errors it talking about 3.0.27a , check at this point, this can helpful while troubleshooting. Is it that you have a samba rpm installed and other samba compiled from source in /usr/src/samba-3.0.27a. Kaustubh. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Mount point of Samba Share
Vijay Thakur wrote: Dear Friends, I have a running Samba Server on OpenSuse 10.3. On the client side i am accessing these samba share by using: nautilus -- File -- Connect to server. After filling the information in the dialog boxes i am able to access the shared files and folder. The share name is visible in the one side of the pane. What when i am trying to attach a file to my e-mails reside on samba server then the share location is not accessible. Will any body tell me that where is mount point of the share. This is urgent, Vijay Thakur Chandigarh - Get the freedom to save as many mails as you wish. Click here to know how. Hi Vijay, First mount your samba share on your system and than try to access it while sending mail. # mount -t cifs //servername/share /mnt provide username and password if required. Hope this helps, Kaustubh. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Problem with samba 3.0.14a-3sarge9 on Debian Sarge
Alessandro FAGLIA wrote: After I upgraded to 3.0.14a-3sarge9, I observed a strange behaviour with no apparent explanation. Perhaps this link could be helpful: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=453050 -- Kind regards, Marco Romano. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Copy file from Vista to samba share
Hi, my Vista box does hang if I try to copy an File on an Samba share. - Hanging does happen on both, explorer and CMD. In Explorer it shows up to calculate how long it might take. In CMD nothing happend. - Afterwards Vista refuses to shut down. - Creating an File on the Share and saving it from within notepad does not cause any trouble. - Limiting protocol to lanman2 seems to help regarding the hangup. But it is raising other problems (Long Filenames on Win98 clients, Domain Login). - The problem did occur on two 32Bit Athlon machines. On another Machine equipped with Athlon 64 (running 64 Bit Linux) the hanging seems not to reproduce. With identical smb.conf hanging does reproduce on 32Bit host. - I'm using Debian Linux (Lenny / SID) with Samba 3.0.26a/3.0.27a. I did move to 3.1-pre1 and 4.0-alpha1 but both did not help - I did run with several 32Bit Linux-Kernels: 2.6.22-3-k7 (binary from Debian) 2.6.14 (from source) 2.6.19.7 (from source) What can be done ho resolve this problem? Elmar -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Point-and-Print driver problems with unprivileged users on XP
Hi, Am Montag, den 26.11.2007, 23:50 +0100 schrieb Marcus Sobchak : I've problems to install printer drivers as a normal user with unprivileged rights on WinXP in a samba 3.0.24 domain (debian etch) using the Point-and-Print mechanism. I've read Volker Lendecke's Samba book on page 131 footnote 1, which mention to enable point and print. Which reg keys do I have to set to install drivers by Point and Print? I've set keys like described in http://support.microsoft.com/kb/319939/en but this does not work? Installing the drives from the print$ share working as domain admin works works fine. Therefore I think, I've forgotten to set some rights on the local XP machine. I disabled point and print restriction. Don't want to send an exported reg key to the list. See attached screeenshot. Ciao! Marcus -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Mount point of Samba Share
Vijay Thakur wrote: Kaustubh, what will be command syntax if i want to mount a smb share permanently in /etc/fstab with RW mode to a user = abc and password=12345678 on the domain=documents Check this : http://kbase.redhat.com/faq/FAQ_71_3420.shtm I have tried t mount it in may ways but all in vain. Please help,, I am stuck. */Kaustubh Chaudhari [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]/* wrote: Vijay Thakur wrote: Dear Friends, I have a running Samba Server on OpenSuse 10.3. On the client side i am accessing these samba share by using: nautilus -- File -- Connect to server. After filling the information in the dialog boxes i am able to access the shared files and folder. The share name is visible in the one side of the pane. What when i am trying to attach a file to my e-mails reside on samba server then the share location is not accessible. Will any body tell me that where is mount point of the share. This is urgent, Vijay Thakur Chandigarh - Get the freedom to save as many mails as you wish. Click here to know how. Hi Vijay, First mount your samba share on your system and than try to access it while sending mail. # mount -t cifs //servername/share /mnt provide username and password if required. Hope this helps, Kaustubh. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] access to samba shares through the web
Marcus Sobchak [EMAIL PROTECTED] wrote: Hi, I'm looking for a good and stable webclient to access to my samba share through a webinterface. I found SSLBridge Samba Web Client [1]. Any experiences with this software or other ideas? Ciao! Marcus [1] http://sourceforge.net/projects/sbrdg/ hey cool i was not aware about web client, this seems to be good, i will do some rnd on this tonight kaustubh -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] map to guest in share definition?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Apparently not. Much more importantly is the first line of the man page on this subject: map to guest (G) This parameter is only useful in SECURITY = security modes other than security = share - i.e. user, server, and domain. This parameter can take four different values, which tell smbd(8) what to do with user login requests that don't match a valid UNIX user in some way. The (G) signifies a global parameter. It appears as if I was mixing up my use of map to guest (which I have set to bad user), and my combining that directive with guest ok and guest only, which I'm guessing would do everything you wanted. In my case, we have a share that we want to work regardless of valid login information. [homes] obviously will not work if the user does not exist. We also do IP range restrictions. Is there some special case that is not covered by all of that? Michael Heydon wrote: Are you sure about this? From the smb.conf man page: Note that this parameter is needed to set up Guest share services when using security modes other than share. This is because in these modes the name of the resource being requested is not sent to the server until after the server has successfully authenticated the client so the server cannot make authentication decisions at the correct time (connection to the share) for Guest shares. From that it sounds like the authentication must be 100% complete before the client can specify which share it is after, how could it decide whether or not the authentication request passes if each share has different rules for what is acceptable? *Michael Heydon - IT Administrator * [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Ryan Novosielski wrote: Yes, you can. Tim Bates wrote: Is it possible to use map to guest in a single share? We have 2 or 3 shares where I want this behavior, but for most I would like to not use it due to issues with home directories with bad users. I would simply try moving that line to a share definition to see what happens, but I don't want to break a live server to test (and have no spare Samba boxes right now). Tim B ** This message is intended for the addressee named and may contain privileged information or confidential information or both. If you are not the intended recipient please delete it and notify the sender. ** - -- _ _ _ _ ___ _ _ _ |Y#| | | |\/| | \ |\ | | |Ryan Novosielski - Systems Programmer II |$| |__| | | |__/ | \| _| |[EMAIL PROTECTED] - 973/972.0922 (2-0922) \__/ Univ. of Med. and Dent.|IST/AST - NJMS Medical Science Bldg - C630 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHTtXpmb+gadEcsb4RAvUvAKC+7K1FyuUML2OJyjU11RMeBHkXLwCgwCQW vbCaln9ysqCIKyYU+fo0efc= =lXfv -END 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] Change in smbclient between 3.0.24 and 3.0.25c breaks third party app
Can you track this down to a particular checkin? Now that we have everything in git, git bisect might tremendously help with it. Found the erroneous commit after lots of git-bisect'ing. Unfortunately it is a pull from svn, but from there it should be fairly easy to find: commit 651d5a89c59c107c05e789358624058e16af1b66 Author: Gerald Carter [EMAIL PROTECTED] Date: Tue Mar 20 16:56:16 2007 + r21889: * Pull from SAMBA-3_0_25 svn r21888 * Set version to 3.0.25pre2 :100644 100644 9f67bf945de639de6e55ecce5aec79696d460b1b 2b09221efc0d980986c542cd52ef388e2cde5105 M MAINTAINERS :100644 100644 f28d1d8290ed3974b9fd01bf81ce1eed03df5359 1566a4c599f10a36a0e06d1a403295719fb22136 M WHATSNEW.txt :04 04 48a6afb139d7c9fb7cb5ef321034efad5e7c1aab 7c6dd23d4ce3ef1c75a2d60a1fb855c2b17ea688 M examples :04 04 245f7814f93158435f4296bfc00bb1911a25cdd5 39692c2da42fb9e2198c659463d7046c7056ff7b M source Also one of the bad revisions between 3.0.25pre1 and 3.0.25pre2 prints out the following warning when trying to create level2 inside of the existing level1: NT_STATUS_OBJECT_NAME_COLLISION making remote directory \level1level2 Also, when you investigate the problem please keep in mind that the bug might affect more than the folder-creation use-case. Namely, gollem cannot delete subfolders with the affected samba versions. Cheers Felix -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] SETGID not being inherited
Someone else was recently having a different problem with mount.cifs.- is it possible for you to try smbfs ? Mark. On 28 Nov 2007, at 19:35, Paul Worrall [EMAIL PROTECTED] wrote: I have exactly the same problem, and the force directory mode = 2770 does not solve it for me. I have noticed that directories created on the same share by Windows clients, smbclient on Linux and using the KDE smb: slave all inherit the setgid bit as expected, so it seems to be something specific to mount.cifs Here is the line from my /etc/fstab: //basilisk/Shared\040Documents /media/smb/shared_documents cifs guest,domain=HOME 0 0 Things I have tried: setting the nosetuids mount option (though the man page says this is the default anyway) setting the noperm mount option setting the noacl mount option Now I've run out of ideas. Any help appreciated. -- Paul On Wednesday 21 Nov 2007, Mark Adams wrote: Apologies for the blank mail, iphone misbehaving. you can use force directory mode = 2770 in each share config or globally. see http://us1.samba.org/samba/docs/man/Samba-HOWTO-Collection/AccessControls.h tml Cheers, Mark On Wed, Nov 21, 2007 at 02:30:57PM +, Mark Adams wrote: Mark. On 20 Nov 2007, at 18:57, Robert L. Harris [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have an Debian system running samba 3.0.14a from sarge. It is exporting a file system, /data. This file system has the perms 2770. I have set the following in the smb.conf: inherit permissions = yes inherit acls = yes I mount the filesystem from a linux, ubuntu, client and create a directory. The directory comes out with perms 0770. I can chmod 2770 the directory and it takes the setgid just fine. What am I missing, where, in order to have the setgid pass down to the new directories on the server properly? Robert - -- :wq! - --- --- -- --- Robert L. Harris | GPG Key ID: E344DA3B @ x-hkp://pgp.mit.edu DISCLAIMER: These are MY OPINIONS With Dreams To Be A King, ALONE. I speak for First One Should Be A Man no-one else. - Manowar -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHQy4n8+1vMONE2jsRAqF9AKCk3E8nY8pQDpkBT6I2TEj7sUc8EQCcCck1 FvQX1lHPjsRKzZNyBMMTc+s= =uDVx -END PGP SIGNATURE- -- 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 -- Paul -- 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] Problem with Samba cutting dir listings short
Hi, I have a peculiar problem with my Samba installation. I have a directory with lots of files that I want to make available via Samba. I can connect just fine, but I quickly noticed a lot of files seemed to be missing. After some testing I found out that the directory listing was simple cut off, right in the middle of a filename even. I created a test-directory with 1000 random files in another directory, and the same happens. I can access all files without trouble, if I enter them via the command line, they just don't appear in any directory listings in windows. I compared a 'dir /b' from windows with 'ls -U' on the server, and found that the listings were the same up to the cut-off point. The first 220 lines are the same. ls -U listing (fragment line 215-225): 000807_hayhujzrrpmsnqsh.txt 000484_epomsssmbnmqpvbq.txt 000132_hnabfdecadllofev.txt 000172_fbgoiudtneqxyoan.txt 000260_zoxmakggifjiailc.txt 000954_jhntvnufaxxqdozb.txt 000628_nclhlggazkibogtq.txt 000471_zoiwbgkxmiaplowr.txt 24_ljjgsfdsrnpqrypr.txt 000420_nwjxahzjeegkzcag.txt dir listing (fragment line 215-EOF): 000807_hayhujzrrpmsnqsh.txt 000484_epomsssmbnmqpvbq.txt 000132_hnabfdecadllofev.txt 000172_fbgoiudtneqxyoan.txt 000260_zoxmakggifjiailc.txt 00095 So somehow, the dir-listing gets cut-off right in the middle of '000954_jhntvnufaxxqdozb.txt'. I'm at a loss to explain this. I've tried running with log level = 3, but there were no obvious errors in the logfile. Tail attached below. Another curious thing is that both the smb.conf and the files are a copy of an older server, which always worked just fine. Any ideas? Regards, .Bobo -- my smb.conf: #=== Global Settings === [global] ## Browsing/Identification ### # Change this to the workgroup/NT-domain name your Samba server will part of workgroup = INTRONET # server string is the equivalent of the NT Description field server string = %h server (Samba %v) # Windows Internet Name Serving Support Section: # WINS Support - Tells the NMBD component of Samba to enable its WINS Server ; wins support = no # WINS Server - Tells the NMBD components of Samba to be a WINS Client # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both ; wins server = w.x.y.z # 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 = lmhosts host wins bcast Debugging/Accounting # This tells Samba to use a separate log file for each machine # that connects log file = /var/log/samba/log.%m # Put a capping on the size of the log files (in Kb). max log size = 1000 # If you want Samba to only log through syslog then set the following # parameter to 'yes'. ; syslog only = no # We want Samba to log a minimum amount of information to syslog. Everything # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log # through syslog you should set the following parameter to something higher. syslog = 0 # Do something sensible when Samba crashes: mail the admin a backtrace panic action = /usr/share/samba/panic-action %d ### Authentication ### # security = user is always a good idea. This will require a Unix account # in this server for every user accessing the server. See # /usr/share/doc/samba-doc/htmldocs/ServerType.html in the samba-doc # package for details. # security = user # You may wish to use password encryption. See the section on # 'encrypt passwords' in the smb.conf(5) manpage before enabling. encrypt passwords = true # If you are using encrypted passwords, Samba will need to know what # password database type you are using. # passdb backend = tdbsam guest obey pam restrictions = yes ; guest account = nobody invalid users = root # This boolean parameter controls whether Samba attempts to sync the Unix # password with the SMB password when the encrypted SMB password in the # passdb is changed. ; unix password sync = no # For Unix password sync to work on a Debian GNU/Linux system, the following # parameters must be set (thanks to Augustin Luton [EMAIL PROTECTED] for # sending the correct chat script for the passwd program in Debian Potato). passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n . # This boolean controls whether PAM will be used for password changes # when requested by an SMB client instead of the program listed in # 'passwd program'. The default is 'no'. ; pam password change = no ## Printing ## # If you want to automatically load your printer list rather # than setting them up individually then you'll need this ; load printers = yes # lpr(ng) printing. You may wish to override the location of the # printcap file ; printing = bsd ; printcap name = /etc/printcap # CUPS printing.
Re: [Samba] Problem with Samba cutting dir listings short
On Nov 29, 2007 12:06 PM, B. Boom [EMAIL PROTECTED] wrote: Hi, I have a peculiar problem with my Samba installation. I have a directory with lots of files that I want to make available via Samba. I can connect just fine, but I quickly noticed a lot of files seemed to be missing. After some testing I found out that the directory listing was simple cut off, right in the middle of a filename even. I created a test-directory with 1000 random files in another directory, and the same happens. I can access all files without trouble, if I enter them via the command line, they just don't appear in any directory listings in windows. What version of samba are you using? I believe I have seen this recently on the list and it was a bug that was fixed in samba-3.0.27a John -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Win XP Off Line Files Access Denied Samba 3.1.1
Hello, I hope I can resolve this issue by posting to this list! I'm new to the *nux world! Client Win XP SP2 configures Off Line Folders, the shares are located on our Cluster FreeBSD using Samba 3.1.1. durring initail log on the clients receive Access Denied after five -ten seconds a manual snyc will be sucsessful. A manual sync of the offline folder will produce Access Denied periodicly. I hope my senario is clear and understanding... Thanks in advance, Roosevelt Hubbard | Technical Support Analyst Isilon SystemsP +1-206-315-7500F +1-206-315-7501 www.isilon.comD +1-206-777-7901E [EMAIL PROTECTED] The Isilon Knowledge Base: A wealth of product and technical support information at your fingertips. www.isilon.com/support http://www.isilon.com/support How breakthroughs begin.(tm) -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Problem with samba 3.0.14a-3sarge9 on Debian Sarge
Quoting Marco ([EMAIL PROTECTED]): Alessandro FAGLIA wrote: After I upgraded to 3.0.14a-3sarge9, I observed a strange behaviour with no apparent explanation. Perhaps this link could be helpful: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=453050 And -sarge10 should be available in the meantime, thanks again to Steve Langasek's work. The same stands for 3.0.24-etch8 packages that should fix the same long directory listing regression for the package in Etch. (and /me crosses fingers for no more regressions) -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] DFS, WAN links and file syncing
I'm working on solving an interesting problem. We've got some folks on the other side of a WAN link who are complaining about the very long load time they have for the really big files located on my server. There *is* a linux system on their side of the WAN connection with Samba already installed and it occurred to me that maybe a DFS setup would be helpful. Having never messed with DFS before I set out to research what it did and discovered that it doesn't do anything about keeping the respective files in sync. That would be a problem. What I'd like to set up is a share on both servers that are somehow kept in sync so that folks can modify files on either one and have the changes reflected on the other. In fact, I would really like to see file locks work across servers so that nobody could modify the file on system A if someone on system B is already editing it. Then set up the DFS tree so that the client systems go to the closest server for file access. Any advice? ;) -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] DFS, WAN links and file syncing
On Thu, Nov 29, 2007 at 10:58:24AM -0800, Michael St. Laurent wrote: Any advice? ;) First: Forget it. Second: Get a WAN accellerator box. But watch out for correct CIFS semantics, they are really tricky to get right. Volker pgp5vbxEPSVeU.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] SETGID not being inherited
smbfs doesn't work at all for me :-( The share appears to be mounted but when I try to 'ls' it I get Input/output error, and at the same time, log.smbd on the server records: [2007/11/29 21:41:41, 0] lib/util.c:smb_panic(1599) PANIC (pid 5779): push_ascii - dest_len == -1 ... followed by some backtrace info. But that's a different problem. To return to cifs: I found this on the linux-cifs-client mailing list archives: http://marc.info/?l=linux-cifs-clientm=119027947932259w=2 ...which suggests that the clearing of the setgid bit is a known problem and it may be fixed in kernel 2.6.24. Here's hoping! -- Paul On Thursday 29 Nov 2007, Mark Adams wrote: Someone else was recently having a different problem with mount.cifs.- is it possible for you to try smbfs ? Mark. On 28 Nov 2007, at 19:35, Paul Worrall [EMAIL PROTECTED] wrote: I have exactly the same problem, and the force directory mode = 2770 does not solve it for me. I have noticed that directories created on the same share by Windows clients, smbclient on Linux and using the KDE smb: slave all inherit the setgid bit as expected, so it seems to be something specific to mount.cifs Here is the line from my /etc/fstab: //basilisk/Shared\040Documents /media/smb/shared_documents cifs guest,domain=HOME 0 0 Things I have tried: setting the nosetuids mount option (though the man page says this is the default anyway) setting the noperm mount option setting the noacl mount option Now I've run out of ideas. Any help appreciated. -- Paul On Wednesday 21 Nov 2007, Mark Adams wrote: Apologies for the blank mail, iphone misbehaving. you can use force directory mode = 2770 in each share config or globally. see http://us1.samba.org/samba/docs/man/Samba-HOWTO-Collection/AccessControl s.h tml Cheers, Mark On Wed, Nov 21, 2007 at 02:30:57PM +, Mark Adams wrote: Mark. On 20 Nov 2007, at 18:57, Robert L. Harris [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have an Debian system running samba 3.0.14a from sarge. It is exporting a file system, /data. This file system has the perms 2770. I have set the following in the smb.conf: inherit permissions = yes inherit acls = yes I mount the filesystem from a linux, ubuntu, client and create a directory. The directory comes out with perms 0770. I can chmod 2770 the directory and it takes the setgid just fine. What am I missing, where, in order to have the setgid pass down to the new directories on the server properly? Robert - -- :wq! - --- --- -- --- Robert L. Harris | GPG Key ID: E344DA3B @ x-hkp://pgp.mit.edu DISCLAIMER: These are MY OPINIONS With Dreams To Be A King, ALONE. I speak for First One Should Be A Man no-one else. - Manowar -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHQy4n8+1vMONE2jsRAqF9AKCk3E8nY8pQDpkBT6I2TEj7sUc8EQCcCck1 FvQX1lHPjsRKzZNyBMMTc+s= =uDVx -END PGP SIGNATURE- -- 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 -- Paul -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba -- Paul -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
RE: [Samba] How to move a PDC
Hello All, I was asked to make a backup of a server that we have running as a PDC (FreeBSD based). I tried just coping over the smb.conf but that does not seem to be all that I need. How would I be able to copy a working samba server in order to make a backup in case of an emergency so that the PDC function that it is performing will still work. Thanks in advance, I have attempted to follow the directions here: http://us1.samba.org/samba/docs/man/Samba-Guide/upgrades.html#id363635 in the Replacing a Domain Controller section. However I ran into a problem where the Kickoff time was set to the epoch on the new server and no one on this list has been able/willing to help. So you can try this method to make a backup of your PDC, but it may or may not work. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Windows clients losing connection to Samba 3.0.27 PDC on FC7 i386
First of all update to 3.0.27a, 3.0.27 had a regression in the security fix that prompted that release. Simo. On Tue, 2007-11-27 at 12:46 -0500, Rubin Bennett wrote: Hello all... I have a site of about 50 pcs connected to a Samba domain controller. The domain has been running flawlessly for several years through several upgrades, and the last one (From Fedora Core 4/ Samba 3.0.23a to FC7/ Samba 3.0.27) seems to have caused something to come unglued. The Workstations are periodically booting up in the morning and being unable to contact the domain controller. The Samba server is giving failed authentication errors for the workstation itself (not the username/ password) in log.{workstation}. The upgrade was done nearly a month ago, and roughly 1/2 of the workstations in the network were unable to connect the following morning. It happened again last week and about 10 more workstations were affected. And it happened again today, where 1 workstation and a member server (Win2003r2) lost their credentials. This time it was a really bad deal because the member server runs an application that is mission critical and therefore no one was able to work until it was fixed. In all cases, the users are able to log in by disconnecting their network cable and rebooting, then logging in with the cached credentials on the workstations. Reconnecting the NIC after login allowed the users to connect to network resources on the Samba PDC, and work until a reboot. A 'permanent' fix is to unjoin the PC from the domain and rejoin again. I had assumed that the issue was caused by the upgrade somehow, and that once every system had been re-joined it would go away. However, the workstation from this morning had been unjoined and rejoined once before and now I fear that the issue will keep cropping up all over the place. Ideas, suggestions, flames? I've copied my smb.conf below for your review as well. Thanks very much in advance, Rubin /etc/samba/smb.conf [global] workgroup = WORKGROUP netbios name = Server server string = Network File Server printcap name = cups enable privileges = yes load printers = yes printcap cache time = 60 printing = cups keepalive = 1 log file = /var/log/samba/log.%m max log size = 50 log level = 3 security = user encrypt passwords = Yes map to guest = bad user os level = 65 domain master = yes preferred master = yes passdb backend = tdbsam pam password change = yes socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192 add machine script = /usr/sbin/useradd -d /dev/null -g 200 -s /bin/false -M %u oplocks = no level2 oplocks = no domain logons = Yes logon script = login%G.bat logon drive = Z: logon home = \\server\%U logon path = \\server\profiles\%U wins support = Yes name resolve order = wins hosts bcast hide unreadable = Yes # Added in an attempt to fix broken tdbsam backend... idmap uid = 1-2 idmap gid = 1-2 dns proxy = yes # Share Definitions == [homes] comment = Home Directories create mask = 0700 directory mask = 0700 browseable = No writable = yes [netlogon] comment = Netlogon Scripts path = /var/lib/samba/netlogon comment = Network Logon Service path = /var/lib/samba/netlogon guest ok = yes writable = no [printers] comment = All Printers path = /var/spool/samba browseable = no guest ok = yes writable = no printable = yes create mode = 0700 ;print command = lpr-cups -P %p -o raw %s -r use client driver = yes [print$] path = /var/lib/samba/printers read only = yes browseable = yes force group = noyle write list = @noyle root guest ok = yes inherit permissions = yes [profiles] path = /var/lib/samba/profiles browseable = no read only = No guest ok = yes writable = yes create mask = 0600 directory mask = 0700 root preexec = PROFILE='/var/lib/samba/profiles/%u'; if [ ! -e $PROFILE ]; \ then mkdir -pm700 $PROFILE; chown '%u':'%g' $PROFILE;fi -- Simo Sorce Samba Team GPL Compliance Officer [EMAIL PROTECTED] Senior Software Engineer at Red Hat Inc. [EMAIL PROTECTED] -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] PDC Ldap adding computers to domain
I have a problem setting up samba using ldap as a domain server. When I try to configure a windows 2000 machine to join the domain I first get an authentication request where I enter root and roots password. The dialog disapears for a while (20-30 seconds) and then displays an error dialog with something like The user name could not be found (but in swedish). The computer name shows up in the ldap database after this. I'm using: Debian etch samba 3.0.24-6etch5 smbldap-tools 0.9.2-3 OpenLDAP (slapd) 2.3.30-5 I set the debugging to level 2 and get this for each attempt at configuring the computer in /var/log/samba/log.troll [2007/11/30 01:45:51, 0] lib/util_sock.c:write_data(562) write_data: write failure in writing to client 10.0.0.203. Error Connection reset by peer [2007/11/30 01:45:51, 0] lib/util_sock.c:send_smb(769) Error writing 4 bytes to client. -1. (Connection reset by peer) [2007/11/30 01:45:51, 2] lib/smbldap.c:smbldap_open_connection(788) smbldap_open_connection: connection opened [2007/11/30 01:45:51, 2] passdb/pdb_ldap.c:init_sam_from_ldap(541) init_sam_from_ldap: Entry found for user: root [2007/11/30 01:45:51, 2] passdb/pdb_ldap.c:init_group_from_ldap(2140) init_group_from_ldap: Entry found for group: 513 [2007/11/30 01:45:51, 2] auth/auth.c:check_ntlm_password(309) check_ntlm_password: authentication for user [root] - [root] - [root] succeeded [2007/11/30 01:45:51, 2] smbd/reply.c:reply_tcon_and_X(711) Serving IPC$ as a Dfs root [2007/11/30 01:45:52, 2] rpc_server/srv_samr_nt.c:_samr_lookup_domain(2797) Returning domain sid for domain CHAMPIS - S-1-5-21-3235403273-773503436-3870180080 my smb.conf [global] workgroup = CHAMPIS server string = %h server passdb backend = ldapsam:ldap://localhost:389 passwd program = /sbin/smbldap-passwd %u passwd chat = *New*password* %n\n *Retype*new*password %n\n *all*authentication*tokens*updated* log level = 2 syslog = 0 log file = /var/log/samba/log.%m max log size = 1000 name resolve order = lmhosts host wins bcast add user script = /usr/sbin/smbldap-useradd -m %u add group script = /usr/sbin/smbldap-groupadd -p %g add user to group script = /usr/sbin/smbldap-groupmod -m %u %g delete user from group script = /usr/sbin/smbldap-groupmod -x %u %g set primary group script = /usr/sbin/smbldap-usermod -g %g %u add machine script = /usr/sbin/smbldap-useradd -w %u logon path = \\%N\profiles\%U logon drive = H: domain logons = Yes os level = 42 preferred master = Yes domain master = Yes dns proxy = No wins support = Yes ldap admin dn = cn=admin,dc=proxxi,dc=org ldap delete dn = Yes ldap group suffix = ou=Groups ldap idmap suffix = ou=Users ldap machine suffix = ou=Computers ldap passwd sync = Yes ldap replication sleep = 5000 ldap suffix = dc=proxxi,dc=org ldap user suffix = ou=Users panic action = /usr/share/samba/panic-action %d [homes] comment = Home Directories valid users = %U create mask = 0700 directory mask = 0700 browseable = No [netlogon] comment = Network Logon Service path = /home/samba/netlogon guest ok = Yes share modes = No [profiles] comment = Users profiles path = /home/samba/profiles create mask = 0600 directory mask = 0700 browseable = No -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Re: PDC Ldap adding computers to domain
It seems my problems originated from the /etc/pam.d/samba file. It told samba to, besides whatever authentication it does by itself, to authenticate by pam_unix. Just remove the contents of /etc/pam.d/samba and you will have one less problem to worry about. =) We also had fitle with the nss config. hope it helps someone. /Eric Druid -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Group Polic Software Install Packages located on SAMBA share
Hi All, I am running debian etch and samba 3.0.24. I have it configured to for krb5, winbind, and ads. Everything is working perfect as far as accessing shares, authentication using AD logins. I have one issue. I have some computer group policies on my AD server to do various software installs. The msi and files themselves are hosted on a share on my samba server. The software installs happen when windows is first loading before the login prompt is presented and the user logs in. The software installs always fail saying it cannot access the files. My thoughts are that since the user has not logged in yet, that the samba server doesn't not how to authenticate the machine to access to files. Has anyone had experience with this issues? Anyone installed software through group policy and hosting that msi's on a samba share? Any help would be greatly appreciated. Mike -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Windows clients losing connection to Samba 3.0.27 PDC on FC7 i386
I've done that, and we'll wait and see I suppose... I *really* hate waiting for the other shoe to drop though. FWIW, I did some more digging and came up with a couple systems that show the following when I run pdbedit -Lv: Password must change: 0 Any idea as to why those show a 0 value and the rest either say never or have some huge value for seconds since the epoch that the password in theory will need to be changed? Thanks again, Rubin On Thu, 2007-11-29 at 18:22 -0500, simo wrote: First of all update to 3.0.27a, 3.0.27 had a regression in the security fix that prompted that release. Simo. On Tue, 2007-11-27 at 12:46 -0500, Rubin Bennett wrote: Hello all... I have a site of about 50 pcs connected to a Samba domain controller. The domain has been running flawlessly for several years through several upgrades, and the last one (From Fedora Core 4/ Samba 3.0.23a to FC7/ Samba 3.0.27) seems to have caused something to come unglued. The Workstations are periodically booting up in the morning and being unable to contact the domain controller. The Samba server is giving failed authentication errors for the workstation itself (not the username/ password) in log.{workstation}. The upgrade was done nearly a month ago, and roughly 1/2 of the workstations in the network were unable to connect the following morning. It happened again last week and about 10 more workstations were affected. And it happened again today, where 1 workstation and a member server (Win2003r2) lost their credentials. This time it was a really bad deal because the member server runs an application that is mission critical and therefore no one was able to work until it was fixed. In all cases, the users are able to log in by disconnecting their network cable and rebooting, then logging in with the cached credentials on the workstations. Reconnecting the NIC after login allowed the users to connect to network resources on the Samba PDC, and work until a reboot. A 'permanent' fix is to unjoin the PC from the domain and rejoin again. I had assumed that the issue was caused by the upgrade somehow, and that once every system had been re-joined it would go away. However, the workstation from this morning had been unjoined and rejoined once before and now I fear that the issue will keep cropping up all over the place. Ideas, suggestions, flames? I've copied my smb.conf below for your review as well. Thanks very much in advance, Rubin /etc/samba/smb.conf [global] workgroup = WORKGROUP netbios name = Server server string = Network File Server printcap name = cups enable privileges = yes load printers = yes printcap cache time = 60 printing = cups keepalive = 1 log file = /var/log/samba/log.%m max log size = 50 log level = 3 security = user encrypt passwords = Yes map to guest = bad user os level = 65 domain master = yes preferred master = yes passdb backend = tdbsam pam password change = yes socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192 add machine script = /usr/sbin/useradd -d /dev/null -g 200 -s /bin/false -M %u oplocks = no level2 oplocks = no domain logons = Yes logon script = login%G.bat logon drive = Z: logon home = \\server\%U logon path = \\server\profiles\%U wins support = Yes name resolve order = wins hosts bcast hide unreadable = Yes # Added in an attempt to fix broken tdbsam backend... idmap uid = 1-2 idmap gid = 1-2 dns proxy = yes # Share Definitions == [homes] comment = Home Directories create mask = 0700 directory mask = 0700 browseable = No writable = yes [netlogon] comment = Netlogon Scripts path = /var/lib/samba/netlogon comment = Network Logon Service path = /var/lib/samba/netlogon guest ok = yes writable = no [printers] comment = All Printers path = /var/spool/samba browseable = no guest ok = yes writable = no printable = yes create mode = 0700 ;print command = lpr-cups -P %p -o raw %s -r use client driver = yes [print$] path = /var/lib/samba/printers read only = yes browseable = yes force group = noyle write list = @noyle root guest ok = yes inherit permissions = yes [profiles] path = /var/lib/samba/profiles browseable = no read only = No guest ok = yes writable = yes create mask = 0600 directory mask = 0700 root preexec = PROFILE='/var/lib/samba/profiles/%u'; if [ ! -e $PROFILE ]; \ then mkdir -pm700 $PROFILE; chown '%u':'%g' $PROFILE;fi -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] ERROR: string overflow in safe_strcpy
Hello All, Our samba server rarely shows up follwing message in syslog. When this message appears, CPU average will be pretty high. winbindd[9585]: [2007/11/28 15:55:02, 0] lib/util_str.c:safe_strcpy_fn(659) winbindd[9585]: ERROR: string overflow by 1 (256 - 255) in safe_strcpy [01092-6821 winbindd[9585]: S-1-5] Hardware: Dell PowerEdge 2950 OS: Red Hat Enterprise Linux ES4 Update 4 Kernel: 2.6.9-55.0.2.ELsmp RPM packages are: samba-3.0.10-1.4E.12.2 samba-common-3.0.10-1.4E.12.2 samba-client-3.0.10-1.4E.12.2 pam_krb5-2.1.8-1 krb5-libs-1.3.4-49 krb5-workstation-1.3.4-49 krb5-devel-1.3.4-49 Samba server is a member server of Win2003 R2 Active Directory. And also, winbindd works with idmap_rid option. My smb.conf is as below. [global] workgroup = MYDOMAIN log file = /var/log/samba/%m.log max log size = 50 security = ADS password server = ad.mydomain.com encrypt passwords = yes socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 dns proxy = no idmap uid = 1-5 idmap gid = 1-5 idmap backend = idmap_rid:MYDOMAIN=1-5 allow trusted domains = no template shell = /bin/false winbind use default domain = yes realm = MYDOMAIN.COM netbios name = pop winbind cache time = 900 winbind separator = @ template homedir = /home/%U Obey pam restrictions = yes Does anyone have Knowledge or experienced? Any help is appreciated, Satoshi -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Problem with samba 3.0.14a-3sarge9 on Debian Sarge
Original Message Subject: Re: [Samba] Problem with samba 3.0.14a-3sarge9 on Debian Sarge From: Christian Perrier [EMAIL PROTECTED] To: samba@lists.samba.org Date: Thu Nov 29 2007 18:17:19 GMT+0100 (ora solare Europa occidentale) Quoting Marco ([EMAIL PROTECTED]): Alessandro FAGLIA wrote: After I upgraded to 3.0.14a-3sarge9, I observed a strange behaviour with no apparent explanation. Perhaps this link could be helpful: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=453050 And -sarge10 should be available in the meantime, thanks again to Steve Langasek's work. The same stands for 3.0.24-etch8 packages that should fix the same long directory listing regression for the package in Etch. (and /me crosses fingers for no more regressions) I've just upgrade to -sarge10 and I confirm that the issue is fixed (at least at a first glance). Thanks to the debian maintainer for his responsiveness. --Alessandro -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Unable to change password in windows - SAMBA_LDAP_PDC - SOLVED
Hi Guys. Thanks for your help with this, when I turned up the debugging level to 3, and found: user cannot change password now, must wait until Sun, 09 Dec 2007 When I setup the server, and was configuring policies, i set the minimum password age to 45 days (3888000) (For the other server, I used the usrmgr.exe for this, while on this one I used pdbedit, cos usrmgr did not work for some reason) So, this is what I changed it to, so users can change passwords immediately: pdbedit -P minimum password age -C 0 Now, all I had to do, was reset everyones password (using smbpasswd) for this policy to take effect. Thanks again, to everyone who helped me figure this one out! God bless. So take a look at the SO USE A PARTIAL part, it worth for all organizational units suffixes. *I have set to use partial, restarted samba and slapd, and I still receive: **The system cannot change your password now because the domain RIVONINGO.HIVSA is not available or The system cannot change your password at this time When I try to change the password The log entry is: [2007/11/28 14:44:04, 0] lib/debug.c:reopen_logs(597) Unable to open new log file /var/log/samba/log.computername: Permission denied **Is there something else I can try?*** (...) I can't even say that the previous and this error messages has anything to do with your problem (but as the previous message doesn't repeated, the server now is finding whatever it is looking for), or if that its a name resolution problem. Use a log level bigger than 0 to the server spit something useful, use something like 3. But yes, its not normal to the server don't find objects in LDAP as its not normal start to give permission denied errors trying to reopen log files. What are the permissions of your log directory? Regards. Edmundo Valle Neto Hi. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Big problems with 3.0.24-6etch6 Debian packages
Quoting Christian Perrier ([EMAIL PROTECTED]): I saw a security announce yesterday by Steve Kemp, but it's a bit confusing, for Etch it lists some 6etch6 packages and some 6etch7 others. Are the current packages broken? 3.0.24-6etch5 is the first roll-up of packages fixing CVE-2007-5398 and CVE-2007-4572 3.0.24-6etch6 fixes a regression introduced in -etch5 (indeed introduced in upstream's initial published fixes). That regression affects those people who use smbfs only. Apparently, however, another regression which seems to affect long directory listings is present in -etch6 and might lead to -etch7 packages. New packages have been rolled out which claim to fix the long directory listings regression. It turned out that a chunk from upstreams fixes for other regressions was unfortunately forgotten in -etch6 and -etch7 packages (as well as 3.0.14a-3sarge8 and -sarge9 for Debian sare). As I'm writing this, Debian mirrors should now (soon) have the 3.0.14a-3sarge10 and 3.0.24-6etch8 packages. A new DSA (Debian Security Advisory) was issued yesterday about this: DSA-1409-3 for CVE-2007-4572 and CVE-2007-5398 (note the -3). Feedback about these packages is currently quite low so I would suggest people to run them carefully on their production servers. They *should* be OKbut former versions should have been as well:-| -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] DFS root in homes possible?
Can anyone confirm if DFS root in [homes] should work or not? Thanks Chris On 28.11-12:12, Christoph Kaegi wrote: Hi list DFS Links in a separate share seems to work, but in the [homes] section does not. Is this a known problem? Samba is 3.0.26a. /etc/smb.conf excerpts: 8 [global] ... host msdfs = yes ... [homes] ... msdfs root = yes ... [dfstest] path = /data/dfsroot msdfs root = yes 8 DFS Links: 8 server# ls -la /data/dfsroot/ ... lrwxrwxrwx 1 root other 21 Nov 26 09:31 test1 - msdfs:server1\sharename lrwxrwxrwx 1 root other 19 Nov 26 09:31 test2 - msdfs:server2\sharename lrwxrwxrwx 1 root other 17 Nov 26 09:31 test3 - msdfs:server3\sharename server# ls -la /home/staff/myaccount/ ... lrwxrwxrwx 1 root other 25 Nov 28 10:22 Pool1 - msdfs:server1\sharename lrwxrwxrwx 1 root other 17 Nov 28 10:22 secure - msdfs:server2\sharename 8 The error on the Windows client is Network path not found. Thanks Chris -- -- Christoph Kaegi [EMAIL PROTECTED] -- -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba -- -- Christoph Kaegi [EMAIL PROTECTED] -- -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
svn commit: samba r26192 - in branches/SAMBA_4_0: source/dsdb/samdb/ldb_modules source/lib/ldb/common source/libcli/ldap testprogs/blackbox
Author: abartlet Date: 2007-11-29 08:00:04 + (Thu, 29 Nov 2007) New Revision: 26192 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26192 Log: Handle, test and implement the style of extended_dn requiest that MMC uses. It appears that the control value is optional, implying type 0 responses. Failing to parse this was causing LDAP disconnects with 'unavailable critical extension'. Andrew Bartlett Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/extended_dn.c branches/SAMBA_4_0/source/lib/ldb/common/ldb_controls.c branches/SAMBA_4_0/source/libcli/ldap/ldap.c branches/SAMBA_4_0/source/libcli/ldap/ldap.h branches/SAMBA_4_0/source/libcli/ldap/ldap_client.c branches/SAMBA_4_0/source/libcli/ldap/ldap_controls.c branches/SAMBA_4_0/testprogs/blackbox/test_ldb.sh Changeset: Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/extended_dn.c === --- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/extended_dn.c 2007-11-29 01:36:41 UTC (rev 26191) +++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/extended_dn.c 2007-11-29 08:00:04 UTC (rev 26192) @@ -104,35 +104,58 @@ const struct ldb_val *val; struct GUID guid; struct dom_sid *sid; + const DATA_BLOB *guid_blob; + const DATA_BLOB *sid_blob; char *object_guid; char *object_sid; char *new_dn; - /* retrieve object_guid */ - guid = samdb_result_guid(msg, objectGUID); - object_guid = GUID_string(msg, guid); - if (!object_guid) + guid_blob = ldb_msg_find_ldb_val(msg, objectGUID); + sid_blob = ldb_msg_find_ldb_val(msg, objectSID); + + if (!guid_blob) return false; - if (remove_guid) - ldb_msg_remove_attr(msg, objectGUID); - - /* retrieve object_sid */ - object_sid = NULL; - sid = samdb_result_dom_sid(msg, msg, objectSID); - if (sid) { - object_sid = dom_sid_string(msg, sid); - if (!object_sid) - return false; - - if (remove_sid) - ldb_msg_remove_attr(msg, objectSID); - } - - /* TODO: handle type */ switch (type) { case 0: + /* return things in hexadecimal format */ + if (sid_blob) { + const char *lower_guid_hex = strlower_talloc(msg, data_blob_hex_string(msg, guid_blob)); + const char *lower_sid_hex = strlower_talloc(msg, data_blob_hex_string(msg, sid_blob)); + if (!lower_guid_hex || !lower_sid_hex) { + return false; + } + new_dn = talloc_asprintf(msg, GUID=%s;SID=%s;%s, +lower_guid_hex, +lower_sid_hex, + ldb_dn_get_linearized(msg-dn)); + } else { + const char *lower_guid_hex = strlower_talloc(msg, data_blob_hex_string(msg, guid_blob)); + if (!lower_guid_hex) { + return false; + } + new_dn = talloc_asprintf(msg, GUID=%s;%s, +lower_guid_hex, + ldb_dn_get_linearized(msg-dn)); + } + + break; case 1: + /* retrieve object_guid */ + guid = samdb_result_guid(msg, objectGUID); + object_guid = GUID_string(msg, guid); + + /* retrieve object_sid */ + object_sid = NULL; + sid = samdb_result_dom_sid(msg, msg, objectSID); + if (sid) { + object_sid = dom_sid_string(msg, sid); + if (!object_sid) + return false; + + } + + /* Normal, sane format */ if (object_sid) { new_dn = talloc_asprintf(msg, GUID=%s;SID=%s;%s, object_guid, object_sid, @@ -147,9 +170,18 @@ return false; } - if (!new_dn) + if (!new_dn) { return false; + } + if (remove_guid) { + ldb_msg_remove_attr(msg, objectGUID); + } + + if (sid_blob remove_sid) { +
svn commit: samba r26193 - in branches/SAMBA_4_0/source/ldap_server: .
Author: abartlet Date: 2007-11-29 08:02:36 + (Thu, 29 Nov 2007) New Revision: 26193 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26193 Log: In the LDAP server, use the new 'controls_decoded' element to determine if this (possibly critical) control has been decoded. This allows us to return an error, rather than just dropping the socket. Andrew Bartlett Modified: branches/SAMBA_4_0/source/ldap_server/ldap_backend.c Changeset: Modified: branches/SAMBA_4_0/source/ldap_server/ldap_backend.c === --- branches/SAMBA_4_0/source/ldap_server/ldap_backend.c2007-11-29 08:00:04 UTC (rev 26192) +++ branches/SAMBA_4_0/source/ldap_server/ldap_backend.c2007-11-29 08:02:36 UTC (rev 26193) @@ -720,6 +720,18 @@ NTSTATUS ldapsrv_do_call(struct ldapsrv_call *call) { + int i; + struct ldap_message *msg = call-request; + /* Check for undecoded critical extensions */ + for (i=0; msg-controls msg-controls[i]; i++) { + if (!msg-controls_decoded[i] + msg-controls[i]-critical) { + DEBUG(3, (ldapsrv_do_call: Critical extension %s is not known to this server\n, + msg-controls[i]-oid)); + return ldapsrv_unwilling(call, LDAP_UNAVAILABLE_CRITICAL_EXTENSION); + } + } + switch(call-request-type) { case LDAP_TAG_BindRequest: return ldapsrv_BindRequest(call);
Rev 680: added changelog entry in http://samba.org/~tridge/3_0-ctdb
revno: 680 revision-id:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell [EMAIL PROTECTED] branch nick: s3-ctdb-tridge timestamp: Thu 2007-11-29 21:10:03 +1100 message: added changelog entry modified: packaging/RHEL4-CTDB/samba.spec samba.spec-20070530192107-og9sp62ho5xuaaer-4 === modified file 'packaging/RHEL4-CTDB/samba.spec' --- a/packaging/RHEL4-CTDB/samba.spec 2007-11-28 08:52:39 + +++ b/packaging/RHEL4-CTDB/samba.spec 2007-11-29 10:10:03 + @@ -529,8 +529,6 @@ %endif %changelog -* Fri Jan 16 2004 Gerald (Jerry) Carter [EMAIL PROTECTED],org -- Removed ChangeLog entries since they are kept in CVS - - - +* Thu Nov 29 2007 : Version 3.0.25-ctdb.13 + - fixed change notify bug that can cause a notify event storm + - fixed several TSM bugs
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-392-g988c5ff
The branch, v3-2-test has been updated via 988c5ff3f47b7508b229464bbed2ca1948d6e27c (commit) from 223352e32372f1b055298cfc6f2770043a845e3d (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 988c5ff3f47b7508b229464bbed2ca1948d6e27c Author: Michael Adam [EMAIL PROTECTED] Date: Thu Nov 29 15:16:06 2007 +0100 Allow calling net rpc join and net rpc trustdom without specifying server IP. This was a logic bug (typo) in a call to get_pdc_ip() in net_find_server(). Michael --- Summary of changes: source/utils/net.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source/utils/net.c b/source/utils/net.c index 2390e58..8015358 100644 --- a/source/utils/net.c +++ b/source/utils/net.c @@ -414,7 +414,7 @@ bool net_find_server(const char *domain, fstring dc_name; struct sockaddr_storage pdc_ss; - if (get_pdc_ip(d, pdc_ss)) { + if (!get_pdc_ip(d, pdc_ss)) { DEBUG(1,(Unable to resolve PDC server address\n)); return false; } -- Samba Shared Repository
svn commit: samba r26194 - in branches/SAMBA_4_0: . source source/lib/events source/libcli/swig
Author: jelmer Date: 2007-11-29 14:49:35 + (Thu, 29 Nov 2007) New Revision: 26194 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26194 Log: Wrap the events subsystem in a separate file. Added: branches/SAMBA_4_0/source/lib/events/events.i Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/.bzrignore branches/SAMBA_4_0/source/autogen.sh branches/SAMBA_4_0/source/lib/events/config.mk branches/SAMBA_4_0/source/libcli/swig/libcli_nbt.i branches/SAMBA_4_0/source/libcli/swig/libcli_smb.i Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:file-ids ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/.bzrignore === --- branches/SAMBA_4_0/.bzrignore 2007-11-29 08:02:36 UTC (rev 26193) +++ branches/SAMBA_4_0/.bzrignore 2007-11-29 14:49:35 UTC (rev 26194) @@ -220,3 +220,13 @@ source/lib/registry/tests/proto.h source/auth/auth_wrap.c source/auth/credentials/credentials_wrap.c +source/lib/registry/registry_wrap.c +source/lib/talloc/talloc.py +source/lib/talloc/talloc_wrap.c +source/lib/ldb/ldb_wrap.c +source/librpc/rpc/dcerpc_wrap.c +source/libcli/swig/libcli_smb.py +source/libcli/swig/libcli_smb_wrap.c +source/libcli/swig/libcli_nbt_wrap.c +source/lib/events/events.py +source/lib/events/events_wrap.c Modified: branches/SAMBA_4_0/source/autogen.sh === --- branches/SAMBA_4_0/source/autogen.sh2007-11-29 08:02:36 UTC (rev 26193) +++ branches/SAMBA_4_0/source/autogen.sh2007-11-29 14:49:35 UTC (rev 26194) @@ -65,7 +65,7 @@ # Run swig if it is available SWIG=swig -SWIG_FILES=./scripting/python/misc.i ./auth/auth.i ./auth/credentials/credentials.i ./lib/talloc/talloc.i ./lib/ldb/ldb.i ./lib/registry/registry.i ./lib/tdb/tdb.i ./libcli/swig/libcli_smb.i ./libcli/swig/libcli_nbt.i ./librpc/rpc/dcerpc.i +SWIG_FILES=./scripting/python/misc.i ./auth/auth.i ./auth/credentials/credentials.i ./lib/talloc/talloc.i ./lib/ldb/ldb.i ./lib/registry/registry.i ./lib/tdb/tdb.i ./libcli/swig/libcli_smb.i ./libcli/swig/libcli_nbt.i ./librpc/rpc/dcerpc.i lib/events/events.i if which $SWIG /dev/null 21; then for I in $SWIG_FILES do Modified: branches/SAMBA_4_0/source/lib/events/config.mk === --- branches/SAMBA_4_0/source/lib/events/config.mk 2007-11-29 08:02:36 UTC (rev 26193) +++ branches/SAMBA_4_0/source/lib/events/config.mk 2007-11-29 14:49:35 UTC (rev 26194) @@ -36,3 +36,7 @@ PUBLIC_DEPENDENCIES = LIBTALLOC # End SUBSYSTEM LIBEVENTS ## + +[PYTHON::swig_python] +SWIG_FILE = events.i +PRIVATE_DEPENDENCIES = LIBEVENTS Added: branches/SAMBA_4_0/source/lib/events/events.i === --- branches/SAMBA_4_0/source/lib/events/events.i 2007-11-29 08:02:36 UTC (rev 26193) +++ branches/SAMBA_4_0/source/lib/events/events.i 2007-11-29 14:49:35 UTC (rev 26194) @@ -0,0 +1,31 @@ +/* + Unix SMB/CIFS implementation. + Copyright (C) Jelmer Vernooij [EMAIL PROTECTED] 2007 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see http://www.gnu.org/licenses/. +*/ + +%module(package=samba.events) events; + +%import ../talloc/talloc.i; + +%{ +#include lib/events/events.h +%} + +struct event_context *event_context_init(TALLOC_CTX *mem_ctx); + +%typemap(default) struct event_context * { +$1 = event_context_init(NULL); +} Modified: branches/SAMBA_4_0/source/libcli/swig/libcli_nbt.i === --- branches/SAMBA_4_0/source/libcli/swig/libcli_nbt.i 2007-11-29 08:02:36 UTC (rev 26193) +++ branches/SAMBA_4_0/source/libcli/swig/libcli_nbt.i 2007-11-29 14:49:35 UTC (rev 26194) @@ -29,7 +29,6 @@ #include includes.h #include lib/talloc/talloc.h -#include lib/events/events.h #include libcli/nbt/libnbt.h #include param/param.h @@ -40,27 +39,11 @@ %} %import stdint.i +%import ../util/errors.i %import ../../lib/talloc/talloc.i +%import ../../lib/events/events.i -%typemap(in) NTSTATUS { -if (PyLong_Check($input)) -$1 =
svn commit: samba r26195 - in branches/SAMBA_4_0: . source/lib/events
Author: jelmer Date: 2007-11-29 14:49:42 + (Thu, 29 Nov 2007) New Revision: 26195 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26195 Log: Wrap two more functions. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/lib/events/events.i Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:file-ids ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/lib/events/events.i === --- branches/SAMBA_4_0/source/lib/events/events.i 2007-11-29 14:49:35 UTC (rev 26194) +++ branches/SAMBA_4_0/source/lib/events/events.i 2007-11-29 14:49:42 UTC (rev 26195) @@ -29,3 +29,7 @@ %typemap(default) struct event_context * { $1 = event_context_init(NULL); } + +struct event_context *event_context_init_byname(TALLOC_CTX *mem_ctx, const char *name); + +const char **event_backend_list(TALLOC_CTX *mem_ctx);
svn commit: samba r26196 - in branches/SAMBA_4_0: . source source/lib/ldb
Author: jelmer Date: 2007-11-29 14:49:44 + (Thu, 29 Nov 2007) New Revision: 26196 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26196 Log: Always build python bindings for ldb. Added: branches/SAMBA_4_0/source/lib/ldb/python.mk Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/configure.ac branches/SAMBA_4_0/source/lib/ldb/config.mk Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:file-ids ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/configure.ac === --- branches/SAMBA_4_0/source/configure.ac 2007-11-29 14:49:42 UTC (rev 26195) +++ branches/SAMBA_4_0/source/configure.ac 2007-11-29 14:49:44 UTC (rev 26196) @@ -75,6 +75,7 @@ SMB_INCLUDE_MK(lib/ldb/config.mk) ] ) +SMB_INCLUDE_MK(lib/ldb/python.mk) m4_include(lib/tls/config.m4) m4_include(lib/events/config.m4) Modified: branches/SAMBA_4_0/source/lib/ldb/config.mk === --- branches/SAMBA_4_0/source/lib/ldb/config.mk 2007-11-29 14:49:42 UTC (rev 26195) +++ branches/SAMBA_4_0/source/lib/ldb/config.mk 2007-11-29 14:49:44 UTC (rev 26196) @@ -192,13 +192,6 @@ # End BINARY ad2oLschema -### -# Start LIBRARY swig_ldb -[PYTHON::swig_ldb] -PUBLIC_DEPENDENCIES = LIBLDB LIBPYTHON -SWIG_FILE = ldb.i -# End LIBRARY swig_ldb -### include tools/config.mk include ldb_ildap/config.mk Added: branches/SAMBA_4_0/source/lib/ldb/python.mk === --- branches/SAMBA_4_0/source/lib/ldb/python.mk 2007-11-29 14:49:42 UTC (rev 26195) +++ branches/SAMBA_4_0/source/lib/ldb/python.mk 2007-11-29 14:49:44 UTC (rev 26196) @@ -0,0 +1,7 @@ +### +# Start LIBRARY swig_ldb +[PYTHON::swig_ldb] +PUBLIC_DEPENDENCIES = LIBLDB LIBPYTHON +SWIG_FILE = ldb.i +# End LIBRARY swig_ldb +###
svn commit: samba r26197 - in branches/SAMBA_4_0: . source source/lib source/lib/ldb/ldb_ildap source/lib/ldb/ldb_tdb source/lib/talloc source/libcli/security source/libcli/security/tests source/scrip
Author: jelmer Date: 2007-11-29 14:49:47 + (Thu, 29 Nov 2007) New Revision: 26197 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26197 Log: Add bindings for libsecurity. Added: branches/SAMBA_4_0/source/libcli/security/security.i branches/SAMBA_4_0/source/libcli/security/tests/bindings.py Removed: branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_tdb_wrap.c branches/SAMBA_4_0/source/lib/ldb_wrap.c branches/SAMBA_4_0/source/lib/tdb_wrap.c branches/SAMBA_4_0/source/scripting/python/sidmodule.c Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/.bzrignore branches/SAMBA_4_0/source/autogen.sh branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/config.mk branches/SAMBA_4_0/source/lib/talloc/config.mk branches/SAMBA_4_0/source/lib/talloc/talloc.i branches/SAMBA_4_0/source/libcli/security/config.mk branches/SAMBA_4_0/source/scripting/python/config.mk branches/SAMBA_4_0/source/selftest/samba4_tests.sh Changeset: Sorry, the patch is too large (864 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26197
svn commit: samba r26198 - in branches/4.0-python: . source source/auth source/auth/tests source/dsdb/samdb/ldb_modules source/ldap_server source/lib source/lib/events source/lib/ldb source/lib/ldb/co
Author: jelmer Date: 2007-11-29 14:51:02 + (Thu, 29 Nov 2007) New Revision: 26198 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26198 Log: Merge upstream. Added: branches/4.0-python/source/auth/tests/ branches/4.0-python/source/auth/tests/bindings.py branches/4.0-python/source/lib/events/events.i branches/4.0-python/source/lib/ldb/python.mk branches/4.0-python/source/libcli/security/security.i branches/4.0-python/source/libcli/security/tests/bindings.py branches/4.0-python/source/scripting/bin/subunitrun branches/4.0-python/source/scripting/python/subunit/ branches/4.0-python/source/scripting/python/subunit/__init__.py Removed: branches/4.0-python/source/lib/ldb/ldb_tdb/ldb_tdb_wrap.c branches/4.0-python/source/lib/ldb_wrap.c branches/4.0-python/source/lib/tdb_wrap.c branches/4.0-python/source/scripting/python/sidmodule.c Modified: branches/4.0-python/ branches/4.0-python/.bzrignore branches/4.0-python/source/auth/auth.i branches/4.0-python/source/auth/config.mk branches/4.0-python/source/autogen.sh branches/4.0-python/source/configure.ac branches/4.0-python/source/dsdb/samdb/ldb_modules/extended_dn.c branches/4.0-python/source/dsdb/samdb/ldb_modules/linked_attributes.c branches/4.0-python/source/ldap_server/ldap_backend.c branches/4.0-python/source/lib/events/config.mk branches/4.0-python/source/lib/ldb/Makefile.in branches/4.0-python/source/lib/ldb/autogen.sh branches/4.0-python/source/lib/ldb/common/ldb_controls.c branches/4.0-python/source/lib/ldb/config.mk branches/4.0-python/source/lib/ldb/ldb.i branches/4.0-python/source/lib/ldb/ldb_ildap/config.mk branches/4.0-python/source/lib/ldb/setup.py branches/4.0-python/source/lib/ldb/tests/python/ldap.py branches/4.0-python/source/lib/talloc/config.mk branches/4.0-python/source/lib/tdb/Makefile.in branches/4.0-python/source/lib/tdb/autogen.sh branches/4.0-python/source/lib/tdb/configure.ac branches/4.0-python/source/lib/tdb/setup.py branches/4.0-python/source/libcli/ldap/ldap.c branches/4.0-python/source/libcli/ldap/ldap.h branches/4.0-python/source/libcli/ldap/ldap_client.c branches/4.0-python/source/libcli/ldap/ldap_controls.c branches/4.0-python/source/libcli/security/config.mk branches/4.0-python/source/libcli/swig/libcli_nbt.i branches/4.0-python/source/libcli/swig/libcli_smb.i branches/4.0-python/source/librpc/idl/wkssvc.idl branches/4.0-python/source/main.mk branches/4.0-python/source/param/secrets.c branches/4.0-python/source/samba4-skip branches/4.0-python/source/scripting/python/config.m4 branches/4.0-python/source/scripting/python/config.mk branches/4.0-python/source/selftest/Subunit.pm branches/4.0-python/source/selftest/samba4_tests.sh branches/4.0-python/source/torture/raw/streams.c branches/4.0-python/testprogs/blackbox/test_ldb.sh Changeset: Sorry, the patch is too large (3125 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26198
svn commit: samba r26200 - in branches/SAMBA_4_0: . source/lib source/lib/ldb/ldb_tdb
Author: jelmer Date: 2007-11-29 15:08:27 + (Thu, 29 Nov 2007) New Revision: 26200 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26200 Log: Bring back some accidently removed files. Added: branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_tdb_wrap.c branches/SAMBA_4_0/source/lib/ldb_wrap.c branches/SAMBA_4_0/source/lib/tdb_wrap.c Modified: branches/SAMBA_4_0/ Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:file-ids ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Added: branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_tdb_wrap.c === --- branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_tdb_wrap.c2007-11-29 15:08:22 UTC (rev 26199) +++ branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_tdb_wrap.c2007-11-29 15:08:27 UTC (rev 26200) @@ -0,0 +1,153 @@ +/* + ldb database library + + Copyright (C) Andrew Tridgell 2005 + + ** NOTE! The following LGPL license applies to the ldb + ** library. This does NOT imply that all of Samba is released + ** under the LGPL + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, see http://www.gnu.org/licenses/. +*/ + +#include ldb_includes.h + +#include ldb_tdb.h + +/* + the purpose of this code is to work around the braindead posix locking + rules, to allow us to have a ldb open more than once while allowing + locking to work +*/ + +struct ltdb_wrap { + struct ltdb_wrap *next, *prev; + struct tdb_context *tdb; + dev_t device; + ino_t inode; +}; + +static struct ltdb_wrap *tdb_list; + +/* destroy the last connection to a tdb */ +static int ltdb_wrap_destructor(struct ltdb_wrap *w) +{ + tdb_close(w-tdb); + if (w-next) { + w-next-prev = w-prev; + } + if (w-prev) { + w-prev-next = w-next; + } + if (w == tdb_list) { + tdb_list = w-next; + } + return 0; +} + +static void ltdb_log_fn(struct tdb_context *tdb, enum tdb_debug_level level, const char *fmt, ...) PRINTF_ATTRIBUTE(3, 4); +static void ltdb_log_fn(struct tdb_context *tdb, enum tdb_debug_level level, const char *fmt, ...) +{ + va_list ap; + const char *name = tdb_name(tdb); + struct ldb_context *ldb = talloc_get_type(tdb_get_logging_private(tdb), struct ldb_context); + enum ldb_debug_level ldb_level; + char *message; + va_start(ap, fmt); + message = talloc_vasprintf(ldb, fmt, ap); + va_end(ap); + + switch (level) { + case TDB_DEBUG_FATAL: + ldb_level = LDB_DEBUG_FATAL; + break; + case TDB_DEBUG_ERROR: + ldb_level = LDB_DEBUG_ERROR; + break; + case TDB_DEBUG_WARNING: + ldb_level = LDB_DEBUG_WARNING; + break; + case TDB_DEBUG_TRACE: + ldb_level = LDB_DEBUG_TRACE; + break; + default: + ldb_level = LDB_DEBUG_FATAL; + } + + ldb_debug(ldb, ldb_level, ltdb: tdb(%s): %s, name, message); + talloc_free(message); +} + +/* + wrapped connection to a tdb database. The caller should _not_ free + this as it is not a talloc structure (as tdb does not use talloc + yet). It will auto-close when the caller frees the mem_ctx that is + passed to this call + */ +struct tdb_context *ltdb_wrap_open(TALLOC_CTX *mem_ctx, + const char *path, int hash_size, + int tdb_flags, + int open_flags, mode_t mode, + struct ldb_context *ldb) +{ + struct ltdb_wrap *w; + struct stat st; + struct tdb_logging_context log_ctx; + + log_ctx.log_fn = ltdb_log_fn; + log_ctx.log_private = ldb; + + if (stat(path, st) == 0) { + for (w=tdb_list;w;w=w-next) { + if (st.st_dev == w-device st.st_ino == w-inode) { + if (!talloc_reference(mem_ctx, w)) { + return NULL; + } + return w-tdb; + } + } + } + +
svn commit: samba r26201 - in branches/SAMBA_4_0: . source/scripting/python
Author: jelmer Date: 2007-11-29 16:00:59 + (Thu, 29 Nov 2007) New Revision: 26201 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26201 Log: Build docs for the security module. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/scripting/python/config.mk Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:file-ids ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/scripting/python/config.mk === --- branches/SAMBA_4_0/source/scripting/python/config.mk2007-11-29 15:08:27 UTC (rev 26200) +++ branches/SAMBA_4_0/source/scripting/python/config.mk2007-11-29 16:00:59 UTC (rev 26201) @@ -25,7 +25,7 @@ pythonmods: $(PYTHON_DSOS) -PYDOCTOR_MODULES=bin/python/ldb.py bin/python/auth.py bin/python/credentials.py bin/python/registry.py bin/python/tdb.py +PYDOCTOR_MODULES=bin/python/ldb.py bin/python/auth.py bin/python/credentials.py bin/python/registry.py bin/python/tdb.py bin/python/security.py pydoctor:: pythonmods LD_LIBRARY_PATH=bin/shared PYTHONPATH=bin/python pydoctor --make-html --docformat=restructuredtext --add-package scripting/python/samba/ $(addprefix --add-module , $(PYDOCTOR_MODULES))
svn commit: samba r26202 - in branches/SAMBA_4_0: . source/lib
Author: jelmer Date: 2007-11-29 16:01:05 + (Thu, 29 Nov 2007) New Revision: 26202 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26202 Log: Fix dependencies. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/lib/basic.mk Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/lib/basic.mk === --- branches/SAMBA_4_0/source/lib/basic.mk 2007-11-29 16:00:59 UTC (rev 26201) +++ branches/SAMBA_4_0/source/lib/basic.mk 2007-11-29 16:01:05 UTC (rev 26202) @@ -34,7 +34,7 @@ PUBLIC_HEADERS = ldb_wrap.h OBJ_FILES = ldb_wrap.o PUBLIC_DEPENDENCIES = LIBLDB -PRIVATE_DEPENDENCIES = LDBSAMBA +PRIVATE_DEPENDENCIES = LDBSAMBA UTIL_LDB [SUBSYSTEM::TDB_WRAP] PUBLIC_HEADERS = tdb_wrap.h
svn commit: samba r26203 - in branches/SAMBA_4_0: . source/auth/gensec source/param
Author: jelmer Date: 2007-11-29 16:01:08 + (Thu, 29 Nov 2007) New Revision: 26203 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26203 Log: Avoid using ldb_wrap for secrets database. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/auth/gensec/config.mk branches/SAMBA_4_0/source/param/config.mk branches/SAMBA_4_0/source/param/secrets.c Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/auth/gensec/config.mk === --- branches/SAMBA_4_0/source/auth/gensec/config.mk 2007-11-29 16:01:05 UTC (rev 26202) +++ branches/SAMBA_4_0/source/auth/gensec/config.mk 2007-11-29 16:01:08 UTC (rev 26203) @@ -72,6 +72,7 @@ PRIVATE_PROTO_HEADER = schannel_state.h OBJ_FILES = \ schannel_state.o +PRIVATE_DEPENDENCIES = LDB_WRAP # # End SUBSYSTEM SCHANNELDB Modified: branches/SAMBA_4_0/source/param/config.mk === --- branches/SAMBA_4_0/source/param/config.mk 2007-11-29 16:01:05 UTC (rev 26202) +++ branches/SAMBA_4_0/source/param/config.mk 2007-11-29 16:01:08 UTC (rev 26203) @@ -47,4 +47,4 @@ [SUBSYSTEM::SECRETS] OBJ_FILES = secrets.o -PRIVATE_DEPENDENCIES = LDB_WRAP TDB_WRAP UTIL_TDB +PRIVATE_DEPENDENCIES = LIBLDB TDB_WRAP UTIL_TDB Modified: branches/SAMBA_4_0/source/param/secrets.c === --- branches/SAMBA_4_0/source/param/secrets.c 2007-11-29 16:01:05 UTC (rev 26202) +++ branches/SAMBA_4_0/source/param/secrets.c 2007-11-29 16:01:08 UTC (rev 26203) @@ -26,7 +26,6 @@ #include param/param.h #include system/filesys.h #include tdb_wrap.h -#include ldb_wrap.h #include lib/ldb/include/ldb.h #include lib/tdb/include/tdb.h #include lib/util/util_tdb.h @@ -118,11 +117,18 @@ /* Secrets.ldb *must* always be local. If we call for a * system_session() we will recurse */ - ldb = ldb_wrap_connect(mem_ctx, global_loadparm, path, NULL, NULL, 0, NULL); - talloc_free(path); + ldb = ldb_init(mem_ctx); if (!ldb) { + talloc_free(path); return NULL; } + + if (ldb_connect(ldb, path, 0, NULL) != 0) { + talloc_free(path); + return NULL; + } + + talloc_free(path); return ldb; }
svn commit: samba r26204 - in branches/SAMBA_4_0: . source/auth/credentials source/auth/credentials/tests
Author: jelmer Date: 2007-11-29 16:01:11 + (Thu, 29 Nov 2007) New Revision: 26204 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26204 Log: Binsings for some more functions. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/auth/credentials/credentials.i branches/SAMBA_4_0/source/auth/credentials/tests/bindings.py Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/auth/credentials/credentials.i === --- branches/SAMBA_4_0/source/auth/credentials/credentials.i2007-11-29 16:01:08 UTC (rev 26203) +++ branches/SAMBA_4_0/source/auth/credentials/credentials.i2007-11-29 16:01:11 UTC (rev 26204) @@ -89,5 +89,9 @@ bool is_anonymous(void); const struct samr_Password *get_nt_hash(TALLOC_CTX *mem_ctx); + +bool authentication_requested(); + +bool wrong_password(); } } cli_credentials; Modified: branches/SAMBA_4_0/source/auth/credentials/tests/bindings.py === --- branches/SAMBA_4_0/source/auth/credentials/tests/bindings.py 2007-11-29 16:01:08 UTC (rev 26203) +++ branches/SAMBA_4_0/source/auth/credentials/tests/bindings.py 2007-11-29 16:01:11 UTC (rev 26204) @@ -82,3 +82,11 @@ def test_guess(self): # Just check the method is there and doesn't raise an exception self.creds.guess() + +def test_authentication_requested(self): +self.assertFalse(self.creds.authentication_requested()) + +def test_wrong_password(self): +self.assertTrue(self.creds.wrong_password()) +self.assertTrue(self.creds.wrong_password()) +self.assertFalse(self.creds.wrong_password())
svn commit: samba r26205 - in branches/SAMBA_4_0: . source/auth/credentials source/lib/ldb/ldb_ildap source/libnet source/param source/rpc_server/lsa
Author: jelmer Date: 2007-11-29 16:01:16 + (Thu, 29 Nov 2007) New Revision: 26205 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26205 Log: Pass loadparm_context to secrets_db_connect() rather than using global context. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/auth/credentials/credentials.c branches/SAMBA_4_0/source/auth/credentials/credentials_files.c branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/config.mk branches/SAMBA_4_0/source/libnet/libnet_join.c branches/SAMBA_4_0/source/param/secrets.c branches/SAMBA_4_0/source/param/secrets.h branches/SAMBA_4_0/source/rpc_server/lsa/dcesrv_lsa.c Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/auth/credentials/credentials.c === --- branches/SAMBA_4_0/source/auth/credentials/credentials.c2007-11-29 16:01:11 UTC (rev 26204) +++ branches/SAMBA_4_0/source/auth/credentials/credentials.c2007-11-29 16:01:16 UTC (rev 26205) @@ -229,7 +229,6 @@ /* Set a callback to get the principal. This could be a popup dialog, * a terminal prompt or similar. */ - bool cli_credentials_set_principal_callback(struct cli_credentials *cred, const char *(*principal_cb) (struct cli_credentials *)) { Modified: branches/SAMBA_4_0/source/auth/credentials/credentials_files.c === --- branches/SAMBA_4_0/source/auth/credentials/credentials_files.c 2007-11-29 16:01:11 UTC (rev 26204) +++ branches/SAMBA_4_0/source/auth/credentials/credentials_files.c 2007-11-29 16:01:16 UTC (rev 26205) @@ -212,7 +212,7 @@ if (!ldb) { /* Local secrets are stored in secrets.ldb */ - ldb = secrets_db_connect(mem_ctx); + ldb = secrets_db_connect(mem_ctx, global_loadparm); if (!ldb) { /* set anonymous as the fallback, if the machine account won't work */ cli_credentials_set_anonymous(cred); Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/config.mk === --- branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/config.mk 2007-11-29 16:01:11 UTC (rev 26204) +++ branches/SAMBA_4_0/source/lib/ldb/ldb_ildap/config.mk 2007-11-29 16:01:16 UTC (rev 26205) @@ -3,7 +3,7 @@ [MODULE::ldb_ildap] SUBSYSTEM = LIBLDB CFLAGS = -Ilib/ldb/include -OUTPUT_TYPE = SHARED_LIBRARY +#OUTPUT_TYPE = SHARED_LIBRARY PRIVATE_DEPENDENCIES = LIBTALLOC LIBCLI_LDAP INIT_FUNCTION = ldb_ildap_init ALIASES = ldapi ldaps ldap Modified: branches/SAMBA_4_0/source/libnet/libnet_join.c === --- branches/SAMBA_4_0/source/libnet/libnet_join.c 2007-11-29 16:01:11 UTC (rev 26204) +++ branches/SAMBA_4_0/source/libnet/libnet_join.c 2007-11-29 16:01:16 UTC (rev 26205) @@ -909,7 +909,7 @@ * Local secrets are stored in secrets.ldb * open it to make sure we can write the info into it after the join */ - ldb = secrets_db_connect(tmp_mem); + ldb = secrets_db_connect(tmp_mem, global_loadparm); if (!ldb) { r-out.error_string = talloc_asprintf(mem_ctx, Modified: branches/SAMBA_4_0/source/param/secrets.c === --- branches/SAMBA_4_0/source/param/secrets.c 2007-11-29 16:01:11 UTC (rev 26204) +++ branches/SAMBA_4_0/source/param/secrets.c 2007-11-29 16:01:16 UTC (rev 26205) @@ -99,18 +99,18 @@ /** connect to the secrets ldb */ -struct ldb_context *secrets_db_connect(TALLOC_CTX *mem_ctx) +struct ldb_context *secrets_db_connect(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx) { char *path; const char *url; struct ldb_context *ldb; - url = lp_secrets_url(global_loadparm); + url = lp_secrets_url(lp_ctx); if (!url || !url[0]) { return NULL; } - path = private_path(mem_ctx, global_loadparm, url); + path = private_path(mem_ctx, lp_ctx, url); if (!path) { return NULL; } @@ -123,6 +123,9 @@ return NULL; } + ldb_set_modules_dir(ldb, + talloc_asprintf(ldb, %s/ldb, lp_modulesdir(lp_ctx))); + if (ldb_connect(ldb, path, 0, NULL) != 0) { talloc_free(path); return NULL; @@ -146,7 +149,7 @@ const char *attrs[] = { objectSid, NULL }; struct dom_sid *result = NULL; - ldb = secrets_db_connect(mem_ctx); + ldb = secrets_db_connect(mem_ctx, global_loadparm); if (ldb ==
svn commit: samba r26206 - in branches/SAMBA_4_0: . source
Author: jelmer Date: 2007-11-29 17:27:39 + (Thu, 29 Nov 2007) New Revision: 26206 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26206 Log: Build python modules as part of make all. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/main.mk Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/main.mk === --- branches/SAMBA_4_0/source/main.mk 2007-11-29 16:01:16 UTC (rev 26205) +++ branches/SAMBA_4_0/source/main.mk 2007-11-29 17:27:39 UTC (rev 26206) @@ -40,7 +40,7 @@ modules: $(SHARED_MODULES) headers: $(PUBLIC_HEADERS) $(DEFAULT_HEADERS) manpages: $(MANPAGES) -all: showflags $(ALL_PREDEP) bin/asn1_compile bin/compile_et binaries modules +all: showflags $(ALL_PREDEP) bin/asn1_compile bin/compile_et binaries modules pythonmods everything: all libraries headers # 'make testsuite' creates all binaries which are
svn commit: samba r26207 - in branches/SAMBA_4_0: . source/scripting/python
Author: jelmer Date: 2007-11-29 17:49:13 + (Thu, 29 Nov 2007) New Revision: 26207 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26207 Log: Only compile swig files if swig is available. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/scripting/python/config.mk Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/scripting/python/config.mk === --- branches/SAMBA_4_0/source/scripting/python/config.mk2007-11-29 17:27:39 UTC (rev 26206) +++ branches/SAMBA_4_0/source/scripting/python/config.mk2007-11-29 17:49:13 UTC (rev 26207) @@ -16,7 +16,7 @@ .SUFFIXES: _wrap.c .i .i_wrap.c: - $(SWIG) -Wall -I$(srcdir)/scripting/swig -python -keyword $ + [ $(SWIG) != no ] $(SWIG) -Wall -I$(srcdir)/scripting/swig -python -keyword $ realdistclean:: @echo Removing SWIG output files
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-396-gba9e2be
The branch, v3-2-test has been updated via ba9e2be2b5a59684e854609f9d82ea1633448c62 (commit) via ff06cc34e66a18ba71dd54f6c78b05a45b9f2d85 (commit) via aff5a52136b85fe82c4acb08d12009187d1fe6c7 (commit) via a261a61226248b41be22dd4f2873b5ed82bc2a24 (commit) from 988c5ff3f47b7508b229464bbed2ca1948d6e27c (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit ba9e2be2b5a59684e854609f9d82ea1633448c62 Author: Jeremy Allison [EMAIL PROTECTED] Date: Thu Nov 29 13:24:54 2007 -0800 Remove the explicit TALLOC_CTX * from cli_struct. Make us very explicit about how long a talloc ctx should last. Jeremy. commit ff06cc34e66a18ba71dd54f6c78b05a45b9f2d85 Author: Jeremy Allison [EMAIL PROTECTED] Date: Thu Nov 29 13:24:14 2007 -0800 Remove pstrings. Ensure we validate offsets. Jeremy. commit aff5a52136b85fe82c4acb08d12009187d1fe6c7 Merge: a261a61226248b41be22dd4f2873b5ed82bc2a24 988c5ff3f47b7508b229464bbed2ca1948d6e27c Author: Jeremy Allison [EMAIL PROTECTED] Date: Thu Nov 29 09:48:33 2007 -0800 Merge branch 'v3-2-test' of ssh://[EMAIL PROTECTED]/data/git/samba into v3-2-test commit a261a61226248b41be22dd4f2873b5ed82bc2a24 Author: Jeremy Allison [EMAIL PROTECTED] Date: Wed Nov 28 14:08:49 2007 -0800 Remove unused code (and pstring). Jeremy. --- Summary of changes: source/include/client.h|9 +- source/include/smb.h |1 + source/lib/time.c |6 +- source/libsmb/cliconnect.c | 18 +++- source/libsmb/clidfs.c |9 +- source/libsmb/clidgram.c | 92 - source/libsmb/clientgen.c |8 -- source/libsmb/clierror.c |6 + source/libsmb/clilist.c| 196 source/libsmb/clioplock.c |5 +- source/libsmb/cliprint.c | 64 ++-- source/libsmb/clirap.c |2 +- source/libsmb/libsmbclient.c | 28 -- source/libsmb/passchange.c |4 +- source/rpc_client/cli_pipe.c | 35 +-- source/rpc_server/srv_spoolss_nt.c | 12 ++- source/smbd/change_trust_pw.c |2 +- source/utils/smbcquotas.c |7 +- source/utils/smbtree.c | 12 ++- source/winbindd/winbindd_cm.c | 23 ++-- 20 files changed, 265 insertions(+), 274 deletions(-) Changeset truncated at 500 lines: diff --git a/source/include/client.h b/source/include/client.h index dd8bb0d..c601e1a 100644 --- a/source/include/client.h +++ b/source/include/client.h @@ -135,7 +135,10 @@ struct cli_state { uint32 posix_capabilities; bool dfsroot; - TALLOC_CTX *mem_ctx; +#if 0 + TALLOC_CTX *longterm_mem_ctx; + TALLOC_CTX *call_mem_ctx; +#endif smb_sign_info sign_info; @@ -170,8 +173,8 @@ typedef struct file_info { struct timespec mtime_ts; struct timespec atime_ts; struct timespec ctime_ts; - pstring name; - pstring dir; + char name[1024]; + char dir[1024]; /* Should use allocated PATH_MAX here */ char short_name[13*3]; /* the *3 is to cope with multi-byte */ } file_info; diff --git a/source/include/smb.h b/source/include/smb.h index be339f2..f85c734 100644 --- a/source/include/smb.h +++ b/source/include/smb.h @@ -79,6 +79,7 @@ enum smb_read_errors { SMB_READ_ERROR, SMB_WRITE_ERROR, /* This error code can go into the client smb_rw_error. */ SMB_READ_BAD_SIG, + SMB_NO_MEMORY, SMB_DO_NOT_DO_TDIS /* cli_close_connection() check for this when smbfs wants to keep tree connected */ }; diff --git a/source/lib/time.c b/source/lib/time.c index e29308f..5301e3a 100644 --- a/source/lib/time.c +++ b/source/lib/time.c @@ -1181,17 +1181,17 @@ void cli_put_dos_date3(struct cli_state *cli, char *buf, int offset, time_t unix put_dos_date3(buf, offset, unixdate, cli-serverzone); } -time_t cli_make_unix_date(struct cli_state *cli, void *date_ptr) +time_t cli_make_unix_date(struct cli_state *cli, const void *date_ptr) { return make_unix_date(date_ptr, cli-serverzone); } -time_t cli_make_unix_date2(struct cli_state *cli, void *date_ptr) +time_t cli_make_unix_date2(struct cli_state *cli, const void *date_ptr) { return make_unix_date2(date_ptr, cli-serverzone); } -time_t cli_make_unix_date3(struct cli_state *cli, void *date_ptr) +time_t cli_make_unix_date3(struct cli_state *cli, const void *date_ptr) { return make_unix_date3(date_ptr, cli-serverzone); } diff --git a/source/libsmb/cliconnect.c b/source/libsmb/cliconnect.c index f0b03a8..e3800bf 100644 --- a/source/libsmb/cliconnect.c +++ b/source/libsmb/cliconnect.c @@ -1803,13 +1803,18 @@ struct cli_state *get_ipc_connect(char *server, *
svn commit: samba r26208 - in branches/SAMBA_4_0/source/torture/rpc: .
Author: gd Date: 2007-11-29 21:52:20 + (Thu, 29 Nov 2007) New Revision: 26208 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26208 Log: Add torture test for (unsupported) wkssvc_NetrJoinDomain() and wkssvc_NetrUnjoinDomain(). Guenther Modified: branches/SAMBA_4_0/source/torture/rpc/wkssvc.c Changeset: Modified: branches/SAMBA_4_0/source/torture/rpc/wkssvc.c === --- branches/SAMBA_4_0/source/torture/rpc/wkssvc.c 2007-11-29 17:49:13 UTC (rev 26207) +++ branches/SAMBA_4_0/source/torture/rpc/wkssvc.c 2007-11-29 21:52:20 UTC (rev 26208) @@ -1055,6 +1055,67 @@ return true; } + +static bool test_NetrUnjoinDomain(struct torture_context *tctx, + struct dcerpc_pipe *p) +{ + NTSTATUS status; + struct wkssvc_NetrUnjoinDomain r; + struct cli_credentials *creds = cmdline_credentials; + const char *user = cli_credentials_get_username(creds); + const char *admin_account = NULL; + + admin_account = talloc_asprintf(tctx, %s\\%s, + lp_workgroup(global_loadparm), + user); + + r.in.server_name = dcerpc_server_name(p); + r.in.Account = admin_account; + r.in.password = NULL; + r.in.unjoin_flags = 0; + + torture_comment(tctx, testing NetrUnjoinDomain\n); + + status = dcerpc_wkssvc_NetrUnjoinDomain(p, tctx, r); + torture_assert_ntstatus_ok(tctx, status, + NetrUnjoinDomain failed); + torture_assert_werr_equal(tctx, r.out.result, WERR_NOT_SUPPORTED, + NetrUnjoinDomain failed); + return true; +} + + +static bool test_NetrJoinDomain(struct torture_context *tctx, + struct dcerpc_pipe *p) +{ + NTSTATUS status; + struct wkssvc_NetrJoinDomain r; + struct cli_credentials *creds = cmdline_credentials; + const char *user = cli_credentials_get_username(creds); + const char *admin_account = NULL; + + admin_account = talloc_asprintf(tctx, %s\\%s, + lp_workgroup(global_loadparm), + user); + + r.in.server_name = dcerpc_server_name(p); + r.in.domain_name = lp_realm(global_loadparm); + r.in.account_ou = NULL; + r.in.Account = admin_account; + r.in.password = NULL; + r.in.join_flags = 0; + + torture_comment(tctx, testing NetrJoinDomain\n); + + status = dcerpc_wkssvc_NetrJoinDomain(p, tctx, r); + torture_assert_ntstatus_ok(tctx, status, + NetrJoinDomain failed); + torture_assert_werr_equal(tctx, r.out.result, WERR_NOT_SUPPORTED, + NetrJoinDomain failed); + return true; +} + + struct torture_suite *torture_rpc_wkssvc(TALLOC_CTX *mem_ctx) { struct torture_suite *suite; @@ -1113,6 +1174,12 @@ torture_rpc_tcase_add_test(tcase, NetrEnumerateComputerNames, test_NetrEnumerateComputerNames); + torture_rpc_tcase_add_test(tcase, NetrJoinDomain, + test_NetrJoinDomain); + test-dangerous = true; + torture_rpc_tcase_add_test(tcase, NetrUnjoinDomain, + test_NetrUnjoinDomain); + test-dangerous = true; torture_rpc_tcase_add_test(tcase, NetrGetJoinInformation, test_NetrGetJoinInformation); torture_rpc_tcase_add_test(tcase, NetrGetJoinableOus,
svn commit: samba r26209 - in branches/SAMBA_4_0/source/librpc/idl: .
Author: gd Date: 2007-11-29 21:53:50 + (Thu, 29 Nov 2007) New Revision: 26209 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26209 Log: For consistency, rename one argument in NetrJoinDomain. Guenther Modified: branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl Changeset: Modified: branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl === --- branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-29 21:52:20 UTC (rev 26208) +++ branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-29 21:53:50 UTC (rev 26209) @@ -578,7 +578,7 @@ [in,ref] [string,charset(UTF16)] uint16 *domain_name, [in] [string,charset(UTF16)] uint16 *account_ou, [in] [string,charset(UTF16)] uint16 *Account, - [in] [string,charset(UTF16)] uint16 *unknown, + [in] [string,charset(UTF16)] uint16 *password, [in] wkssvc_joinflags join_flags );
svn commit: samba r26210 - in branches/SAMBA_4_0/source/torture/rpc: .
Author: gd Date: 2007-11-29 22:22:19 + (Thu, 29 Nov 2007) New Revision: 26210 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26210 Log: w00t! Solved the nasty crypto problem of the 524 byte wkssvc_PasswordBuffer for wkssvc_JoinDomain()/wkssvc_UnjoinDomain(). Very soon we will be able to remotely join windows workstations into AD domains using smbtorture :-) Guenther Modified: branches/SAMBA_4_0/source/torture/rpc/wkssvc.c Changeset: Modified: branches/SAMBA_4_0/source/torture/rpc/wkssvc.c === --- branches/SAMBA_4_0/source/torture/rpc/wkssvc.c 2007-11-29 21:53:50 UTC (rev 26209) +++ branches/SAMBA_4_0/source/torture/rpc/wkssvc.c 2007-11-29 22:22:19 UTC (rev 26210) @@ -25,6 +25,8 @@ #include torture/rpc/rpc.h #include lib/cmdline/popt_common.h #include param/param.h +#include lib/crypto/crypto.h +#include libcli/auth/libcli_auth.h #define SMBTORTURE_MACHINE_NAME smbtrt_name #define SMBTORTURE_ALTERNATE_NAME smbtrt_altname @@ -1115,7 +1117,49 @@ return true; } +/* encode a wkssvc_PasswordBuffer for remote joining/unjoining: + * + * similar to samr_CryptPasswordEx. Different: 8byte confounder (instead of + * 16byte), confounder at the beginning of the 516 byte buffer (instead of at + * the end), MD5Update() reordering of session_key and confounder - Guenther */ +static bool encode_wkssvc_join_password_buffer(struct torture_context *tctx, + struct dcerpc_pipe *p, + const char *pwd, + struct wkssvc_PasswordBuffer *pwd_buf) +{ + NTSTATUS status; + uint8_t buffer[516]; + struct MD5Context ctx; + + DATA_BLOB confounded_session_key = data_blob_talloc(tctx, NULL, 16); + DATA_BLOB session_key; + + int confounder_len = 8; + uint8_t confounder[8]; + + encode_pw_buffer(buffer, pwd, STR_UNICODE); + + status = dcerpc_fetch_session_key(p, session_key); + if (!NT_STATUS_IS_OK(status)) { + return false; + } + + generate_random_buffer((uint8_t *)confounder, confounder_len); + + MD5Init(ctx); + MD5Update(ctx, session_key.data, session_key.length); + MD5Update(ctx, confounder, confounder_len); + MD5Final(confounded_session_key.data, ctx); + + arcfour_crypt_blob(buffer, 516, confounded_session_key); + + memcpy(pwd_buf-data[0], confounder, confounder_len); + memcpy(pwd_buf-data[8], buffer, 516); + + return true; +} + struct torture_suite *torture_rpc_wkssvc(TALLOC_CTX *mem_ctx) { struct torture_suite *suite;
svn commit: samba r26212 - in branches/SAMBA_4_0/source/torture/rpc: .
Author: gd Date: 2007-11-29 23:22:49 + (Thu, 29 Nov 2007) New Revision: 26212 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26212 Log: Make test_NetrJoinDomain2() a little more robust against missing parameters. Guenther Modified: branches/SAMBA_4_0/source/torture/rpc/wkssvc.c Changeset: Modified: branches/SAMBA_4_0/source/torture/rpc/wkssvc.c === --- branches/SAMBA_4_0/source/torture/rpc/wkssvc.c 2007-11-29 23:09:37 UTC (rev 26211) +++ branches/SAMBA_4_0/source/torture/rpc/wkssvc.c 2007-11-29 23:22:49 UTC (rev 26212) @@ -1198,10 +1198,11 @@ struct wkssvc_NetrJoinDomain2 r; const char *domain_admin_account = NULL; const char *domain_admin_password = NULL; + const char *domain_name = NULL; struct wkssvc_PasswordBuffer pwd_buf; enum wkssvc_NetJoinStatus join_status; const char *join_name = NULL; - WERROR expected_err = WERR_OK; + WERROR expected_err; /* FIXME: this test assumes to join workstations / servers and does not * handle DCs (WERR_SETUP_DOMAIN_CONTROLLER) */ @@ -1218,6 +1219,8 @@ case NetSetupUnknownStatus: case NetSetupUnjoined: case NetSetupWorkgroupName: + default: + expected_err = WERR_OK; break; } @@ -1229,6 +1232,17 @@ torture, domain_admin_password); + domain_name = lp_parm_string(global_loadparm, NULL, +torture, +domain_name); + + if ((domain_admin_account == NULL) || + (domain_admin_password == NULL) || + (domain_name == NULL)) { + torture_comment(tctx, not enough input parameter\n); + return false; + } + if (!encode_wkssvc_join_password_buffer(tctx, p, domain_admin_password, pwd_buf)) @@ -1237,7 +1251,7 @@ } r.in.server_name = dcerpc_server_name(p); - r.in.domain_name = lp_realm(global_loadparm); + r.in.domain_name = domain_name; r.in.account_ou = NULL; r.in.admin_account = domain_admin_account; r.in.encrypted_password = pwd_buf;
svn commit: samba r26213 - in branches/SAMBA_4_0/source/torture/rpc: .
Author: gd Date: 2007-11-29 23:31:12 + (Thu, 29 Nov 2007) New Revision: 26213 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26213 Log: Trying to fix confusing inline comment about wkssvc_PasswordBuffer. Guenther Modified: branches/SAMBA_4_0/source/torture/rpc/wkssvc.c Changeset: Modified: branches/SAMBA_4_0/source/torture/rpc/wkssvc.c === --- branches/SAMBA_4_0/source/torture/rpc/wkssvc.c 2007-11-29 23:22:49 UTC (rev 26212) +++ branches/SAMBA_4_0/source/torture/rpc/wkssvc.c 2007-11-29 23:31:12 UTC (rev 26213) @@ -1151,8 +1151,9 @@ /* encode a wkssvc_PasswordBuffer for remote joining/unjoining: * * similar to samr_CryptPasswordEx. Different: 8byte confounder (instead of - * 16byte), confounder at the beginning of the 516 byte buffer (instead of at - * the end), MD5Update() reordering of session_key and confounder - Guenther */ + * 16byte), confounder in front of the 516 byte buffer (instead of after that + * buffer), calling MD5Update() first with session_key and then with confounder + * (vice versa in samr) - Guenther */ static bool encode_wkssvc_join_password_buffer(struct torture_context *tctx, struct dcerpc_pipe *p,
svn commit: samba r26211 - in branches/SAMBA_4_0/source: librpc/idl torture/rpc
Author: gd Date: 2007-11-29 23:09:37 + (Thu, 29 Nov 2007) New Revision: 26211 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26211 Log: Add very basic test_NetrJoinDomain2() test which can join xp workstations into an AD domain. Guenther Modified: branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl branches/SAMBA_4_0/source/torture/rpc/wkssvc.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl === --- branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-29 22:22:19 UTC (rev 26210) +++ branches/SAMBA_4_0/source/librpc/idl/wkssvc.idl 2007-11-29 23:09:37 UTC (rev 26211) @@ -689,7 +689,7 @@ WERROR wkssvc_NetrJoinDomain2 ( [in] [string,charset(UTF16)] uint16 *server_name, [in,ref] [string,charset(UTF16)] uint16 *domain_name, - [in] [string,charset(UTF16)] uint16 *account_name, + [in] [string,charset(UTF16)] uint16 *account_ou, [in] [string,charset(UTF16)] uint16 *admin_account, [in] wkssvc_PasswordBuffer *encrypted_password, [in] wkssvc_joinflags join_flags Modified: branches/SAMBA_4_0/source/torture/rpc/wkssvc.c === --- branches/SAMBA_4_0/source/torture/rpc/wkssvc.c 2007-11-29 22:22:19 UTC (rev 26210) +++ branches/SAMBA_4_0/source/torture/rpc/wkssvc.c 2007-11-29 23:09:37 UTC (rev 26211) @@ -1006,6 +1006,38 @@ return true; } +static bool test_GetJoinInformation(struct torture_context *tctx, + struct dcerpc_pipe *p, + enum wkssvc_NetJoinStatus *join_status_p, + const char **name) +{ + NTSTATUS status; + struct wkssvc_NetrGetJoinInformation r; + enum wkssvc_NetJoinStatus join_status; + const char *name_buffer = ; + + r.in.server_name = dcerpc_server_name(p); + r.in.name_buffer = r.out.name_buffer = name_buffer; + r.out.name_type = join_status; + + status = dcerpc_wkssvc_NetrGetJoinInformation(p, tctx, r); + torture_assert_ntstatus_ok(tctx, status, + NetrGetJoinInformation failed); + torture_assert_werr_ok(tctx, r.out.result, + NetrGetJoinInformation failed); + + if (join_status_p) { + *join_status_p = join_status; + } + + if (*name) { + *name = talloc_strdup(tctx, name_buffer); + } + + return true; + +} + static bool test_NetrGetJoinableOus(struct torture_context *tctx, struct dcerpc_pipe *p) { @@ -1086,7 +1118,6 @@ return true; } - static bool test_NetrJoinDomain(struct torture_context *tctx, struct dcerpc_pipe *p) { @@ -1160,6 +1191,69 @@ return true; } +static bool test_NetrJoinDomain2(struct torture_context *tctx, +struct dcerpc_pipe *p) +{ + NTSTATUS status; + struct wkssvc_NetrJoinDomain2 r; + const char *domain_admin_account = NULL; + const char *domain_admin_password = NULL; + struct wkssvc_PasswordBuffer pwd_buf; + enum wkssvc_NetJoinStatus join_status; + const char *join_name = NULL; + WERROR expected_err = WERR_OK; + + /* FIXME: this test assumes to join workstations / servers and does not +* handle DCs (WERR_SETUP_DOMAIN_CONTROLLER) */ + + if (!test_GetJoinInformation(tctx, p, join_status, join_name)) + { + return false; + } + + switch (join_status) { + case NetSetupDomainName: + expected_err = WERR_SETUP_ALREADY_JOINED; + break; + case NetSetupUnknownStatus: + case NetSetupUnjoined: + case NetSetupWorkgroupName: + break; + } + + domain_admin_account = lp_parm_string(global_loadparm, NULL, + torture, + domain_admin_account); + + domain_admin_password = lp_parm_string(global_loadparm, NULL, + torture, + domain_admin_password); + + if (!encode_wkssvc_join_password_buffer(tctx, p, + domain_admin_password, + pwd_buf)) + { + return false; + } + + r.in.server_name = dcerpc_server_name(p); + r.in.domain_name = lp_realm(global_loadparm); + r.in.account_ou = NULL; + r.in.admin_account = domain_admin_account; + r.in.encrypted_password = pwd_buf; +
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-397-gccacd17
The branch, v3-2-test has been updated via ccacd170472869391bd1e5bc850b1467492b8fa3 (commit) from ba9e2be2b5a59684e854609f9d82ea1633448c62 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit ccacd170472869391bd1e5bc850b1467492b8fa3 Author: Jeremy Allison [EMAIL PROTECTED] Date: Thu Nov 29 16:30:18 2007 -0800 Fix memleak. Jeremy. --- Summary of changes: source/lib/fault.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source/lib/fault.c b/source/lib/fault.c index 52c4ae6..b5d290a 100644 --- a/source/lib/fault.c +++ b/source/lib/fault.c @@ -133,6 +133,7 @@ void dump_core_setup(const char *progname) chmod(corepath,0700); SAFE_FREE(corepath); + SAFE_FREE(logbase); #ifdef HAVE_GETRLIMIT #ifdef RLIMIT_CORE -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-400-g20c1ba2
The branch, v3-2-test has been updated via 20c1ba23f2e2902ef7c2237c63addfef2ae75eac (commit) from 7539fb4c840a9b4429f347cebbda9c631746267a (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 20c1ba23f2e2902ef7c2237c63addfef2ae75eac Author: Günther Deschner [EMAIL PROTECTED] Date: Fri Nov 30 02:16:46 2007 +0100 Fix _reg_perfcount_get_instance_info() Guenther --- Summary of changes: source/registry/reg_perfcount.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source/registry/reg_perfcount.c b/source/registry/reg_perfcount.c index 519e0e7..bc22b3d 100644 --- a/source/registry/reg_perfcount.c +++ b/source/registry/reg_perfcount.c @@ -714,7 +714,7 @@ bool _reg_perfcount_get_instance_info(PERF_INSTANCE_DEFINITION *inst, memcpy(buf, data.dptr, MIN(PERFCOUNT_MAX_LEN-1,data.dsize)); buf[PERFCOUNT_MAX_LEN-1] = '\0'; inst-NameLength = rpcstr_push_talloc(ps-mem_ctx, name, buf); - if (inst-NameLength == (size_t)-1 || !name) { + if (inst-NameLength == (uint32_t)-1 || !name) { SAFE_FREE(data.dptr); return False; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-399-g7539fb4
The branch, v3-2-test has been updated via 7539fb4c840a9b4429f347cebbda9c631746267a (commit) via bf4881d7774681e22f270697c7623bde33c30fe0 (commit) from ccacd170472869391bd1e5bc850b1467492b8fa3 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 7539fb4c840a9b4429f347cebbda9c631746267a Author: Günther Deschner [EMAIL PROTECTED] Date: Fri Nov 30 01:44:44 2007 +0100 Merge recent wkssvc changes from samba4. Guenther commit bf4881d7774681e22f270697c7623bde33c30fe0 Author: Günther Deschner [EMAIL PROTECTED] Date: Tue Nov 27 18:09:50 2007 +0100 Fix build warning. Guenther --- Summary of changes: source/lib/util.c |2 +- source/librpc/gen_ndr/cli_wkssvc.c | 319 ++- source/librpc/gen_ndr/cli_wkssvc.h | 50 +- source/librpc/gen_ndr/ndr_wkssvc.c | 6854 +--- source/librpc/gen_ndr/ndr_wkssvc.h | 99 +- source/librpc/gen_ndr/srv_wkssvc.c | 396 ++- source/librpc/gen_ndr/srv_wkssvc.h | 44 +- source/librpc/gen_ndr/wkssvc.h | 581 +++- source/librpc/idl/wkssvc.idl | 543 +++- source/rpc_server/srv_wkssvc_nt.c | 54 +- 10 files changed, 7879 insertions(+), 1063 deletions(-) Changeset truncated at 500 lines: diff --git a/source/lib/util.c b/source/lib/util.c index eeaa7ea..7632364 100644 --- a/source/lib/util.c +++ b/source/lib/util.c @@ -1304,7 +1304,7 @@ int interpret_protocol(const char *str,int def) static char *strip_mount_options(const char *str) { if (*str == '-') { - char *p = str; + const char *p = str; while(*p !isspace(*p)) p++; while(*p isspace(*p)) diff --git a/source/librpc/gen_ndr/cli_wkssvc.c b/source/librpc/gen_ndr/cli_wkssvc.c index 16b1127..8c58b6d 100644 --- a/source/librpc/gen_ndr/cli_wkssvc.c +++ b/source/librpc/gen_ndr/cli_wkssvc.c @@ -72,17 +72,16 @@ NTSTATUS rpccli_wkssvc_NetWkstaSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX * return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetWkstaEnumUsers(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, uint32_t level, union WKS_USER_ENUM_UNION *users, uint32_t prefmaxlen, uint32_t *entriesread, uint32_t *totalentries, uint32_t *resumehandle) +NTSTATUS rpccli_wkssvc_NetWkstaEnumUsers(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, struct wkssvc_NetWkstaEnumUsersInfo *info, uint32_t prefmaxlen, uint32_t *entries_read, uint32_t *resume_handle) { struct wkssvc_NetWkstaEnumUsers r; NTSTATUS status; /* In parameters */ r.in.server_name = server_name; - r.in.level = level; - r.in.users = users; + r.in.info = info; r.in.prefmaxlen = prefmaxlen; - r.in.resumehandle = resumehandle; + r.in.resume_handle = resume_handle; if (DEBUGLEVEL = 10) NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaEnumUsers, r); @@ -101,28 +100,27 @@ NTSTATUS rpccli_wkssvc_NetWkstaEnumUsers(struct rpc_pipe_client *cli, TALLOC_CTX } /* Return variables */ - *users = *r.out.users; - if (entriesread r.out.entriesread) { - *entriesread = *r.out.entriesread; - } - if (totalentries r.out.totalentries) { - *totalentries = *r.out.totalentries; + *info = *r.out.info; + *entries_read = *r.out.entries_read; + if (resume_handle r.out.resume_handle) { + *resume_handle = *r.out.resume_handle; } - *resumehandle = *r.out.resumehandle; /* Return result */ return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_WKSSVC_NETRWKSTAUSERGETINFO(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_wkssvc_NetrWkstaUserGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *unknown, uint32_t level, union wkssvc_NetrWkstaUserInfo *info) { - struct WKSSVC_NETRWKSTAUSERGETINFO r; + struct wkssvc_NetrWkstaUserGetInfo r; NTSTATUS status; /* In parameters */ + r.in.unknown = unknown; + r.in.level = level; if (DEBUGLEVEL = 10) - NDR_PRINT_IN_DEBUG(WKSSVC_NETRWKSTAUSERGETINFO, r); + NDR_PRINT_IN_DEBUG(wkssvc_NetrWkstaUserGetInfo, r); status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, ndr_table_wkssvc, NDR_WKSSVC_NETRWKSTAUSERGETINFO, r); @@ -131,27 +129,32 @@ NTSTATUS rpccli_WKSSVC_NETRWKSTAUSERGETINFO(struct rpc_pipe_client *cli, TALLOC_ } if (DEBUGLEVEL = 10) - NDR_PRINT_OUT_DEBUG(WKSSVC_NETRWKSTAUSERGETINFO, r); + NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaUserGetInfo, r); if
Build status as of Fri Nov 30 00:00:01 2007
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2007-11-29 00:00:59.0 + +++ /home/build/master/cache/broken_results.txt 2007-11-30 00:00:55.0 + @@ -1,4 +1,4 @@ -Build status as of Thu Nov 29 00:00:02 2007 +Build status as of Fri Nov 30 00:00:01 2007 Build counts: Tree Total Broken Panic @@ -9,17 +9,17 @@ distcc 1 0 0 ldb 28 11 0 libreplace 27 11 0 -lorikeet-heimdal 24 15 0 -pidl 17 5 0 +lorikeet-heimdal 24 14 0 +pidl 16 4 0 ppp 10 8 0 python 0 0 0 rsync28 12 0 samba-docs 0 0 0 -samba-gtk4 4 0 -samba4 25 19 1 +samba-gtk3 3 0 +samba4 25 25 0 samba_3_20 0 0 samba_3_2_test 28 17 0 smb-build27 26 0 -talloc 28 7 0 +talloc 27 7 0 tdb 28 5 0
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-401-gcc257b7
The branch, v3-2-test has been updated via cc257b71d13daa47e6f2315d0f07a60eb4aaeca6 (commit) from 20c1ba23f2e2902ef7c2237c63addfef2ae75eac (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit cc257b71d13daa47e6f2315d0f07a60eb4aaeca6 Author: Jeremy Allison [EMAIL PROTECTED] Date: Thu Nov 29 17:25:41 2007 -0800 Remove PSTRING_LEN from smbd/ nmbd/. Remove pstring from libsmb/clidfs.c except for a nasty hack (that will be removed when pstrings are gone from client/). Jeremy. --- Summary of changes: source/client/client.c | 85 --- source/client/smbctool.c| 59 +++-- source/libsmb/cliconnect.c | 15 +- source/libsmb/clidfs.c | 573 --- source/libsmb/libsmbclient.c| 169 +--- source/nmbd/nmbd_sendannounce.c |8 +- source/smbd/password.c |6 +- source/utils/net_rpc.c |5 +- 8 files changed, 530 insertions(+), 390 deletions(-) Changeset truncated at 500 lines: diff --git a/source/client/client.c b/source/client/client.c index 1c54b2d..a65906c 100644 --- a/source/client/client.c +++ b/source/client/client.c @@ -226,7 +226,7 @@ static int do_dskattr(void) struct cli_state *targetcli; pstring targetpath; - if ( !cli_resolve_path( , cli, cur_dir, targetcli, targetpath ) ) { + if ( !cli_resolve_path_pstring( , cli, cur_dir, targetcli, targetpath ) ) { d_printf(Error in dskattr: %s\n, cli_errstr(cli)); return 1; } @@ -286,7 +286,7 @@ static int do_cd(char *newdir) pstring_clean_name(cur_dir); pstrcpy( dname, cur_dir ); - if ( !cli_resolve_path( , cli, dname, targetcli, targetpath ) ) { + if ( !cli_resolve_path_pstring( , cli, dname, targetcli, targetpath ) ) { d_printf(cd %s: %s\n, dname, cli_errstr(cli)); pstrcpy(cur_dir,saved_dir); goto out; @@ -655,7 +655,7 @@ void do_list(const char *mask,uint16 attribute,void (*fn)(file_info *),bool rec, /* check for dfs */ - if ( !cli_resolve_path( , cli, head, targetcli, targetpath ) ) { + if ( !cli_resolve_path_pstring( , cli, head, targetcli, targetpath ) ) { d_printf(do_list: [%s] %s\n, head, cli_errstr(cli)); remove_do_list_queue_head(); continue; @@ -685,7 +685,7 @@ void do_list(const char *mask,uint16 attribute,void (*fn)(file_info *),bool rec, } else { /* check for dfs */ - if ( cli_resolve_path( , cli, mask, targetcli, targetpath ) ) { + if ( cli_resolve_path_pstring( , cli, mask, targetcli, targetpath ) ) { if (cli_list(targetcli, targetpath, attribute, do_list_helper, NULL) == -1) d_printf(%s listing %s\n, cli_errstr(targetcli), targetpath); } @@ -823,7 +823,7 @@ static int do_get(char *rname, char *lname, bool reget) strlower_m(lname); } - if ( !cli_resolve_path( , cli, rname, targetcli, targetname ) ) { + if ( !cli_resolve_path_pstring( , cli, rname, targetcli, targetname ) ) { d_printf(Failed to open %s: %s\n, rname, cli_errstr(cli)); return 1; } @@ -1118,7 +1118,7 @@ static bool do_mkdir(char *name) struct cli_state *targetcli; pstring targetname; - if ( !cli_resolve_path( , cli, name, targetcli, targetname ) ) { + if ( !cli_resolve_path_pstring( , cli, name, targetcli, targetname ) ) { d_printf(mkdir %s: %s\n, name, cli_errstr(cli)); return False; } @@ -1188,7 +1188,7 @@ static int cmd_mkdir(void) pstring targetname; *ddir2 = 0; - if ( !cli_resolve_path( , cli, mask, targetcli, targetname ) ) { + if ( !cli_resolve_path_pstring( , cli, mask, targetcli, targetname ) ) { return 1; } @@ -1250,7 +1250,7 @@ static int do_put(char *rname, char *lname, bool reput) struct cli_state *targetcli; pstring targetname; - if ( !cli_resolve_path( , cli, rname, targetcli, targetname ) ) { + if ( !cli_resolve_path_pstring( , cli, rname, targetcli, targetname ) ) { d_printf(Failed to open %s: %s\n, rname, cli_errstr(cli)); return 1; } @@ -1770,7 +1770,7 @@ static int cmd_wdel(void) pstrcpy(mask,cur_dir); pstrcat(mask,buf); - if ( !cli_resolve_path( , cli, mask,
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-402-gd565891
The branch, v3-2-test has been updated via d5658914c2d6ec878d9a11f8a1fa57f1697362e3 (commit) from cc257b71d13daa47e6f2315d0f07a60eb4aaeca6 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit d5658914c2d6ec878d9a11f8a1fa57f1697362e3 Author: Jeremy Allison [EMAIL PROTECTED] Date: Thu Nov 29 17:47:31 2007 -0800 Remove pstrings from clifile.c. Jeremy. --- Summary of changes: source/libsmb/clifile.c | 61 +++--- 1 files changed, 36 insertions(+), 25 deletions(-) Changeset truncated at 500 lines: diff --git a/source/libsmb/clifile.c b/source/libsmb/clifile.c index 27ad836..e438b6d 100644 --- a/source/libsmb/clifile.c +++ b/source/libsmb/clifile.c @@ -30,8 +30,8 @@ static bool cli_link_internal(struct cli_state *cli, const char *oldname, const unsigned int data_len = 0; unsigned int param_len = 0; uint16 setup = TRANSACT2_SETPATHINFO; - char param[sizeof(pstring)+6]; - pstring data; + char param[1024+6]; + char data[1024]; char *rparam=NULL, *rdata=NULL; char *p; size_t oldlen = 2*(strlen(oldname)+1); @@ -173,7 +173,7 @@ bool cli_unix_getfacl(struct cli_state *cli, const char *name, size_t *prb_size, unsigned int param_len = 0; unsigned int data_len = 0; uint16 setup = TRANSACT2_QPATHINFO; - char param[sizeof(pstring)+6]; + char param[1024+6]; char *rparam=NULL, *rdata=NULL; char *p; @@ -181,7 +181,7 @@ bool cli_unix_getfacl(struct cli_state *cli, const char *name, size_t *prb_size, memset(p, 0, 6); SSVAL(p, 0, SMB_QUERY_POSIX_ACL); p += 6; - p += clistr_push(cli, p, name, sizeof(pstring)-6, STR_TERMINATE); + p += clistr_push(cli, p, name, sizeof(param)-6, STR_TERMINATE); param_len = PTR_DIFF(p, param); if (!cli_send_trans(cli, SMBtrans2, @@ -222,7 +222,7 @@ bool cli_unix_stat(struct cli_state *cli, const char *name, SMB_STRUCT_STAT *sbu unsigned int param_len = 0; unsigned int data_len = 0; uint16 setup = TRANSACT2_QPATHINFO; - char param[sizeof(pstring)+6]; + char param[1024+6]; char *rparam=NULL, *rdata=NULL; char *p; @@ -232,7 +232,7 @@ bool cli_unix_stat(struct cli_state *cli, const char *name, SMB_STRUCT_STAT *sbu memset(p, 0, 6); SSVAL(p, 0, SMB_QUERY_FILE_UNIX_BASIC); p += 6; - p += clistr_push(cli, p, name, sizeof(pstring)-6, STR_TERMINATE); + p += clistr_push(cli, p, name, sizeof(param)-6, STR_TERMINATE); param_len = PTR_DIFF(p, param); if (!cli_send_trans(cli, SMBtrans2, @@ -316,7 +316,7 @@ static bool cli_unix_chmod_chown_internal(struct cli_state *cli, const char *fna unsigned int data_len = 0; unsigned int param_len = 0; uint16 setup = TRANSACT2_SETPATHINFO; - char param[sizeof(pstring)+6]; + char param[1024+6]; char data[100]; char *rparam=NULL, *rdata=NULL; char *p; @@ -615,7 +615,7 @@ int cli_nt_delete_on_close(struct cli_state *cli, int fnum, bool flag) unsigned int data_len = 1; unsigned int param_len = 6; uint16 setup = TRANSACT2_SETFILEINFO; - pstring param; + char param[6]; unsigned char data; char *rparam=NULL, *rdata=NULL; @@ -1359,7 +1359,7 @@ bool cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t) if (!cli_receive_smb(cli)) { return False; } - + if (cli_is_error(cli)) { return False; } @@ -1370,16 +1370,22 @@ bool cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t) / Check for existance of a dir. / + bool cli_chkpath(struct cli_state *cli, const char *path) { - pstring path2; + char *path2 = NULL; char *p; - - pstrcpy(path2,path); + TALLOC_CTX *frame = talloc_stackframe(); + + path2 = talloc_strdup(frame, path); + if (!path2) { + TALLOC_FREE(frame); + return false; + } trim_char(path2,'\0','\\'); if (!*path2) *path2 = '\\'; - + memset(cli-outbuf,'\0',smb_size); set_message(cli-outbuf,0,0,True); SCVAL(cli-outbuf,smb_com,SMBcheckpath); @@ -1393,9 +1399,12 @@ bool cli_chkpath(struct cli_state *cli, const char *path) cli_send_smb(cli); if (!cli_receive_smb(cli)) { + TALLOC_FREE(frame); return False; } + TALLOC_FREE(frame); + if (cli_is_error(cli)) return False;