Re: [Samba] Reverse Lookup Zone
On Mon, 2012-09-24 at 16:47 -0600, Zane Zakraisek wrote: I've compiled, installed, and set up the first Samba release candidate three times this last week, and every time I've noticed that the provision step is not creating a Reverse Lookup Zone. It creates a Forward Lookup Zone with all the A records of the test clients that I join, but there's no Reverse Lookup Zone for the client's PTR records. When I was using the BIND DNS server,I had an operational Reverse Lookup Zone. Is this how it should be? Provision won't create the reverse zone, as there really isn't anything it can do - it doesn't know the full scope of your network, nor does it know if it even should. This applies to both solutions - any reverse zone you had before was not created by provision. You should be able to add a reverse zone with the DNS management tools, but I don't know if this has been explored particularly much yet. Andrew Bartlett -- Andrew Bartletthttp://samba.org/~abartlet/ Authentication Developer, Samba Team http://samba.org -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Slow on one client Win7 program
Got one program that is running very, very slow on version 3.6.8. Using SMB2, logging level 3 I saw a lot of these: [2012/09/24 23:44:43.824970, 3] smbd/smb2_read.c:356(smb2_read_complete) smbd_smb2_read: fnum=[8523/filename] length=2 offset=1656 read=2 [2012/09/24 23:44:43.825499, 3] lib/util.c:1498(fcntl_getlock) fcntl_getlock: fd 34 is returned info 2 pid 0 Seems the files are read in chunks of 2 bytes a call. Most of the files the program is reading are a few Mb, so why is it only reading 2 bytes at a time? In ver 3.6.7 I made a few tests also, and it does matter what you choose for locking, e.g.: kernel oplocks = no oplocks = no level2 oplocks = yes Some tests worked better (e.g. no locks at all), some not, though with 3.6.8 none provides speed. Anyway 3.6.7 had other bugs and was unusable. Other programs seem not to be affected (poss. they don't use smb2?). Another few tests does make a difference: kernel oplocks = no oplocks = yes level2 oplocks = yes Output e.g.: [2012/09/25 08:17:39.042639, 3] smbd/smb2_read.c:356(smb2_read_complete) smbd_smb2_read: fnum=[4824/filename] length=65536 offset=4030464 read=65536 [2012/09/25 08:17:39.046235, 3] smbd/smb2_read.c:356(smb2_read_complete) smbd_smb2_read: fnum=[4824/filename] length=65536 offset=4096000 read=65536 [2012/09/25 08:17:39.050502, 3] smbd/smb2_read.c:356(smb2_read_complete) smbd_smb2_read: fnum=[4824/filename] length=32768 offset=4161536 read=32768 Seems oplocks = yes is fairly stable to give large reads and speed. But why is this? -Huibert. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] Did anybody test smbclient4 against smbd4 using SMB2
Dear everybody, I want to give a shout Did anybody test smbclient4 against smbd4 using SMB2. I failed to do so. I always got the error NT_STATUS_REVISION_MISMATCH. I don't believe that my configuration is wrong. I am checking the source code, but I really want somebody to tell me if they have done it and succeeded. Thanks Jun -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Did anybody test smbclient4 against smbd4 using SMB2
On Tue, 2012-09-25 at 01:14 -0700, Jun Yi wrote: Dear everybody, I want to give a shout Did anybody test smbclient4 against smbd4 using SMB2. I failed to do so. I always got the error NT_STATUS_REVISION_MISMATCH. I don't believe that my configuration is wrong. I am checking the source code, but I really want somebody to tell me if they have done it and succeeded. I'm a little confused by the way you are describing the components you are using, as we don't produce a smbd4. Either way, perhaps it would help if we went back to basics. In master, it seems that the smbclient binaries can use SMB2, but smbclient4 cannot. Can you show your configuration? How are you selecting smb2 on the client and server? What exact version are you running? What exact command fails? What is the full error? If my explanation above isn't enough, an you provide a .pcap network capture and level 10 log? Andrew Bartlett -- Andrew Bartletthttp://samba.org/~abartlet/ Authentication Developer, Samba Team http://samba.org -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Winbind issue using samba 3.6.3
On 24/09/12 22:31, Steve Snedeker wrote: We have a cross platform environment with a Windows 2008 server running Active Directory and many of our workstations are running ubuntu 10.10 using winbind for user authentication. The version of samba running on these boxes is 3.5.4 We are looking to upgrade to Ubuntu 12.04 which runs samba 3.6.3 I am able to connect to the DC, and am able to see the users running the wbinfo -u command, but when I run the getent passwd command I do not see the domain users. I was able to successfully downgrade to samba 3.5.4 and after connecting to the DC I ran the command getent passwd and was able to see the domain users, and su to that particular user successfully. The only issue here was due to dependency issues downgrading to samba 3.5.4 resulted in libwbclient0 being downgraded which resulted in the removal of ubuntu-desktop. /etc/nsswitch.conf # /etc/nsswitch.conf # # Example configuration of GNU Name Service Switch functionality. # If you have the `glibc-doc-reference' and `info' packages installed, try: # `info libc Name Service Switch' for information about this file. passwd: files winbind group: files winbind shadow: files winbind hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 networks: files protocols: db files services: db files ethers: db files rpc: db files netgroup: nis -- /etc/samba/smb.conf [global] security = ads realm = DOMAIN.COM password server = pdc.domain.com bdc.domain.com workgroup = DOMAIN idmap backend = rid:DOMAN=1-2 idmap uid = 1-2 idmap gid = 1-2 winbind enum users = yes winbind enum groups = yes winbind refresh tickets = yes template homedir = /vhome/%U template shell = /bin/bash client use spnego = yes client ntlmv2 auth = yes encrypt passwords = yes winbind use default domain = yes restrict anonymous = 2 I've seen other posts out there with similar problems, but haven't seen a solution that works for me. Hi, I use samba 3.6.3 to connect to a samba4 AD server, but my smb.conf looks nothing like yours. The idmap lines have changed to: idmap config HOME:schema_mode = rfc2307 idmap config HOME:range = 2-310 idmap config HOME:backend = ad idmap config *:range = 1100-2000 idmap config *:backend = tdb You also should not use the password server line anymore, but you also seem to have a spelling mistake: idmap backend = rid:DOMAN=1-2 The final thing is, if there is no unix info on the windows server, winbind cannot pull it, you need the unix extension on the server Rowland -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] Moving to Samba4, DNS problems.
Hi, I've spent the last days building the Samba4 RC1 and trying to move a DC from 2003 to Samba4. I've followed the HowTo's, first to build Samba4, and then to add a domain as a backup domain controller on the Wiki. Everything seems to be working fine. My backup domain controller gets all the information from the PDC, this is LDAP, Kerberos and DNS. As suggested by a message on this list, I moved the fsmo roles to the samba4 server. All OK. Checking for errors and stuff I found that there was no A DNS record for the backup DC on the backup DC. This means that if the /etc/resolv.conf only has an entry like: nameserver IP_OF_THE_BDC then everything else fails. 'dig @BDC_IP samba4.domain.lan' returns en empty result. Trying to replicate DNS information from the PDC always seems to end up ok but the A record is never found on the BDC. Also, trying to demote the PDC, I get a message that that server has the 'last replicated copy' of the DNS Zones on AD, hence it seems something is not correctly moved between DC's. Then, has anyone been able to find how to solve this? My smb.conf has not been modified by me at all. Thanks, Aleix. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] [PATCH] allow to create Unix-UID/SID mapping in samba-tool user create
2012-09-25 11:58 keltezéssel, Alexander Wuerstlein írta: On Tue, 25 Sep 2012 15:49:11 +1000 Andrew Bartlett abart...@samba.org wrote: On Tue, 2012-09-25 at 00:19 +0200, Alexander Wuerstlein wrote: From: Alexander Wuerstlein a...@arw.name Reads Unix UID from NSS or commandline and creates a UID/SID mapping when creating a new user. As Gémes Géza mentions this really needs to honour idmap_ldb:use rfc2307 = yes and set it in the sam.ldb if that is set, and while useful in the general case, for the case you are targeting, the classicupgrade will work better. Classicupgrade would only handle the initial import, not later addition of users which is the more frequent case here. But idmap_ldb:use rfc2307 = yes seems to work fine, and it seems to be a lot less ugly than fiddling with idmap.ldb. I'll try to get samba-tool to create the RFC2307 attributes and send a patch if its not too ugly. Ciao, Alexander Wuerstlein. Hi, Just a suggestion: In my homemade (I hadn't time to develop a proper patch with tests) bash scripts I look for the RID part of the newly created users SID and search for the uidNumber and gidNumber attributes with that value. If none found assign it as uidNumber or gidNumber dependending on if a user or group is going to be created. If the given RID has been assigned as an uidNumber or gidNumber increment it and then try again, until it isn't in use. Cheers Geza Gemes -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Slow on one client Win7 program
On Tue, Sep 25, 2012 at 08:22:31AM +0200, Huibert van Andel wrote: Got one program that is running very, very slow on version 3.6.8. Using SMB2, logging level 3 I saw a lot of these: [2012/09/24 23:44:43.824970, 3] smbd/smb2_read.c:356(smb2_read_complete) smbd_smb2_read: fnum=[8523/filename] length=2 offset=1656 read=2 [2012/09/24 23:44:43.825499, 3] lib/util.c:1498(fcntl_getlock) fcntl_getlock: fd 34 is returned info 2 pid 0 Seems the files are read in chunks of 2 bytes a call. Most of the files the program is reading are a few Mb, so why is it only reading 2 bytes at a time? In ver 3.6.7 I made a few tests also, and it does matter what you choose for locking, e.g.: kernel oplocks = no oplocks = no level2 oplocks = yes Some tests worked better (e.g. no locks at all), some not, though with 3.6.8 none provides speed. Anyway 3.6.7 had other bugs and was unusable. Other programs seem not to be affected (poss. they don't use smb2?). Another few tests does make a difference: kernel oplocks = no oplocks = yes level2 oplocks = yes Output e.g.: [2012/09/25 08:17:39.042639, 3] smbd/smb2_read.c:356(smb2_read_complete) smbd_smb2_read: fnum=[4824/filename] length=65536 offset=4030464 read=65536 [2012/09/25 08:17:39.046235, 3] smbd/smb2_read.c:356(smb2_read_complete) smbd_smb2_read: fnum=[4824/filename] length=65536 offset=4096000 read=65536 [2012/09/25 08:17:39.050502, 3] smbd/smb2_read.c:356(smb2_read_complete) smbd_smb2_read: fnum=[4824/filename] length=32768 offset=4161536 read=32768 Seems oplocks = yes is fairly stable to give large reads and speed. But why is this? That's just the way the protocols work. Many apps use no local buffering, and do ridiculously small IO having only been tested on a local disk (MS can be blamed here for not encouraging developers to use portable stdio, but to make direct syscalls with ReadFile() and WriteFile() - makes apps harder to port to UNIX). In order to make apps run at a reasonable rate against a remote share the Windows client redirector gets oplocks and then batches the small syscall IO into larger 64k network IO, which is why when you have oplocks on you'll get good performance, and terrible performance without. Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] LDAP Account Manager 3.9 released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 LDAP Account Manager (LAM) 3.9 - September 25th, 2012 = LAM is a web frontend for managing accounts stored in an LDAP directory. Announcement: - - LAM now supports Kolab 2.4, Puppet and RFC2307bis automount entries. The self service also supports to set fields to read-only. Full changelog: https://www.ldap-account-manager.org/lamcms/changelog Download: https://www.ldap-account-manager.org/lamcms/releases Features: - - * management of various account types * Unix * Samba 3 * Kolab 2 * Asterisk * Zarafa * DHCP * SSH keys * profiles for account creation * account creation via file upload * automatic creation/deletion of home directories * setting quotas * PDF output for all accounts * editor for organizational units * schema browser * tree view * multiple configuration files * multi-language support: Catalan, Chinese (Traditional + Simplified), Czech, Dutch, English, French, German, Hungarian, Italian, Japanese, Polish, Portuguese, Russian and Spanish * support for LDAP+SSL/TLS Demo installation: - -- You can try our demo installation online. https://www.ldap-account-manager.org/lamcms/liveDemo Support: - If you find a bug please file a bug report. For questions or implementing new features please use the mailinglist and feature request tracker at our homepage https://www.ldap-account-manager.org. Authors Copyright: - Copyright (C) 2003 - 2012: Roland Gruber p...@rolandgruber.de LAM is published under the GNU General Public License. The complete list of licenses can be found in the copyright file. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlBh7zkACgkQq/ywNCsrGZ6SmACeKJe/Mm4wInwKeb5cDDd/IL9m Pm8AnjGe5VeCVlJ0e/Ksqjjuhsxx8LSw =gf6x -END PGP SIGNATURE- -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Slow on one client Win7 program
Op 25-9-2012 19:21, Jeremy schreef: On Tue, Sep 25, 2012 at 08:22:31AM +0200, Huibert wrote: Got one program that is running very, very slow on version 3.6.8. Using SMB2, logging level 3 I saw a lot of these: [2012/09/24 23:44:43.824970, 3] smbd/smb2_read.c:356(smb2_read_complete) smbd_smb2_read: fnum=[8523/filename] length=2 offset=1656 read=2 [2012/09/24 23:44:43.825499, 3] lib/util.c:1498(fcntl_getlock) fcntl_getlock: fd 34 is returned info 2 pid 0 Seems the files are read in chunks of 2 bytes a call. Most of the files the program is reading are a few Mb, so why is it only reading 2 bytes at a time? In ver 3.6.7 I made a few tests also, and it does matter what you choose for locking, e.g.: kernel oplocks = no oplocks = no level2 oplocks = yes Some tests worked better (e.g. no locks at all), some not, though with 3.6.8 none provides speed. Anyway 3.6.7 had other bugs and was unusable. Other programs seem not to be affected (poss. they don't use smb2?). Another few tests does make a difference: kernel oplocks = no oplocks = yes level2 oplocks = yes Output e.g.: [2012/09/25 08:17:39.042639, 3] smbd/smb2_read.c:356(smb2_read_complete) smbd_smb2_read: fnum=[4824/filename] length=65536 offset=4030464 read=65536 [2012/09/25 08:17:39.046235, 3] smbd/smb2_read.c:356(smb2_read_complete) smbd_smb2_read: fnum=[4824/filename] length=65536 offset=4096000 read=65536 [2012/09/25 08:17:39.050502, 3] smbd/smb2_read.c:356(smb2_read_complete) smbd_smb2_read: fnum=[4824/filename] length=32768 offset=4161536 read=32768 Seems oplocks = yes is fairly stable to give large reads and speed. But why is this? That's just the way the protocols work. Many apps use no local buffering, and do ridiculously small IO having only been tested on a local disk (MS can be blamed here for not encouraging developers to use portable stdio, but to make direct syscalls with ReadFile() and WriteFile() - makes apps harder to port to UNIX). In order to make apps run at a reasonable rate against a remote share the Windows client redirector gets oplocks and then batches the small syscall IO into larger 64k network IO, which is why when you have oplocks on you'll get good performance, and terrible performance without. Jeremy. Am I correct that with *not* using SMB2 the windows 7 client director is not doing this optimization? I never got this good using a 3.0 version samba. Any selection of locks and other settings. -Huibert. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] Help with setting up cups and printing in samba4 rc1
Help with setting up cups and printing in samba4 rc1 I need help with setting up cups and printing in samba4 rc1 I have added the shares required for samba4 to use printing but the printers do not show up when you browse the share could someone please help me get my printer to show up in the samba4 share? -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Did anybody test smbclient4 against smbd4 using SMB2
Hi Andrew, I forgot to attach the log at the client side, please find it in the attachment. I also add some debug by myself, please see the following debug output in the client log: -- SMB2 dialect revision received from server is 767 The common SMB2 dialect revision for both client and server is 0 SMB2 dialect revision received from server is 528 The common SMB2 dialect revision for both client and server is 7 NEG SUCCEEDs -- Does the debug output above proved that the negotiation phase is not the problem? I observed that the client silently closed the TCP connection after two rounds of protocol negotiation. Will the problem be the authentication method negotiation? Please point it out to me. Thanks and wait for your reply! Jun On Tue, Sep 25, 2012 at 10:43 AM, Jun Yi yi.jun.m...@gmail.com wrote: Thanks Andrew, Let's first clarify the version I used. I use the master branch, e.g., version 4.1.0, for both client and server sides. I run smbclient4 at the client side: junyij@junyij] ./smbclient4 -V Version 4.1.0pre1-DEVELOPERBUILD junyij@junyij] ./smbclient4 -m SMB2 -W smb-workgroup -U junyij //localhost/share1 Connection to \\localhost\share1 failed - NT_STATUS_REVISION_MISMATCH I run sbmd at the server side with configuration file /etc/samba/smb.conf junyij@junyij] sudo ./smbd -V Version 4.1.0pre1-DEVELOPERBUILD sudo ./smbd -s /etc/samba/smb.conf -d 10 -l smbd-4 junyij@junyij] cat /etc/samba/smb.conf [global] workgroup = smb-workgroup max protocol = SMB2 min protocol = SMB2 [share1] path = /tmp The generated log file ./smbd-4/log.smbd and the captured txt file (using filter tcp.port == 445 for wireshark) are attached in this email. Please forgive me that I used a very old wireshark which can save it as pcap file. Thanks and earnestly wait for your reply. Jun On Tue, Sep 25, 2012 at 2:10 AM, Andrew Bartlett abart...@samba.orgwrote: On Tue, 2012-09-25 at 01:14 -0700, Jun Yi wrote: Dear everybody, I want to give a shout Did anybody test smbclient4 against smbd4 using SMB2. I failed to do so. I always got the error NT_STATUS_REVISION_MISMATCH. I don't believe that my configuration is wrong. I am checking the source code, but I really want somebody to tell me if they have done it and succeeded. I'm a little confused by the way you are describing the components you are using, as we don't produce a smbd4. Either way, perhaps it would help if we went back to basics. In master, it seems that the smbclient binaries can use SMB2, but smbclient4 cannot. Can you show your configuration? How are you selecting smb2 on the client and server? What exact version are you running? What exact command fails? What is the full error? If my explanation above isn't enough, an you provide a .pcap network capture and level 10 log? Andrew Bartlett -- Andrew Bartlett http://samba.org/~abartlet/ Authentication Developer, Samba Team http://samba.org -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] Samba 3 printing and CUPS
I am trying to set up Samba 3 with CUPS printers, and installing the drivers to the server. I have been able to add drivers to the server just fine, but when a client connects to a printer and tries to set it up, Windows 7 is seeing a null printer type, so it is not finding the appropriate drivers. Windows 7 says The '' printer driver is not installed on this computer …. So it appears that the type of printer is null when it gets passed back to windows 7, and it doesn't know what kind of printer to search for drivers for. CUPS has the correct printer models listed in it. Am I missing something? -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Samba 3 printing and CUPS
In addition, this is what I am seeing in CUPS: Unpacked printer [PRINTERNAME] name [\\SERVER\PRINTERNAME] running driver [] -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Samba 3 printing and CUPS
Hi Kristofer, Have you tried adding the directive use client drivers = yes in the printers section of smb.conf? On 9/25/2012 3:55 PM, Kristofer wrote: I am trying to set up Samba 3 with CUPS printers, and installing the drivers to the server. I have been able to add drivers to the server just fine, but when a client connects to a printer and tries to set it up, Windows 7 is seeing a null printer type, so it is not finding the appropriate drivers. Windows 7 says The '' printer driver is not installed on this computer …. So it appears that the type of printer is null when it gets passed back to windows 7, and it doesn't know what kind of printer to search for drivers for. CUPS has the correct printer models listed in it. Am I missing something? -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Did anybody test smbclient4 against smbd4 using SMB2
On Tue, 2012-09-25 at 10:43 -0700, Jun Yi wrote: Thanks Andrew, Let's first clarify the version I used. I use the master branch, e.g., version 4.1.0, for both client and server sides. I run smbclient4 at the client side: junyij@junyij] ./smbclient4 -V Version 4.1.0pre1-DEVELOPERBUILD junyij@junyij] ./smbclient4 -m SMB2 -W smb-workgroup -U junyij //localhost/share1 Connection to \\localhost\share1 failed - NT_STATUS_REVISION_MISMATCH I run sbmd at the server side with configuration file /etc/samba/smb.conf junyij@junyij] sudo ./smbd -V Version 4.1.0pre1-DEVELOPERBUILD sudo ./smbd -s /etc/samba/smb.conf -d 10 -l smbd-4 junyij@junyij] cat /etc/samba/smb.conf [global] workgroup = smb-workgroup max protocol = SMB2 min protocol = SMB2 [share1] path = /tmp I examined the source code used by smbclient4, and as far as I can tell this tool simply cannot do smb2. Therefore, as you have seen, this will fail. You could try 'smbclient' (which uses a different codebase), which appears to have some support, but I'm not sure exactly how much is connected there. Andrew Bartlett -- Andrew Bartletthttp://samba.org/~abartlet/ Authentication Developer, Samba Team http://samba.org -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Samba 3 printing and CUPS
Have you tried adding the directive use client drivers = yes in the printers section of smb.conf? Carolos, I have not. The reason is because in the man page I read This parameter MUST not be enabled on a print share which has valid print driver installed on the Samba server. But in fact, I want to install printer drivers to the Samba server, and from best I can tell, it is installing them successfully. The files are going into the correct path, and Windows is not returning an error. Unless I am misunderstanding that option completely? -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] Samba 3 and cupsaddsmb
I can't even get cupsaddsmb to work right. I followed the configuration instructions from the documentation, and my smb.conf matches what the cupsaddsmb man page says. I am getting extremely frustrated with this and not being able to allow clients to download drivers from Samba. With cupsaddsmb, this is the error I am receiving when it gets to this point, over and over: Running command: rpcclient localhost -N -A /tmp/cupsDdRS7Y -c 'adddriver Windows NT x86 pw003:pscript5.dll:pw003.ppd:ps5ui.dll:pscript.hlp:NULL:RAW:pscript5.dll,pw003.ppd,ps5ui.dll,pscript.hlp,pscript.ntf,cups6.ini,cupsps6.dll,cupsui6.dll' result was WERR_INVALID_PARAM What in the heck is going on? Why can I not get any of this to work? -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Did anybody test smbclient4 against smbd4 using SMB2
Thanks Andrew. I found the code path for smbclient4 is up to date at most of 2007. So it may be outdated. I also found the code path for smbclient is outdated too. smbclient is older than smbclient4 and it can only supports smb1. I type smbclient -m SMB2 //server/share and get message SMB2 protocol unrecognized. I have the following two questions: 1: how to build smbtorture in the master branch. Does smbtorture support SMB2? Did anybody use smbtorture to test against smbd daily? Where can I find the document for smbtorture---smbd tests. 2: Did anybody use smbtorture to test against windows servers (for example windows 7 or windows server 2008 R2). Could you please tell me how to do that and where I can find the document? 3: I read a little of smbtorture source code (I will read more). I know where to add a new test case into the framework. To add a runnable test case, what part of the source codes should I read. Should I read the entire source code? Thanks and wait for your reply Jun On Tue, Sep 25, 2012 at 2:08 PM, Andrew Bartlett abart...@samba.org wrote: On Tue, 2012-09-25 at 10:43 -0700, Jun Yi wrote: Thanks Andrew, Let's first clarify the version I used. I use the master branch, e.g., version 4.1.0, for both client and server sides. I run smbclient4 at the client side: junyij@junyij] ./smbclient4 -V Version 4.1.0pre1-DEVELOPERBUILD junyij@junyij] ./smbclient4 -m SMB2 -W smb-workgroup -U junyij //localhost/share1 Connection to \\localhost\share1 failed - NT_STATUS_REVISION_MISMATCH I run sbmd at the server side with configuration file /etc/samba/smb.conf junyij@junyij] sudo ./smbd -V Version 4.1.0pre1-DEVELOPERBUILD sudo ./smbd -s /etc/samba/smb.conf -d 10 -l smbd-4 junyij@junyij] cat /etc/samba/smb.conf [global] workgroup = smb-workgroup max protocol = SMB2 min protocol = SMB2 [share1] path = /tmp I examined the source code used by smbclient4, and as far as I can tell this tool simply cannot do smb2. Therefore, as you have seen, this will fail. You could try 'smbclient' (which uses a different codebase), which appears to have some support, but I'm not sure exactly how much is connected there. Andrew Bartlett -- Andrew Bartletthttp://samba.org/~abartlet/ Authentication Developer, Samba Team http://samba.org -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Did anybody test smbclient4 against smbd4 using SMB2
On Tue, 2012-09-25 at 16:05 -0700, Jun Yi wrote: Thanks Andrew. I found the code path for smbclient4 is up to date at most of 2007. So it may be outdated. I also found the code path for smbclient is outdated too. smbclient is older than smbclient4 and it can only supports smb1. I type smbclient -m SMB2 //server/share and get message SMB2 protocol unrecognized. That's interesting, but not unexpected. The focus of the team has been in smbtorture tests and enabling windows clients, and it seems nobody has turned their attention to using this in our client code. The message you get is from the simple switch statement in source3/lib/util.c:interpret_protocol(). However, I would be quite surprised if changing that suddenly made the rest of the code work. I have the following two questions: 1: how to build smbtorture in the master branch. Does smbtorture support SMB2? Did anybody use smbtorture to test against smbd daily? Where can I find the document for smbtorture---smbd tests. Yes, these tests are run multiple times per day in our automated selftest system. This is started with 'make test'. 2: Did anybody use smbtorture to test against windows servers (for example windows 7 or windows server 2008 R2). Could you please tell me how to do that and where I can find the document? Generally you can run any test with something like 'smbtorture //host/share test.name -Uuser%pass' 3: I read a little of smbtorture source code (I will read more). I know where to add a new test case into the framework. To add a runnable test case, what part of the source codes should I read. Should I read the entire source code? Volker gave you some clues earlier, I suggest following those up. Registering new tests is a little tricky, the easiest way essentially is to follow the example of a similar test you wish to adapt. Andrew Bartlett -- Andrew Bartletthttp://samba.org/~abartlet/ Authentication Developer, Samba Team http://samba.org -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Samba 3 and cupsaddsmb
This is the error with verbose output: pc_api_pipe: got frag len of 28 at offset 0: NT_STATUS_OK rpc_api_pipe: host localhost returned 8 bytes. spoolss_AddPrinterDriver: struct spoolss_AddPrinterDriver out: struct spoolss_AddPrinterDriver result : WERR_INVALID_PARAM result was WERR_INVALID_PARAM On Sep 25, 2012, at 5:59 PM, Kristofer wrote: I can't even get cupsaddsmb to work right. I followed the configuration instructions from the documentation, and my smb.conf matches what the cupsaddsmb man page says. I am getting extremely frustrated with this and not being able to allow clients to download drivers from Samba. With cupsaddsmb, this is the error I am receiving when it gets to this point, over and over: Running command: rpcclient localhost -N -A /tmp/cupsDdRS7Y -c 'adddriver Windows NT x86 pw003:pscript5.dll:pw003.ppd:ps5ui.dll:pscript.hlp:NULL:RAW:pscript5.dll,pw003.ppd,ps5ui.dll,pscript.hlp,pscript.ntf,cups6.ini,cupsps6.dll,cupsui6.dll' result was WERR_INVALID_PARAM What in the heck is going on? Why can I not get any of this to work? -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Samba 3 and cupsaddsmb
On Tue, 2012-09-25 at 17:59 -0500, Kristofer wrote: I can't even get cupsaddsmb to work right. I followed the configuration instructions from the documentation, and my smb.conf matches what the cupsaddsmb man page says. I am getting extremely frustrated with this and not being able to allow clients to download drivers from Samba. With cupsaddsmb, this is the error I am receiving when it gets to this point, over and over: Running command: rpcclient localhost -N -A /tmp/cupsDdRS7Y -c 'adddriver Windows NT x86 pw003:pscript5.dll:pw003.ppd:ps5ui.dll:pscript.hlp:NULL:RAW:pscript5.dll,pw003.ppd,ps5ui.dll,pscript.hlp,pscript.ntf,cups6.ini,cupsps6.dll,cupsui6.dll' result was WERR_INVALID_PARAM What in the heck is going on? Why can I not get any of this to work? Even if you could get it to work, is this really what you want? Printing with native Windows drivers is the more normal pattern these days, rather than printing postscript and getting CUPS to do the conversion. Andrew Bartlett -- Andrew Bartletthttp://samba.org/~abartlet/ Authentication Developer, Samba Team http://samba.org -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Samba 3 and cupsaddsmb
Even if you could get it to work, is this really what you want? Printing with native Windows drivers is the more normal pattern these days, rather than printing postscript and getting CUPS to do the conversion. I want to use the Windows drivers (see earlier thread which I created), but that continuously fails, so I was trying this - and it fails for me as well. I'm batting 0% at Samba + Windows driver auto install. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 1c1ae6d docs: Change TOSHARG-VFS to avoid suggesting VFS modules are Linux/IRIX only via a92d95b docs: Remove mention of auth methods in TOSHARG-Passdb via 39b1ce1 docs: Fix typo in TOSHARG-Passdb via e3f554a docs: Remove Win9X/WinMe mentions from TOSHARG-PDC via f82affa docs: Add mention of AD DC support in TOSHARG-PDC via 6fcb95b docs: Explain the no-domain-logons restriction applies to all HOME editions via 3be323c docs: Remove references to default paramters in TOSHARG-PDC via f3ab050 docs: Update TOSHARG-Install via c4f143f client: Fix talloc_stackframe() free order assertion in developer mode from 6749cfb replace: Avoid returning value in void setproctitle() replacement. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 1c1ae6d639364533c4b23cb71c471d0d46bfff36 Author: Andrew Bartlett abart...@samba.org Date: Tue Sep 25 11:05:37 2012 +1000 docs: Change TOSHARG-VFS to avoid suggesting VFS modules are Linux/IRIX only Autobuild-User(master): Andrew Bartlett abart...@samba.org Autobuild-Date(master): Tue Sep 25 08:27:15 CEST 2012 on sn-devel-104 commit a92d95b1773cb024349a0a06432b685d69d59976 Author: Andrew Bartlett abart...@samba.org Date: Tue Sep 25 11:05:01 2012 +1000 docs: Remove mention of auth methods in TOSHARG-Passdb This is not connected to the passdb system, and we should not encourage setting of auth methods in any case. Andrew Bartlett commit 39b1ce102d4d8bca472ae96966e2afab83e8f1c0 Author: Andrew Bartlett abart...@samba.org Date: Tue Sep 25 11:04:14 2012 +1000 docs: Fix typo in TOSHARG-Passdb commit e3f554a99f3871eabac35db1ba3236772ef58f64 Author: Andrew Bartlett abart...@samba.org Date: Sun Sep 23 04:55:20 2012 +1000 docs: Remove Win9X/WinMe mentions from TOSHARG-PDC commit f82affaa6defef52696f69f114143cfb80fee241 Author: Andrew Bartlett abart...@samba.org Date: Sun Sep 23 04:54:24 2012 +1000 docs: Add mention of AD DC support in TOSHARG-PDC commit 6fcb95bad7db8f970ae6c74f1fdd7b4c2a41f25c Author: Andrew Bartlett abart...@samba.org Date: Sun Sep 23 04:53:55 2012 +1000 docs: Explain the no-domain-logons restriction applies to all HOME editions commit 3be323c6110f1a241f86aacb94c8ff1ba69351c5 Author: Andrew Bartlett abart...@samba.org Date: Sun Sep 23 04:52:56 2012 +1000 docs: Remove references to default paramters in TOSHARG-PDC commit f3ab05003ea94ba2717b544d912ec3e15fb629d5 Author: Andrew Bartlett abart...@samba.org Date: Sun Sep 23 03:09:32 2012 +1000 docs: Update TOSHARG-Install - winbindd runs as many processes now - open_oplock_ipc errors do not happen any more, we do not use UDP messaging any more. Andrew Bartlett commit c4f143f9d7a1502712d8a6b1c872a13632a5cff3 Author: Andrew Bartlett abart...@samba.org Date: Tue Sep 25 10:41:05 2012 +1000 client: Fix talloc_stackframe() free order assertion in developer mode Reported-by: Ricky Nance ricky.na...@weaubleau.k12.mo.us --- Summary of changes: docs-xml/Samba3-HOWTO/TOSHARG-Install.xml | 20 +-- docs-xml/Samba3-HOWTO/TOSHARG-PDC.xml | 386 ++--- docs-xml/Samba3-HOWTO/TOSHARG-Passdb.xml | 14 +- docs-xml/Samba3-HOWTO/TOSHARG-VFS.xml |3 +- source3/client/client.c |1 + 5 files changed, 76 insertions(+), 348 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/Samba3-HOWTO/TOSHARG-Install.xml b/docs-xml/Samba3-HOWTO/TOSHARG-Install.xml index 673ba93..88e0ed8 100644 --- a/docs-xml/Samba3-HOWTO/TOSHARG-Install.xml +++ b/docs-xml/Samba3-HOWTO/TOSHARG-Install.xml @@ -657,24 +657,8 @@ The following questions and issues are raised repeatedly on the Samba mailing li /para para - winbindd; will run as one or two daemons, depending on whether or not it is being - run in emphasissplit mode/emphasis (in which case there will be two instances). - /para - - /sect2 - - sect2 - titleError Message: open_oplock_ipc/title - - para - An error message is observed in the log files when smbd; is started: quoteopen_oplock_ipc: Failed to - get local UDP socket for address 17f. Error was Cannot assign requested./quote - /para - - para - Your loopback device isn't working correctly. Make sure it is configured correctly. The loopback - device is an internal (virtual) network device with the IP address emphasis127.0.0.1/emphasis. - Read your OS documentation for details on how to configure the loopback on your system. + winbindd; will run as many processes depending in part on how many + domains it needs to contact. /para
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 456f821 s3: Fix indentation of if-expressions from 1c1ae6d docs: Change TOSHARG-VFS to avoid suggesting VFS modules are Linux/IRIX only http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 456f821626b50e20acc943c7586f1e1cff40f25f Author: Volker Lendecke v...@samba.org Date: Tue Sep 4 09:16:55 2012 +0200 s3: Fix indentation of if-expressions To me this makes open_file_ntcreate a little easier to understand Autobuild-User(master): Volker Lendecke v...@samba.org Autobuild-Date(master): Tue Sep 25 10:08:15 CEST 2012 on sn-devel-104 --- Summary of changes: source3/smbd/open.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 7312707..d142d96 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -2122,12 +2122,13 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, */ if ((access_mask (FILE_WRITE_DATA | FILE_APPEND_DATA)) || - (oplock_request FORCE_OPLOCK_BREAK_TO_NONE)) { + (oplock_request FORCE_OPLOCK_BREAK_TO_NONE)) { /* DENY_DOS opens are always underlying read-write on the file handle, no matter what the requested access mask says. */ if ((private_flags NTCREATEX_OPTIONS_PRIVATE_DENY_DOS) || - access_mask (FILE_READ_ATTRIBUTES|FILE_READ_DATA|FILE_READ_EA|FILE_EXECUTE)) { + access_mask (FILE_READ_ATTRIBUTES|FILE_READ_DATA| + FILE_READ_EA|FILE_EXECUTE)) { flags = O_RDWR; } else { flags = O_WRONLY; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 849648c lib: Make async_sock includable on its own via f01013b s4-torture: Fix some nonemtpy blank lines from 456f821 s3: Fix indentation of if-expressions http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 849648cdb2ee07d5a0ec687bf5eba900db5c9001 Author: Volker Lendecke v...@samba.org Date: Sun Aug 12 14:29:26 2012 +0200 lib: Make async_sock includable on its own Autobuild-User(master): Volker Lendecke v...@samba.org Autobuild-Date(master): Tue Sep 25 18:03:46 CEST 2012 on sn-devel-104 commit f01013b1a47b3dcd6e8099fe69895136e5bab5ad Author: Volker Lendecke v...@samba.org Date: Thu Sep 13 16:52:44 2012 +0200 s4-torture: Fix some nonemtpy blank lines --- Summary of changes: lib/async_req/async_sock.h |1 + source4/torture/basic/delaywrite.c | 24 2 files changed, 13 insertions(+), 12 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/async_req/async_sock.h b/lib/async_req/async_sock.h index 1910643..af917bc 100644 --- a/lib/async_req/async_sock.h +++ b/lib/async_req/async_sock.h @@ -26,6 +26,7 @@ #include talloc.h #include tevent.h +#include system/network.h struct tevent_req *sendto_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, int fd, const void *buf, size_t len, int flags, diff --git a/source4/torture/basic/delaywrite.c b/source4/torture/basic/delaywrite.c index 15482d8..23a17d5 100644 --- a/source4/torture/basic/delaywrite.c +++ b/source4/torture/basic/delaywrite.c @@ -1262,42 +1262,42 @@ static bool test_finfo_after_write(struct torture_context *tctx, struct smbcli_s ret = false; goto done; } - + written = smbcli_write(cli2-tree, fnum2, 0, x, 0, 1); - + if (written != 1) { torture_result(tctx, TORTURE_FAIL, __location__: written gave %d - should have been 1, (int)written); ret = false; goto done; } - + finfo2.basic_info.level = RAW_FILEINFO_BASIC_INFO; finfo2.basic_info.in.file.path = fname; - + status = smb_raw_pathinfo(cli2-tree, tctx, finfo2); - + if (!NT_STATUS_IS_OK(status)) { torture_result(tctx, TORTURE_FAIL, __location__: fileinfo failed: %s, nt_errstr(status)); ret = false; goto done; } - + if (finfo1.basic_info.out.create_time != finfo2.basic_info.out.create_time) { torture_result(tctx, TORTURE_FAIL, __location__: create_time changed); ret = false; goto done; } - + if (finfo1.basic_info.out.access_time != finfo2.basic_info.out.access_time) { torture_result(tctx, TORTURE_FAIL, __location__: access_time changed); ret = false; goto done; } - + if (finfo1.basic_info.out.write_time != finfo2.basic_info.out.write_time) { torture_result(tctx, TORTURE_FAIL, __location__: write_time changed:\n @@ -1307,19 +1307,19 @@ static bool test_finfo_after_write(struct torture_context *tctx, struct smbcli_s ret = false; goto done; } - + if (finfo1.basic_info.out.change_time != finfo2.basic_info.out.change_time) { torture_result(tctx, TORTURE_FAIL, __location__: change_time changed); ret = false; goto done; } - + /* One of the two following calls updates the qpathinfo. */ - + /* If you had skipped the smbcli_write on fnum2, it would * *not* have updated the stat on disk */ - + smbcli_close(cli2-tree, fnum2); cli2 = NULL; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via c034ff7 s3: Slightly simplify is_stat_open via 34f2d189 s3: Make is_stat_open() a bit more readable from 849648c lib: Make async_sock includable on its own http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit c034ff7b1516f827ab4538613ec98daa170d9f25 Author: Volker Lendecke v...@samba.org Date: Wed Sep 5 15:24:46 2012 +0200 s3: Slightly simplify is_stat_open The access_bits clause is redundant. is_stat_open says that exactly at least one of the stat_open_bits must be set and none else. Autobuild-User(master): Volker Lendecke v...@samba.org Autobuild-Date(master): Tue Sep 25 20:05:06 CEST 2012 on sn-devel-104 commit 34f2d189846de2cd134756d8f435370b69afb49d Author: Volker Lendecke v...@samba.org Date: Wed Sep 5 15:19:28 2012 +0200 s3: Make is_stat_open() a bit more readable --- Summary of changes: source3/smbd/open.c | 12 +++- 1 files changed, 7 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/open.c b/source3/smbd/open.c index d142d96..34d5526 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -1066,11 +1066,13 @@ static void validate_my_share_entries(struct smbd_server_connection *sconn, bool is_stat_open(uint32 access_mask) { - return (access_mask - ((access_mask ~(SYNCHRONIZE_ACCESS| FILE_READ_ATTRIBUTES| - FILE_WRITE_ATTRIBUTES))==0) - ((access_mask (SYNCHRONIZE_ACCESS|FILE_READ_ATTRIBUTES| -FILE_WRITE_ATTRIBUTES)) != 0)); + const uint32_t stat_open_bits = + (SYNCHRONIZE_ACCESS| +FILE_READ_ATTRIBUTES| +FILE_WRITE_ATTRIBUTES); + + return (((access_mask stat_open_bits) != 0) + ((access_mask ~stat_open_bits) == 0)); } / -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8090046 pyntdb: Fix init function for ntdb python module. via fa332b7 s4-python: Override SIGINT handler in scripts only. from c034ff7 s3: Slightly simplify is_stat_open http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 809004689a5ec60066d1ae26e9599ec09895c46c Author: Pierre Lejeune superhe...@gmail.com Date: Tue Sep 25 20:56:37 2012 +0200 pyntdb: Fix init function for ntdb python module. Signed-Off-By: Jelmer Vernooij jel...@samba.org Autobuild-User(master): Jelmer Vernooij jel...@samba.org Autobuild-Date(master): Tue Sep 25 22:40:39 CEST 2012 on sn-devel-104 commit fa332b71dc71d23f1475ed6c25a6376934ab652a Author: Jelmer Vernooij jel...@samba.org Date: Tue Sep 25 20:49:22 2012 +0200 s4-python: Override SIGINT handler in scripts only. Override the SIGINT handler in a few select cases only, rather than doing so in one of the samba Python modules. I've done this where it matters most; we can add this code to other scripts too if necessary. This means that importing the 'samba' module from a third party application does not have side-effects on the state of the signal handlers. Bug: https://bugzilla.samba.org/show_bug.cgi?id=9068 --- Summary of changes: lib/ntdb/pyntdb.c|4 ++-- source4/scripting/bin/samba-tool |7 +++ source4/scripting/bin/samba_upgradeprovision |6 ++ source4/scripting/bin/smbstatus |8 +++- source4/scripting/bin/subunitrun |6 ++ source4/scripting/python/pyglue.c|7 --- 6 files changed, 28 insertions(+), 10 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/ntdb/pyntdb.c b/lib/ntdb/pyntdb.c index 1037f3c..e4965fb 100644 --- a/lib/ntdb/pyntdb.c +++ b/lib/ntdb/pyntdb.c @@ -550,8 +550,8 @@ static PyMethodDef ntdb_methods[] = { { NULL } }; -void inittdb(void); -void inittdb(void) +void initntdb(void); +void initntdb(void) { PyObject *m; diff --git a/source4/scripting/bin/samba-tool b/source4/scripting/bin/samba-tool index 8ec6514..bb96626 100755 --- a/source4/scripting/bin/samba-tool +++ b/source4/scripting/bin/samba-tool @@ -1,6 +1,7 @@ #!/usr/bin/env python # Unix SMB/CIFS implementation. +# Copyright (C) Jelmer Vernooij jel...@samba.org 2008-2012 # Copyright (C) Amitay Isaacs ami...@gmail.com 2011 # Copyright (C) Giampaolo Lauria laur...@yahoo.com 2011 # @@ -23,6 +24,12 @@ import sys # Find right direction when running from source tree sys.path.insert(0, bin/python) +# make sure the script dies immediately when hitting control-C, +# rather than raising KeyboardInterrupt. As we do all database +# operations using transactions, this is safe. +import signal +signal.signal(signal.SIGINT, signal.SIG_DFL) + from samba.netcmd.main import cmd_sambatool cmd = cmd_sambatool() subcommand = None diff --git a/source4/scripting/bin/samba_upgradeprovision b/source4/scripting/bin/samba_upgradeprovision index 344d7f5..54ffbea 100755 --- a/source4/scripting/bin/samba_upgradeprovision +++ b/source4/scripting/bin/samba_upgradeprovision @@ -66,6 +66,12 @@ from samba.upgradehelpers import (dn_sort, get_paths, newprovision, print_provision_ranges) from samba.xattr import copytree_with_xattrs +# make sure the script dies immediately when hitting control-C, +# rather than raising KeyboardInterrupt. As we do all database +# operations using transactions, this is safe. +import signal +signal.signal(signal.SIGINT, signal.SIG_DFL) + replace=2**FLAG_MOD_REPLACE add=2**FLAG_MOD_ADD delete=2**FLAG_MOD_DELETE diff --git a/source4/scripting/bin/smbstatus b/source4/scripting/bin/smbstatus index 055753b..7ff98df 100755 --- a/source4/scripting/bin/smbstatus +++ b/source4/scripting/bin/smbstatus @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # # provide information on connected users and open files -# Copyright ǒ Jelmer Vernooij 2008 +# Copyright (c) Jelmer Vernooij 2008 # # Based on the original in EJS: # Copyright Andrew Tridgell 2005 @@ -11,6 +11,12 @@ import os, sys +# make sure the script dies immediately when hitting control-C, +# rather than raising KeyboardInterrupt. As we do all database +# operations using transactions, this is safe. +import signal +signal.signal(signal.SIGINT, signal.SIG_DFL) + sys.path.insert(0, bin/python) import optparse diff --git a/source4/scripting/bin/subunitrun b/source4/scripting/bin/subunitrun index df46b08..15a78bf 100755 --- a/source4/scripting/bin/subunitrun +++ b/source4/scripting/bin/subunitrun @@ -28,6 +28,12 @@ import sys +# make sure the script dies immediately when hitting control-C, +# rather than raising KeyboardInterrupt. As we do all database +#
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 7600fd8 s3: Factor out calculate_open_access_flags via e0de443 s3: Slightly simplify smbd_smb2_request_process_negprot via 1b403d4 s3: Fix some blank line endings via 11af163 s3: Fix a typo via 0feb341 pysmbd: Fix cutpaste errors from 8090046 pyntdb: Fix init function for ntdb python module. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 7600fd8b0cef3f1de99204ebdd14115a5f36c958 Author: Volker Lendecke v...@samba.org Date: Tue Sep 4 09:22:49 2012 +0200 s3: Factor out calculate_open_access_flags Autobuild-User(master): Volker Lendecke v...@samba.org Autobuild-Date(master): Wed Sep 26 00:22:56 CEST 2012 on sn-devel-104 commit e0de443af80ee6231f4deddc5c7b4534d8c11f83 Author: Volker Lendecke v...@samba.org Date: Wed Sep 12 16:43:36 2012 +0200 s3: Slightly simplify smbd_smb2_request_process_negprot Remove a nested if-statement commit 1b403d46c7a94645c72fead6758d81f5b20298cc Author: Volker Lendecke v...@samba.org Date: Mon Sep 24 14:11:05 2012 -0700 s3: Fix some blank line endings commit 11af163df89f504da6d9b0878fe99e2941a1d6d6 Author: Volker Lendecke v...@samba.org Date: Tue Sep 25 10:34:49 2012 -0700 s3: Fix a typo commit 0feb341502ee5ff1f7d6cff41496a99ba47280d2 Author: Volker Lendecke v...@samba.org Date: Mon Sep 24 14:18:42 2012 -0700 pysmbd: Fix cutpaste errors --- Summary of changes: source3/smbd/open.c | 48 -- source3/smbd/pysmbd.c | 17 --- source3/smbd/smb2_negprot.c |8 ++ 3 files changed, 44 insertions(+), 29 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 34d5526..2785d6f 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -1869,6 +1869,35 @@ static int disposition_to_open_flags(uint32_t create_disposition) return ret; } +static int calculate_open_access_flags(uint32_t access_mask, + int oplock_request, + uint32_t private_flags) +{ + int flags; + + /* +* Note that we ignore the append flag as append does not +* mean the same thing under DOS and Unix. +*/ + + if ((access_mask (FILE_WRITE_DATA | FILE_APPEND_DATA)) || + (oplock_request FORCE_OPLOCK_BREAK_TO_NONE)) { + /* DENY_DOS opens are always underlying read-write on the + file handle, no matter what the requested access mask + says. */ + if ((private_flags NTCREATEX_OPTIONS_PRIVATE_DENY_DOS) || + access_mask (FILE_READ_ATTRIBUTES|FILE_READ_DATA| + FILE_READ_EA|FILE_EXECUTE)) { + flags = O_RDWR; + } else { + flags = O_WRONLY; + } + } else { + flags = O_RDONLY; + } + return flags; +} + / Open a file with a share mode. Passed in an already created files_struct *. / @@ -2123,21 +2152,8 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, * mean the same thing under DOS and Unix. */ - if ((access_mask (FILE_WRITE_DATA | FILE_APPEND_DATA)) || - (oplock_request FORCE_OPLOCK_BREAK_TO_NONE)) { - /* DENY_DOS opens are always underlying read-write on the - file handle, no matter what the requested access mask - says. */ - if ((private_flags NTCREATEX_OPTIONS_PRIVATE_DENY_DOS) || - access_mask (FILE_READ_ATTRIBUTES|FILE_READ_DATA| - FILE_READ_EA|FILE_EXECUTE)) { - flags = O_RDWR; - } else { - flags = O_WRONLY; - } - } else { - flags = O_RDONLY; - } + flags = calculate_open_access_flags(access_mask, oplock_request, + private_flags); /* * Currently we only look at FILE_WRITE_THROUGH for create options. @@ -2592,7 +2608,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, } /* -* At this point onwards, we can guarentee that the share entry +* At this point onwards, we can guarantee that the share entry * is locked, whether we created the file or not, and that the * deny mode is compatible with all current opens. */ diff --git a/source3/smbd/pysmbd.c b/source3/smbd/pysmbd.c index 9b9b358..4012e6e 100644 ---
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 3902e73 lib/util/charset: We do not use fucntions from wchar.h any more via 1c5c96d lib/util/charset: Try to find iconv on HP-UX via 6146b60 wscript: Removed executable bit. from 7600fd8 s3: Factor out calculate_open_access_flags http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 3902e7332d3d79c257fca451635d08a58d327d70 Author: Andrew Bartlett abart...@samba.org Date: Wed Sep 26 08:10:29 2012 +1000 lib/util/charset: We do not use fucntions from wchar.h any more Autobuild-User(master): Andrew Bartlett abart...@samba.org Autobuild-Date(master): Wed Sep 26 02:13:10 CEST 2012 on sn-devel-104 commit 1c5c96d7cd63ad1d46fb120119c5ad6594e103cf Author: Andrew Bartlett abart...@samba.org Date: Wed Sep 26 07:41:38 2012 +1000 lib/util/charset: Try to find iconv on HP-UX commit 6146b609e7add16a34067a4c40902f63d19fe5fe Author: Ricky Nance ricky.na...@weaubleau.k12.mo.us Date: Tue Sep 25 01:10:42 2012 -0500 wscript: Removed executable bit. Removed the executable for both wscript and wscript_build. --- Summary of changes: lib/util/charset/wscript_configure | 11 --- source3/passdb/pdb_nds.c |1 - source3/registry/reg_parse.c |1 - 3 files changed, 4 insertions(+), 9 deletions(-) mode change 100755 = 100644 wscript mode change 100755 = 100644 wscript_build Changeset truncated at 500 lines: diff --git a/lib/util/charset/wscript_configure b/lib/util/charset/wscript_configure index 98756fe..804c266 100644 --- a/lib/util/charset/wscript_configure +++ b/lib/util/charset/wscript_configure @@ -10,12 +10,9 @@ conf.CHECK_LIB(libs=iconv, shlib=True) +#HP-UX can use libiconv as an add-on package, which has #define iconv_open libiconv_open if (conf.CHECK_FUNCS_IN('iconv_open', 'iconv', checklibc=False, headers='iconv.h') or +conf.CHECK_FUNCS_IN('libiconv_open', 'iconv', checklibc=False, headers='iconv.h') or conf.CHECK_FUNCS('iconv_open', headers='iconv.h')): -if conf.env['HAVE_LIBICONV']: -if conf.CHECK_FUNCS('mbrtowc', headers='wchar.h'): -conf.DEFINE('HAVE_NATIVE_ICONV', 1) -elif conf.env.LIB_ICONV: -del conf.env['LIB_ICONV'] -else: -conf.DEFINE('HAVE_NATIVE_ICONV', 1) + +conf.DEFINE('HAVE_NATIVE_ICONV', 1) diff --git a/source3/passdb/pdb_nds.c b/source3/passdb/pdb_nds.c index 3e1bdfc..cce4937 100644 --- a/source3/passdb/pdb_nds.c +++ b/source3/passdb/pdb_nds.c @@ -23,7 +23,6 @@ #include lber.h #include ldap.h -#include wchar.h #include smbldap.h #include passdb/pdb_ldap.h diff --git a/source3/registry/reg_parse.c b/source3/registry/reg_parse.c index babf5c0..c276c7e 100644 --- a/source3/registry/reg_parse.c +++ b/source3/registry/reg_parse.c @@ -34,7 +34,6 @@ #include reg_format.h #include stdio.h -#include wchar.h #include talloc.h #include stdbool.h #include string.h diff --git a/wscript b/wscript old mode 100755 new mode 100644 diff --git a/wscript_build b/wscript_build old mode 100755 new mode 100644 -- Samba Shared Repository
autobuild: intermittent test failure detected
The autobuild test system has detected an intermittent failing test in the current master tree. The autobuild log of the failure is available here: http://git.samba.org/autobuild.flakey/2012-09-26-0343/flakey.log The samba3 build logs are available here: http://git.samba.org/autobuild.flakey/2012-09-26-0343/samba3.stderr http://git.samba.org/autobuild.flakey/2012-09-26-0343/samba3.stdout The source4 build logs are available here: http://git.samba.org/autobuild.flakey/2012-09-26-0343/samba.stderr http://git.samba.org/autobuild.flakey/2012-09-26-0343/samba.stdout The top commit at the time of the failure was: commit 7600fd8b0cef3f1de99204ebdd14115a5f36c958 Author: Volker Lendecke v...@samba.org Date: Tue Sep 4 09:22:49 2012 +0200 s3: Factor out calculate_open_access_flags Autobuild-User(master): Volker Lendecke v...@samba.org Autobuild-Date(master): Wed Sep 26 00:22:56 CEST 2012 on sn-devel-104
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 83f6067 Fix bug #9213 - Bad ASN.1 NegTokenInit packet can cause invalid free. from 3902e73 lib/util/charset: We do not use fucntions from wchar.h any more http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 83f60672e1b3069e6b1b90b376460da895e37df3 Author: Jeremy Allison j...@samba.org Date: Tue Sep 25 16:35:09 2012 -0700 Fix bug #9213 - Bad ASN.1 NegTokenInit packet can cause invalid free. Not the correct fix for the specific issue, but a general fix to make sure this can never happen again. Autobuild-User(master): Jeremy Allison j...@samba.org Autobuild-Date(master): Wed Sep 26 04:07:57 CEST 2012 on sn-devel-104 --- Summary of changes: source3/libsmb/clispnego.c |4 1 files changed, 4 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/libsmb/clispnego.c b/source3/libsmb/clispnego.c index a17efbf..9b4f8f9 100644 --- a/source3/libsmb/clispnego.c +++ b/source3/libsmb/clispnego.c @@ -103,6 +103,10 @@ bool spnego_parse_negTokenInit(TALLOC_CTX *ctx, bool ret; ASN1_DATA *data; + for (i = 0; i ASN1_MAX_OIDS; i++) { + OIDs[i] = NULL; + } + data = asn1_init(talloc_tos()); if (data == NULL) { return false; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 3c4d0ce samba_dnsupdate: Safely update/create names for Samba3 targets as well via 6d7c651 samba_dnsupdate: Move to using tmpfile/rename to keep the dns_hosts_file consistent via b320e7f selftest: Remove invalid security=share and rename secshare to simpleserver from 83f6067 Fix bug #9213 - Bad ASN.1 NegTokenInit packet can cause invalid free. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 3c4d0ce46995f82921f538757783fa7a678a7fc1 Author: Andrew Bartlett abart...@samba.org Date: Wed Sep 26 10:02:43 2012 +1000 samba_dnsupdate: Safely update/create names for Samba3 targets as well This avoids unlocked writes to the dns_hosts_file, and may fix some of our issues on the build farm where large numbers of tests fail due to failed name resolution. Andrew Bartlett Autobuild-User(master): Andrew Bartlett abart...@samba.org Autobuild-Date(master): Wed Sep 26 05:48:25 CEST 2012 on sn-devel-104 commit 6d7c651f2f61b481c1e1ade1e2e0e756ccef2210 Author: Andrew Bartlett abart...@samba.org Date: Wed Sep 26 09:48:48 2012 +1000 samba_dnsupdate: Move to using tmpfile/rename to keep the dns_hosts_file consistent This may be the cause of some of the large failure modes on the build farm. Andrew Bartlett commit b320e7f93b5905558efa879992c125af66f0043c Author: Andrew Bartlett abart...@samba.org Date: Wed Sep 26 10:40:17 2012 +1000 selftest: Remove invalid security=share and rename secshare to simpleserver This avoids the loadparm code failing due to the invalid smb.conf entry, and removes the very last hint of security=share! Andrew Bartlett --- Summary of changes: selftest/target/Samba3.pm | 24 +--- source3/Makefile.in |2 +- source3/selftest/tests.py |6 +++--- source4/scripting/bin/samba_dnsupdate | 29 +++-- 4 files changed, 40 insertions(+), 21 deletions(-) Changeset truncated at 500 lines: diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index c1f8fbd..df8b55c 100755 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -153,8 +153,8 @@ sub setup_env($$$) if ($envname eq s3dc) { return $self-setup_s3dc($path/s3dc); - } elsif ($envname eq secshare) { - return $self-setup_secshare($path/secshare); + } elsif ($envname eq simpleserver) { + return $self-setup_simpleserver($path/simpleserver); } elsif ($envname eq maptoguest) { return $self-setup_maptoguest($path/maptoguest); } elsif ($envname eq ktest) { @@ -337,7 +337,7 @@ sub setup_admember() return $ret; } -sub setup_secshare($$) +sub setup_simpleserver($$) { my ($self, $path) = @_; my $vfs_modulesdir_abs = $ENV{VFSLIBDIR}; @@ -346,8 +346,7 @@ sub setup_secshare($$) my $prefix_abs = abs_path($path); - my $secshare_options = - security = share + my $simpleserver_options = lanman auth = yes vfs objects = $vfs_modulesdir_abs/xattr_tdb.so $vfs_modulesdir_abs/streams_depot.so @@ -361,7 +360,7 @@ sub setup_secshare($$) my $vars = $self-provision($path, LOCALSHARE4, local4pass, - $secshare_options); + $simpleserver_options); $vars or return undef; @@ -371,7 +370,7 @@ sub setup_secshare($$) return undef; } - $self-{vars}-{secshare} = $vars; + $self-{vars}-{simpleserver} = $vars; return $vars; } @@ -1068,10 +1067,13 @@ domusers:X:$gid_domusers: } print DONE\n; - open(HOSTS, $ENV{SELFTEST_PREFIX}/dns_host_file) or die(Unable to open $ENV{SELFTEST_PREFIX}/dns_host_file); - print HOSTS A $server. $server_ip -; - close(HOSTS); + open(DNS_UPDATE_LIST, $prefix/dns_update_list) or die(Unable to open $$prefix/dns_update_list); + print DNS_UPDATE_LIST A $server. $server_ip; + close(DNS_UPDATE_LIST); + +if (system($ENV{SRCDIR_ABS}/source4/scripting/bin/samba_dnsupdate --all-interfaces --use-file=$dns_host_file -s $conffile --update-list=$prefix/dns_update_list --no-substiutions --no-credentials) != 0) { +die Unable to update hostname into $dns_host_file; +} $ret{SERVER_IP} = $server_ip; $ret{NMBD_TEST_LOG} = $prefix/nmbd_test.log; diff --git a/source3/Makefile.in b/source3/Makefile.in index 2ad8ecc..0e72fea 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -3328,7 +3328,7 @@ test:: all torture timelimit
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 98d117a selftest/knownfail: samba*.smb2.oplock.stream1 doesn't work via 7a14f09 s4:torture/smb2: remove samba specific stuff from smb2.oplock via 4604219 s3:smb2_create: don't take 'state-te' as indication for was_deferred (bug #9196) from 3c4d0ce samba_dnsupdate: Safely update/create names for Samba3 targets as well http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 98d117a5424d62804b7cb3d8a9ad35e703fc158a Author: Stefan Metzmacher me...@samba.org Date: Wed Sep 26 03:24:22 2012 +0200 selftest/knownfail: samba*.smb2.oplock.stream1 doesn't work metze Autobuild-User(master): Stefan Metzmacher me...@samba.org Autobuild-Date(master): Wed Sep 26 07:57:12 CEST 2012 on sn-devel-104 commit 7a14f09f9cc14cfb6234175add1841faf751d51a Author: Stefan Metzmacher me...@samba.org Date: Wed Sep 26 03:08:33 2012 +0200 s4:torture/smb2: remove samba specific stuff from smb2.oplock metze commit 4604219ceba96955b3c4bf6ab31aa70c11442d61 Author: Stefan Metzmacher me...@samba.org Date: Wed Sep 26 03:04:20 2012 +0200 s3:smb2_create: don't take 'state-te' as indication for was_deferred (bug #9196) We always set state-te = NULL of TALLOC_FREE(state-te), before calling smbd_smb2_request_dispatch(), so open_was_deferred_smb2() always returned false, while dispatching it again. But it's remove_deferred_open_message_smb2_internal() which should reset this state. In developer mode validate_my_share_entries() did call smb_panic() before. metze --- Summary of changes: selftest/knownfail|2 ++ source3/smbd/smb2_create.c|5 - source4/torture/smb2/oplock.c | 10 -- 3 files changed, 6 insertions(+), 11 deletions(-) Changeset truncated at 500 lines: diff --git a/selftest/knownfail b/selftest/knownfail index 9feaac2..953056e 100644 --- a/selftest/knownfail +++ b/selftest/knownfail @@ -155,6 +155,7 @@ ^samba4.smb2.oplock.batch9\(.*\)$ # samba 4 oplocks are a mess ^samba4.smb2.oplock.batch10\(.*\)$ # samba 4 oplocks are a mess ^samba4.smb2.oplock.batch20\(.*\)$ # samba 4 oplocks are a mess +^samba4.smb2.oplock.stream1 # samba 4 oplocks are a mess ^samba4.smb2.getinfo.getinfo # streams on directories does not work ^samba4.ntvfs.cifs.krb5.base.createx_access.createx_access\(.*\)$ ^samba4.ldap.acl.*.AclSearchTests.test_search_anonymous3\(.*\)$ # ACL search behaviour not enabled by default @@ -196,6 +197,7 @@ ^samba3.smb2.lease.multibreak ^samba3.smb2.oplock.batch12 ^samba3.smb2.oplock.batch20 +^samba3.smb2.oplock.stream1 ^samba3.smb2.streams.rename ^samba3.smb2.streams.rename2 ^samba3.smb2.streams.attributes diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c index 9318a83..812d9db 100644 --- a/source3/smbd/smb2_create.c +++ b/source3/smbd/smb2_create.c @@ -377,6 +377,7 @@ static void smbd_smb2_request_create_done(struct tevent_req *tsubreq) struct smbd_smb2_create_state { struct smbd_smb2_request *smb2req; struct smb_request *smb1req; + bool open_was_deferred; struct timed_event *te; struct tevent_immediate *im; struct timeval request_time; @@ -1204,7 +1205,7 @@ bool open_was_deferred_smb2(struct smbd_server_connection *sconn, uint64_t mid) return false; } /* It's not in progress if there's no timeout event. */ - if (!state-te) { + if (!state-open_was_deferred) { return false; } @@ -1235,6 +1236,7 @@ static void remove_deferred_open_message_smb2_internal(struct smbd_smb2_request mid %llu\n, (unsigned long long)mid )); + state-open_was_deferred = false; /* Ensure we don't have any outstanding timer event. */ TALLOC_FREE(state-te); /* Ensure we don't have any outstanding immediate event. */ @@ -1457,6 +1459,7 @@ bool push_deferred_open_message_smb2(struct smbd_smb2_request *smb2req, end_time, true) )); + state-open_was_deferred = true; state-te = tevent_add_timer(smb2req-sconn-ev_ctx, state, end_time, diff --git a/source4/torture/smb2/oplock.c b/source4/torture/smb2/oplock.c index fc939cc..4cf7c7d 100644 --- a/source4/torture/smb2/oplock.c +++ b/source4/torture/smb2/oplock.c @@ -2416,10 +2416,6 @@ static bool test_smb2_oplock_batch22(struct torture_context *tctx, int timeout = torture_setting_int(tctx, oplocktimeout, 30); int te; - if (torture_setting_bool(tctx, samba3, false)) { - torture_skip(tctx, BATCH22 disabled against samba3\n); - } - status =