Re: [Samba] Unknown panic actions
Volker Lendecke schrieb: # smbd --version Version 3.0.24 Any chance you try with a later version? Yes! # smbd --version Version 3.2.5 ... and the problem still exists and I am still not able to get a coredump. So I assume samba actually is not crashing. What else could trigger the panic-action-script? Volker Ralph -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Windows 7 and Samba - still unsolved ! -- Re: Problem with Win 7 and Samba 3.3.10 PDC (Trust Relationship Between Workstation and Domain Failed)
Dear Marc, Thanks A LOT for your reply, I was really despaired about Samba+Win7... Of course I will test what you suggest and give some feedback. But first of all, the link you gave me is very interesting, because it states the *opposite of what is said everywhere, and that's very important : it states we SHOULD NOT change NETLOGON registry keys... ...this could be the cause of our problem. I will test and let you know about the results... Denis Le 17.02.2010 23:04, Cain, Marc a écrit : Following these directions work. I recommend the latest version of Samba 3.4.x. Be sure to read the section on Windows registry entries. http://wiki.samba.org/index.php/Windows7 On Feb 17, 2010, at 3:39 AM, Denis BUCHER wrote: Dear all, I'm still without solution to make Windows 7 work with Samba... Does someone knows what we could do or why it doesn't work ? Thanks a lot for any help ! It would be greatly appreciated because I'm really left without solution as we tried everything suggested on the web but Windows still doesn't want to connect to samba ? Denis Le 15.02.2010 13:23, Denis BUCHER a écrit : Dear all, We are trying to install a new Samba server to replace the old one and support Windows 7 clients. But it doesn't work ! When we try to register a machine into th domain, it seems to be accepted by the client but we find these messages in samba logs : rpc_server/srv_netlog_nt.c:_netr_ServerAuthenticate2(555) _netr_ServerAuthenticate2: netlogon_creds_server_check failed. Rejecting auth request from client PC0217 machine account PC0217$ Anyway as user it is possible to login, but not to login into Windows with the same user. The Windows 7 error message is La relation d'approbation entre cette station de travail et le domaine principal a échoué : Trust Relationship Between Workstation and Domain Failed And the samba message is the same as stated before (Rejecting auth request from client PC0217) We are using samba 3.3.10 from sernet.de More details : # rpm -qa | grep smb libsmbclient0-3.3.10-40.suse111 libsmbios2-2.0.2-11.6 libsmbclient-devel-3.3.10-40.suse111 # rpm -qa | grep samb samba3-winbind-32bit-3.3.10-40.suse111 samba3-winbind-3.3.10-40.suse111 samba3-client-3.3.10-40.suse111 samba3-utils-3.3.10-40.suse111 samba3-doc-3.3.10-40.suse111 samba3-3.3.10-40.suse111 samba3-cifsmount-3.3.10-40.suse111 # rpm -qi samba3-doc-3.3.10-40.suse111 Name : samba3-doc Relocations: (not relocatable) Version : 3.3.10 Vendor: Service Network GmbH, Goettingen Release : 40.suse111 Build Date: Thu Jan 14 16:17:39 2010 Install Date: Thu Feb 4 21:52:36 2010 Build Host: sam Group : Productivity/Networking/Samba Source RPM: samba3-3.3.10-40.suse111.src.rpm Size : 25940261 License: GPL v3 or later Signature : DSA/SHA1, Thu Jan 14 16:30:42 2010, Key ID d9921b1cf4428b1a Packager : SerNet Samba Teamsa...@sernet.de URL : http://www.samba.org Summary : SerNet Samba documentation Description : This package contains additional Samba documentation Distribution: openSUSE 11.1 (x86_64) Any help would be greatly appreciated because we tryed everything we could and we found online :-) Thanks a lot Denis Denis Bucher -- Denis Bucher Horus Digital Solutions sàrl Each problem has a solution ___ Tél. +41-22-8000625 Fax: +41-22-8000622 www.hsolutions.ch -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba Denis Bucher -- Denis Bucher Horus Digital Solutions sàrl Each problem has a solution ___ Tél. +41-22-8000625 Fax: +41-22-8000622 www.hsolutions.ch -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] samba4 + openldap: provisioning isnt working
Hi all, I'm experiencing the same problems as this post. the problem is with the slapd.d config files, samba suppose to generate. they aren't there.. and that's why the ldapi won't start up. and that's why the provision fails... i did find a slapd.conf file at the same location, but running slaptest to convert it failed... (overlay deref not found) any tips or suggestions how to proceed ?! Greetz, collen Wiki seems to be out of date here. The wiki reference's [1] [2] a setup/provision-backend script, as well as a setup/provision script, yet current git only has a setup/provision executable. Some #samba and #openldap IRC advice was that provision-backend wasnt needed anymore, but based off the errors i'm seeing, there's definitely _something_ missing, I just dont know if that something ( /usr/local/samba4/private/ldap/slapd.d/ files ) ought to be provided by the missing setup/provision-backend. [1] http://wiki.samba.org/index.php/Samba4/LDAP_Backend/OpenLDAP [2] http://wiki.samba.org/index.php/Samba4/HOWTO/Ubuntu_Server_9.04 Following IRC advice, I attempted to just use the setup/provision script. It didnt work. I added a [running] print to provisionbackend.py, to see what it was running, so I could attempt to run slapd as it was running it, with debugging enabled. Heres the result: rekt...@deneb:~/archives/samba/source4$ setup/provision --realm=ELDERGODS.COM --ldap-backend-type=openldap --server-role=dc --domain=ELDERGODS --slapd-path='/usr/sbin/slapd' [running] '/usr/sbin/slapd' '-F/usr/local/samba4/private/ldap/slapd.d' '-h' 'ldapi://%2Fusr%2Flocal%2Fsamba4%2Fprivate%2Fldap%2Fldapi' Failed to bind - LDAP client internal error: NT_STATUS_UNEXPECTED_NETWORK_ERROR Failed to connect to 'ldapi://%2Fusr%2Flocal%2Fsamba4%2Fprivate%2Fldap%2Fldapi' Traceback (most recent call last): File setup/provision, line 213, in module nosync=opts.nosync,ldap_dryrun_mode=opts.ldap_dryrun_mode) File bin/python/samba/provision.py, line 1257, in provision provision_backend.start() File bin/python/samba/provisionbackend.py, line 252, in start raise ProvisioningError(slapd died before we could make a connection to it) -- snip connections_destroy: nothing to destroy. The /usr/local/samba4/private/ldap/slapd.d/ directory is completely empty. I'm not sure what is supposed to populate this, but as can be seen from the above debug logs, the slapd kicked off by setup/provision is definitely expecting there to be contents. This could very well be a result of the missing-in-action setup/provision-backend script. I'll be happy to do some wiki updating if I can get this issue resolved: the OpenLDAP wiki entry's last major work was the Ides of June 2008. Regards, rektide -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] Samba 3.2.5 / Debian Lenny preexec/postexec
Hi i've got a server with lenny installed on it with samba 3.2.5. I need to use preexec and postexec command into the [netlogon] service like this root preexec = /etc/samba/ntlogon -u %U -g %G -o %a -d /etc/samba/netlogon/ -f /etc/samba/ntlogon.conf but the root preexec command is not evaluate. I use the same command into other server with different version of samba and it's ok so do you know if there is a bug with the 3.2.5 version or have you got a solution for me thanks in advance -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] Samba 3.2.5 / Debian Lenny var full
Hi i've got a server with lenny installed on it with samba 3.2.5. My problem is that the var partition is sometimes full. In fact, if i use df command I watch the partition full, but if I use du command the partition is not full. If i use lsof command i see plenty of log samba files into /var/log/samba wich are very big, i have - to kill the process given by lsof associated to log samba file (smbd process) - to restart samba to see the partition not full. Is there a bug with this official version of samba with lenny ? or have you got a solution for me. PS1: i've tried to put log level to 0 into the samba conf file and i've got the same problem PS2: i've got other servers with other versions of samba and debian and i've got no problem. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] Howto Change user password with pdbedit
Hi, I was wondering how to change password with pdbedit. Failed with ` pdbedit -r -u username ' . Thanks in advance -- Best Regards, Aaron Lewis - PGP: 0xA476D2E9 RedHat Certificated Engineer , SUPINF0 UNIV. irc: A4r0n on freenode -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] Win7: Older user accounts works
I got very strange behavior: Server A has local passwords (made with smbpasswd -a) and it also use password from other server: security = server password server = b.domain.example passdb backend = tdbsam With OLDER user accounts everything works. With WIN-XP everything works. With CMD-PROMPT everything works. With LOCAL PASSWORDS everything works. With PERMISSIONS TO GROUP everything works. I can map home directory to drive letter (say, O:). When I doubleclick it, it says access denied, if I use newer user account, use Win7, use passwords from remote server, and home directory has permissions only for user. At same time I can open cmd-prompt and say dir o: and it works. If permissions are like this drwx-- 8 majahu majahu 4096 2010-02-18 13:06 /home/majahu I got access denied, but it works if they are drwxrwx--- 8 majahu majahu 4096 2010-02-18 13:06 /home/majahu So what is going on? There is exact combination of 5 things that makes this bug visible. There must be something wrong with newer user accounts. I have confirmed 3 working account and 3 not working; it might be that older accounts have been made with older smbpasswd-file and later converted to .tdb. I have tdbdumped passwords.tdb, but have no idea what to look for. -- Jori Mäntysalo -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] Samba 3.4.5 Offline Folders windows 7 (again ..)
Hi! We tested the offline folder synchronisation with windows 7 and Samba 3.4.5 the last days. We constantly facing the problem if you change a file (e.g. a Excel spreadsheet) - does not matter if offline or online - and you are start the offline sync in win7 then it claims about a synchronisation problem with that file. Win7 states that both sides have changed. We don't face that problem if the share is located on a win2003 server - but I don't really know where to start debugging here. Does this sound familiar to anyone here or are my share definitions wrong? ** [test] comment = test browseable = no writable = yes guest ok = no create mask = 0611 directory mask = 0700 follow symlinks = no wide links = no oplocks = yes level2 oplocks = yes map archive = yes map system = yes map hidden = yes ** regards Martin -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] [homes] auth in Ubuntu 9.10
I create a [homes] share in my server (Debian lenny). All work fine in the MS Windows XP clients, but, i have two pc's whit ubuntu 9.10, and when I try to acces to the *homes* share I get the error: Could not load the windows share (or something like that, the errors appears in spanish) The client have installed the samba-client, and i don't know why this happens... ¿Any idea? ¿some lost package in clients?, ¿a bug of the 9.10? -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] [homes] auth in Ubuntu 9.10
Sorry, I forget a thing,when i create a normal share whit password (a no [homes] share) works fine in the ubuntu machines. (and of course, in the windows machines too) Thanks. 2010/2/18 Toro torocat...@gmail.com I create a [homes] share in my server (Debian lenny). All work fine in the MS Windows XP clients, but, i have two pc's whit ubuntu 9.10, and when I try to acces to the *homes* share I get the error: Could not load the windows share (or something like that, the errors appears in spanish) The client have installed the samba-client, and i don't know why this happens... ¿Any idea? ¿some lost package in clients?, ¿a bug of the 9.10? -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Win7: Older user accounts works
Le 18.02.2010 12:59, Jori Mantysalo a écrit : If permissions are like this drwx-- 8 majahu majahu 4096 2010-02-18 13:06 /home/majahu I got access denied, but it works if they are drwxrwx--- 8 majahu majahu 4096 2010-02-18 13:06 /home/majahu So what is going on? There is exact combination of 5 things that makes this bug visible. Could you show your [homes] (or whatever share) config from your smb.conf ? Maybe only majahu group (not user) has access ? Denis -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Win7: Older user accounts works
On Thu, 18 Feb 2010, Denis BUCHER wrote: If permissions are like this drwx-- 8 majahu majahu 4096 2010-02-18 13:06 /home/majahu I got access denied, but it works if they are drwxrwx--- 8 majahu majahu 4096 2010-02-18 13:06 /home/majahu So what is going on? There is exact combination of 5 things that makes this bug visible. Could you show your [homes] (or whatever share) config from your smb.conf ? [homes] comment = Home Directories browseable = yes writable = yes inherit permissions = yes create mask = 0750 directory mask = 0750 Maybe only majahu group (not user) has access ? No, there are no groups defined in smb.conf. Basic info: 64-bit Linux, Fedora 12, up-to-date, samba from .rpm, version 3.4.5-55.fc12. -- Jori Mäntysalo -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] allow samba domain group RDP access
I want to allow RDP connections to a Win2008 server which is joined to a samba domain. I've added a samba group that my user is a part of to the Remote Desktop Users members, but it doesnt seem to work. Still says to log on to this computer you must be granted the allow log on through terminal services right. If i specifically add the samba user to the Remote Desktop Users group i get the specified domain either does not exist or could not be contacted when i try and log in. any ideas? -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] Can one user use the same credentials to log into multiple domains, and how do I do it?
First, our current setup. I'm setting up a Samba 3.4 environment to replace our old Samba 3.0.x setup and make ready for Windows 7. There are several different campus locations, and each has it's own Samba PDC. Due to some (possibly poor) decisions made early in the development of the system, instead of giving each campus its own domain name, we used the algorithmic rid base parameter in smb.conf to manually beat on the numbers to make it work. I believe this is what would fix the problem, but Anyway, here's my problem. I have the new Samba server set up with a different domain name and it appears to be working, but now users from the old domain setup can't log in. It looks like it's an SID problem, as the log messages are similar to: --snip-- [2010/02/18 09:53:46, 1] rpc_client/init_netlogon.c:237(serverinfo_to_SamInfo3) _netr_LogonSamLogon: user DOMAINNAME\username has user sid S-*-*-**-**-*-**-* but group sid S-*-*-**-**-*-**-*. The conflicting domain portions are not supported for NETLOGON calls --/snip-- Sure enough, the *'d out SID's are different, the first is the SID for the old domain, and the second is for the new domain. Now, I could just go and change the user's SID but there are a couple of problems with that. One, that's problematic for a system with several thousand users. Two, even if I were to do that, we have several users who move between campuses and would need to log in to several different domains, and changing SID's when they move would also be problematic. Maybe this is what a roaming profile or trusted domain is, but I'm not sure. So here's my question: How can I set Samba up to accept logins on one domain with credentials from another, or is this even what I would need to get this working? Thanks, Johnathan -- Johnathan Bell Internet System Administrator, Baker College -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] IPv6 name resolution problem
On Wed, Feb 17, 2010 at 7:28 PM, Ernesto Silva erniesi...@gmail.com wrote: I find myself always changing this line to remove the [NOTFOUND=return], but I do use dns, not mdns to locate my boxes. Still you might want to try using mdns instead of mdns_minimal. Well, I believe I found out that the problem is not in the nsswitch.conf file, it's inside the getaddrinfo() function. There are some bugs getting in and out of the code the last months, they are reported at glibc bug tracking system. I can't put this into production mode with this kind of bug catchingloosing, so I'm back to private static IPv4 addresses. I hope that the glibc maintainers fix the bugs soon an definitely. Thank you all for the tips. Best regards, Ernesto Silva. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] Your password expires today problem
Hi. I enabled policies with pdbedit. Password must be changed every 90 days and must contain at least 8 characters. I enabled password history too. After that (I tried it in samba 3.4.3 and 3.0.25 with same behaviour) every time a user try to log in the domain using Windows receives a Your password expires today. Do you want to change it now ? message box. If the password is changed, the message appear again next time the user try to login. If the user answers no the same thing happens in the next login. I tested it with a lot of users and changed the passwords several times and the problem continues. Anybody have some idea about this problem ? Thanks in advance. Regards, Marcelo H. Terres mhter...@gmail.com ICQ: 6649932 MSN: mhter...@hotmail.com Jabber: mhter...@jabber.org http://twitter.com/mhterres http://identi.ca/mhterres http://mundoopensource.blogspot.com/ http://www.propus.com.br Sent from Porto Alegre, RS, Brazil -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] AD 2008 R2 vs. samba 3.4.5 (fwd)
Hi there, I almot exlusively use samba for printing in a semi large scale (2.000 windows hosts 500 printers). I have been running 3.0.20 for a long time and was quite happy with it. Unfortunately my windows fellows have now updated to AD 2008 R2 and I experienced some immediate problems with encryptions types so I updated to 3.4.5 which is not really working for me. I see a lot of connection rests and also the load is significantly higher than before, looks a bit like a denial of service attack ;) Also the shares don't show up constantly in the domain but disappear from time to time. My clients are 32bit windowsxp domain members and to make things a bit more complicated they received a MS security update at the same time which mainly concerns SMB (MS10-06 SMB Update). Are there any advices or experiences, I'm really in need ? :( cheers ~ christoph PS: Of couse I am also waiting for a samba based solution for windows 7 64 bit printing ;) -- /* Christoph Beyer | Office: Building 2b / 23 *\ * DESY|Phone: 040-8998-2317* * - IT - | Fax: 040-8998-4060* \* 22603 Hamburg | http://www.desy.de */ -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] failed to bind to server ldap://.... Error: Can't contact LDAP server, but it works
Hi, there I created a new samba 3.4.5 server on RHEL 5.2(it's a VirtualBox!) and only copied over the old smb.conf from samba 2.0.22(it's a real box) with little changes. I shutdown the old samba and startup the new one with the same IP and domain name. Everything works fine on XP client side without any changes. LDAP backend stays the same on a separate machine. I use the same package smbldap-tools-0.9.2a.tgz on the new samba server. The problem is I found ldap connection error in log.smbd: I don't care about getpeername failed. Error was Transport endpoint is not connected (samba 3.0.22 also has it) === [2010/02/18 12:29:19, 0] lib/util_sock.c:1491(get_peer_addr_internal) getpeername failed. Error was Transport endpoint is not connected [2010/02/18 12:29:19, 0] lib/util_sock.c:1491(get_peer_addr_internal) getpeername failed. Error was Transport endpoint is not connected [2010/02/18 12:29:44, 0] lib/smbldap.c:1052(smbldap_connect_system) failed to bind to server ldap://192.168.1.8:389 ldap://192.168.1.8:389 with dn=cn=Manager,dc=mydomain,dc=com Error: Can't contact LDAP server (unknown) = These messages come up in the log file randomly and it depends on the activities of samba share or login, though my 200 XP machines are working fine: this means join a new machine to the domain, login, all shares. I did ldapsearch and ldapmodify on the new samba 3.4.5 server without any problems. There is no this kind of ldap connection messages on the old samba 3.0.22. here is the [global] section in smb.conf: [global] workgroup = mydomain netbios name= dnshostname server string = Master domain master = Yes os level= 65 domain logons = Yes logon drive = G: logon script= %u.bat logon path = logon home = \\%L\%U encrypt passwords = yes time server = Yes wins support= Yes client plaintext auth = No client lanman auth = Yes lanman auth = Yes log level = 0 max log size= 9000 preferred master= Yes security= user load printers = yes printing= cups printcap= cups interfaces = eth0 # this is the main network interface # eth1 and eth2 are used for iscsi storage, on separate networks smb ports = 445 ldap ssl= no username map= /usr/local/samba/lib/smb.map passdb backend = ldapsam:ldap://192.168.1.8:389 ldap://192.168.1.8:389; # I have only one ldap server, so I put it here twice ldap connection timeout = 3 # the default is 2, I changed to 3(no fix) ldap admin dn = cn=Manager,dc=mydomain,dc=com ldap delete dn = no ldap suffix = dc=mydomain,dc=com ldap user suffix= ou=Users ldap group suffix = ou=Groups ldap machine suffix = ou=Computers add user script = /usr/local/sbin/smbldap-useradd -m %u add user to group script= /usr/local/sbin/smbldap-groupmod -m %u %g delete user script = /bin/rm -rf /home/employees/%u add machine script = /usr/local/sbin/smbldap-useradd -w %u set primary group script= /usr/local/sbin/smbldap-usermod -g %g %u delete user from group script = /usr/local/sbin/smbldap-groupmod -x %u %g add group script= /usr/local/sbin/smbldap-groupadd -p %g lm announce = no socket options = TCP_NODELAY SO_RCVBUF=8192 IPTOS_LOWDELAY SO_RCVBUF=8192 SO_SNDBUF=8192 Can anybody help to fix the error messages? or is it related to the VirtualBox? I don't get any complaints from XP clients! No performance issue(the virtual network interface is only 100M) Thanks, Allen -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] AD 2008 R2 vs. samba 3.4.5 (fwd)
Similar situation here, 484 printers at current count, 2120 users (hospital), and we've been pretty happy with the Samba/CUPS solution. However, recently, too many issues with Samba an printing (3.4.5, debian), so we've gotten rid of it, still use it for file shares and such. Anyway, we are a straight to cups setup here now. several scripts are used by us with Desktop authority to convert the old samba printers to cups printers as the user logs in. It's working pretty good actually, and our load on the printserver is always around .07... it's flat amazing. For printing, I'd suggest looking at IPP - from windows 2k on, MS supports it client side, so it's pretty nice. We are actually working on a system that will allow printer grouping - eg, load a group of printers to a machine based on it's location or presumed location. And have printers load to the system as a system-wide printer instead of a personal printer - with all driver/drawer settings correct. Yes, this is doable with samba easily, but cups we've been having to do a bit of this on our side. Working pretty good. Good luck! christoph.be...@desy.de wrote: Hi there, I almot exlusively use samba for printing in a semi large scale (2.000 windows hosts 500 printers). I have been running 3.0.20 for a long time and was quite happy with it. Unfortunately my windows fellows have now updated to AD 2008 R2 and I experienced some immediate problems with encryptions types so I updated to 3.4.5 which is not really working for me. I see a lot of connection rests and also the load is significantly higher than before, looks a bit like a denial of service attack ;) Also the shares don't show up constantly in the domain but disappear from time to time. My clients are 32bit windowsxp domain members and to make things a bit more complicated they received a MS security update at the same time which mainly concerns SMB (MS10-06 SMB Update). Are there any advices or experiences, I'm really in need ? :( cheers ~ christoph PS: Of couse I am also waiting for a samba based solution for windows 7 64 bit printing ;) -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] AD 2008 R2 vs. samba 3.4.5 (fwd)
On Thu, Feb 18, 2010 at 12:02:22PM -0700, Jack Downes wrote: Similar situation here, 484 printers at current count, 2120 users (hospital), and we've been pretty happy with the Samba/CUPS solution. However, recently, too many issues with Samba an printing (3.4.5, debian), so we've gotten rid of it, still use it for file shares and such. Anyway, we are a straight to cups setup here now. several scripts are used by us with Desktop authority to convert the old samba printers to cups printers as the user logs in. It's working pretty good actually, and our load on the printserver is always around .07... it's flat amazing. For printing, I'd suggest looking at IPP - from windows 2k on, MS supports it client side, so it's pretty nice. We are actually working on a system that will allow printer grouping - eg, load a group of printers to a machine based on it's location or presumed location. And have printers load to the system as a system-wide printer instead of a personal printer - with all driver/drawer settings correct. Yes, this is doable with samba easily, but cups we've been having to do a bit of this on our side. Working pretty good. Guenther and Metze are working on the print spool code for 3.5.0. Hopefully we'll have a solution for you soon. Right now the best Samba release for printing is 3.3.10. Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] AD 2008 R2 vs. samba 3.4.5 (fwd)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jeremy Allison wrote: On Thu, Feb 18, 2010 at 12:02:22PM -0700, Jack Downes wrote: Similar situation here, 484 printers at current count, 2120 users (hospital), and we've been pretty happy with the Samba/CUPS solution. However, recently, too many issues with Samba an printing (3.4.5, debian), so we've gotten rid of it, still use it for file shares and such. Anyway, we are a straight to cups setup here now. several scripts are used by us with Desktop authority to convert the old samba printers to cups printers as the user logs in. It's working pretty good actually, and our load on the printserver is always around .07... it's flat amazing. For printing, I'd suggest looking at IPP - from windows 2k on, MS supports it client side, so it's pretty nice. We are actually working on a system that will allow printer grouping - eg, load a group of printers to a machine based on it's location or presumed location. And have printers load to the system as a system-wide printer instead of a personal printer - with all driver/drawer settings correct. Yes, this is doable with samba easily, but cups we've been having to do a bit of this on our side. Working pretty good. Guenther and Metze are working on the print spool code for 3.5.0. Hopefully we'll have a solution for you soon. Right now the best Samba release for printing is 3.3.10. Jeremy. Jeremy, Does the team have recommended versions of samba to use generally in an AD 2008 R2 environment? We are running into many ntlmv2 issues similar to a bug reported to RedHat, but with more then just the 3.0.x code (of which I know is no longer supported upstream, but RH supports): https://bugzilla.redhat.com/show_bug.cgi?id=561325 I was unable to pin down a specific release/patch that fixed the problem, but it seems to work better with 3.4.5. Some guidance would be very helpful. In the meantime, I am going to be adding my two cents on the above bug report. Thanks, Robert -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkt9k3EACgkQup357T5MfTYbiwCfdkWW4UmdikpRTmf/Z7nTSfMK G2EAoNLv9NznIsqwDFr471/3Zn4V5PCV =T/OO -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] AD 2008 R2 vs. samba 3.4.5
Hi Robert, OK at least I am not all alone ;) To be honest I avoided cups so far and used lprng with good results. Have to use cups now though for my linux clients they just need the cups libraries for all kind of stuff. Did you find any way to avoid massive drop down lists on client applications with hundreds of printers in it ? I established 6 or 8 cups servers now just to keep the list of printers on the client manageable :( Another question, does the complete driver transfer to the client including presets work when you use cups for windows ? Thanks a lot for your support cheers christoph On Thu, 18 Feb 2010, Robert Freeman-Day wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jeremy Allison wrote: On Thu, Feb 18, 2010 at 12:02:22PM -0700, Jack Downes wrote: Similar situation here, 484 printers at current count, 2120 users (hospital), and we've been pretty happy with the Samba/CUPS solution. However, recently, too many issues with Samba an printing (3.4.5, debian), so we've gotten rid of it, still use it for file shares and such. Anyway, we are a straight to cups setup here now. several scripts are used by us with Desktop authority to convert the old samba printers to cups printers as the user logs in. It's working pretty good actually, and our load on the printserver is always around .07... it's flat amazing. For printing, I'd suggest looking at IPP - from windows 2k on, MS supports it client side, so it's pretty nice. We are actually working on a system that will allow printer grouping - eg, load a group of printers to a machine based on it's location or presumed location. And have printers load to the system as a system-wide printer instead of a personal printer - with all driver/drawer settings correct. Yes, this is doable with samba easily, but cups we've been having to do a bit of this on our side. Working pretty good. Guenther and Metze are working on the print spool code for 3.5.0. Hopefully we'll have a solution for you soon. Right now the best Samba release for printing is 3.3.10. Jeremy. Jeremy, Does the team have recommended versions of samba to use generally in an AD 2008 R2 environment? We are running into many ntlmv2 issues similar to a bug reported to RedHat, but with more then just the 3.0.x code (of which I know is no longer supported upstream, but RH supports): https://bugzilla.redhat.com/show_bug.cgi?id=561325 I was unable to pin down a specific release/patch that fixed the problem, but it seems to work better with 3.4.5. Some guidance would be very helpful. In the meantime, I am going to be adding my two cents on the above bug report. Thanks, Robert -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkt9k3EACgkQup357T5MfTYbiwCfdkWW4UmdikpRTmf/Z7nTSfMK G2EAoNLv9NznIsqwDFr471/3Zn4V5PCV =T/OO -END PGP SIGNATURE- -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba best regards ~ christoph -- /* Christoph Beyer | Office: Building 2b / 23 *\ * DESY|Phone: 040-8998-2317* * - IT - | Fax: 040-8998-4060* \* 22603 Hamburg | http://www.desy.de */ -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Unknown panic actions
On Thu, Feb 18, 2010 at 09:19:10AM +0100, Ralph Kutschera wrote: Volker Lendecke schrieb: # smbd --version Version 3.0.24 Any chance you try with a later version? Yes! # smbd --version Version 3.2.5 ... and the problem still exists and I am still not able to get a coredump. So I assume samba actually is not crashing. What else could trigger the panic-action-script? A crash does. If possible, can you get us a debug level 10 log of smbd leading to this crash? Even better would be a valgrind trace of smbd that crashes. Thanks, Volker -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] samba file locking
Hi samba experts, We have a strange file locking problem and i hope someone can help. We use some CentOS 5 servers, which use samba 3.0.33, to share files of a java application to clients. Clients are mostly CentOS 5 (same version as the server), but there are a few legacy windows clients (the reason why we use samba and not nfs). And now the problem. When our developer uploads a new jar file to the server via scp (or via local cp command) we encountered a problem. As soon as the server has the new file the Linux client (windows not yet tested) is seeing a corrupt file. And this state continues until the share gets remounted on the client. This was working before where we had a fedora core 4 servers and only windows clients, but now we are in the process of upgrading the servers and introducing Linux on the client side. You can also simulate the problem if you open a text file on a Linux client with tail -f and then change the file on the server locally. The file the client sees is corrupted until the share gets remounted. First thing. As these are remote locations and there is a lot of them, it is not possible to upload files via smb (we would like to make rpm packages for the application and the app will be distributed via yum). We tried various permutations of the parameters kernel oplocks, posix locks, oplocks, level2 oplocks, ... but nothing seems to work. We also tried to use a newer samba version (3.4.5). And now the question. Is there someone, that knows how this file locking works and can giwe a suggestion what we are doing wrong. Regards Janez -- 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.2.5 / Debian Lenny preexec/postexec
Quoting Didier Roques (didier.roq...@brive.unilim.fr): Hi i've got a server with lenny installed on it with samba 3.2.5. I need to use preexec and postexec command into the [netlogon] service like this root preexec = /etc/samba/ntlogon -u %U -g %G -o %a -d /etc/samba/netlogon/ -f /etc/samba/ntlogon.conf but the root preexec command is not evaluate. I use the same command into other server with different version of samba and it's ok Have you tried increasing the log level and check what happens in log files? -- 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.2.5 / Debian Lenny var full
Quoting Didier Roques (didier.roq...@brive.unilim.fr): Hi i've got a server with lenny installed on it with samba 3.2.5. My problem is that the var partition is sometimes full. In fact, if i use df command I watch the partition full, but if I use du command the partition is not full. If i use lsof command i see plenty of log samba files into /var/log/samba wich are very big, i have - to kill the process given by lsof associated to log samba file (smbd process) - to restart samba to see the partition not full. Is there a bug with this official version of samba with lenny ? or have you got a solution for me. Well, the default settings in Debian for logging are: # This tells Samba to use a separate log file for each machine # that connects log file = /var/log/samba/log.%m # Cap the size of the individual log files (in KiB). 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 So, in short, there shuold be one log fie per client and it is limited to 1MiB size. The log level is Samba's defautl log level, hence '0', which is not verbose at all. So, with these default settings, there is a good reason to have many log files (in case you have many clients...) but not big files and I fails to see how this would fill up a reasonably sized /var partition. You should check log level in your smb.conf,file -- 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.2.5 / Debian Lenny var full
On 02/18/2010 05:14 AM, Didier Roques wrote: Hi i've got a server with lenny installed on it with samba 3.2.5. My problem is that the var partition is sometimes full. In fact, if i use df command I watch the partition full, but if I use du command the partition is not full. If i use lsof command i see plenty of log samba files into /var/log/samba wich are very big, i have - to kill the process given by lsof associated to log samba file (smbd process) - to restart samba to see the partition not full. Is there a bug with this official version of samba with lenny ? or have you got a solution for me. I have seen this problem with samba-3.2.3 at a large site. It would strike once every two months or so, when it happened an 80GB /var/log/samba partition would fill up in 1 or 2 minutes. We never got to the bottom of this, the problem has not reappeared since the site moved to samba-3.3.4. My advice is to update to 3.4.5 or later. - John T. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
tsocket/bsd: fix bug #7115 FreeBSD includes the UDP header in FIONREAD
Hi Jeremy, - Log - commit 936828de71023d90aaec6c1dba84052246bbad11 Author: Jeremy Allison j...@samba.org Date: Wed Feb 17 09:24:34 2010 -0800 Fix commit d07cd37b993d3c9beded20323174633b806196b5 Which was: tsocket/bsd: fix bug #7115 FreeBSD includes the UDP header in FIONREAD Metze, this has to have been wrong - you are throwing away the talloc_realloc pointer returned. Also no error checking. Please review. Thank goodness for gcc warnings :-). talloc_realloc would only shrink the size and can't fail, but it's good to remove the warnings (you were faster with your commit because I had no internet link...) metze signature.asc Description: OpenPGP digital signature
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via c42d9c4... tsocket/bsd: fix comment in tdgram_bsd_recvfrom_handler() from 9abce9f... Revert Got back to 16-byte padding on auth RPC. S3 clients and servers now cope with this. Jeremy http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit c42d9c4ec410e205091784cd97cbceb5572609d8 Author: Stefan Metzmacher me...@samba.org Date: Wed Feb 17 19:11:11 2010 +0100 tsocket/bsd: fix comment in tdgram_bsd_recvfrom_handler() metze --- Summary of changes: lib/tsocket/tsocket_bsd.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/tsocket/tsocket_bsd.c b/lib/tsocket/tsocket_bsd.c index 9d5a329..c44ba4e 100644 --- a/lib/tsocket/tsocket_bsd.c +++ b/lib/tsocket/tsocket_bsd.c @@ -884,8 +884,10 @@ static void tdgram_bsd_recvfrom_handler(void *private_data) } /* -* some systems too much bytes in tsocket_bsd_pending() -* the return value includes some IP/UDP header bytes +* Some systems (FreeBSD, see bug #7115) return too much +* bytes in tsocket_bsd_pending()/ioctl(fd, FIONREAD, ...), +* the return value includes some IP/UDP header bytes, +* while recvfrom() just returns the payload. */ state-buf = talloc_realloc(state, state-buf, uint8_t, ret); if (tevent_req_nomem(state-buf, req)) { -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-5-test updated
The branch, v3-5-test has been updated via 1d71d4b... Fix bug #6557 - Do not work VFS full_audit from 45c634e... s3: Fix bug 7139 owner of file not available with kerberos. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test - Log - commit 1d71d4b6b5f5fdf5caf9fed861c2032bb307a32f Author: Jeremy Allison j...@samba.org Date: Wed Feb 17 10:11:57 2010 -0800 Fix bug #6557 - Do not work VFS full_audit Re-arrange the operations order so SMB_VFS_CONNECT is done first as root (to allow modules to correctly initialize themselves). Reviewed modules to check if they needed CONNECT invoked as a user (which we previously did) and it turns out any of them that cared needed root permissions anyway. Jeremy. --- Summary of changes: source3/smbd/service.c | 35 --- 1 files changed, 16 insertions(+), 19 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/service.c b/source3/smbd/service.c index d8ba4fe..572861a 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -652,7 +652,6 @@ connection_struct *make_connection_snum(struct smbd_server_connection *sconn, fstring dev; int ret; char addr[INET6_ADDRSTRLEN]; - bool on_err_call_dis_hook = false; NTSTATUS status; fstrcpy(dev, pdev); @@ -887,6 +886,18 @@ connection_struct *make_connection_snum(struct smbd_server_connection *sconn, return NULL; } + /* Invoke VFS make connection hook - must be the first + VFS operation we do. */ + + if (SMB_VFS_CONNECT(conn, lp_servicename(snum), + conn-server_info-unix_name) 0) { + DEBUG(0,(make_connection: VFS make connection failed!\n)); + yield_connection(conn, lp_servicename(snum)); + conn_free(conn); + *pstatus = NT_STATUS_UNSUCCESSFUL; + return NULL; + } + /* * Fix compatibility issue pointed out by Volker. * We pass the conn-connectpath to the preexec @@ -917,6 +928,7 @@ connection_struct *make_connection_snum(struct smbd_server_connection *sconn, if (ret != 0 lp_rootpreexec_close(snum)) { DEBUG(1,(root preexec gave %d - failing connection\n, ret)); + SMB_VFS_DISCONNECT(conn); yield_connection(conn, lp_servicename(snum)); conn_free(conn); *pstatus = NT_STATUS_ACCESS_DENIED; @@ -928,6 +940,7 @@ connection_struct *make_connection_snum(struct smbd_server_connection *sconn, if (!change_to_user(conn, conn-vuid)) { /* No point continuing if they fail the basic checks */ DEBUG(0,(Can't become connected user!\n)); + SMB_VFS_DISCONNECT(conn); yield_connection(conn, lp_servicename(snum)); conn_free(conn); *pstatus = NT_STATUS_LOGON_FAILURE; @@ -993,20 +1006,6 @@ connection_struct *make_connection_snum(struct smbd_server_connection *sconn, lp_aio_write_behind(snum)); } - /* Invoke VFS make connection hook - do this before the VFS_STAT call - to allow any filesystems needing user credentials to initialize - themselves. */ - - if (SMB_VFS_CONNECT(conn, lp_servicename(snum), - conn-server_info-unix_name) 0) { - DEBUG(0,(make_connection: VFS make connection failed!\n)); - *pstatus = NT_STATUS_UNSUCCESSFUL; - goto err_root_exit; - } - - /* Any error exit after here needs to call the disconnect hook. */ - on_err_call_dis_hook = true; - status = create_synthetic_smb_fname(talloc_tos(), conn-connectpath, NULL, NULL, smb_fname_cpath); if (!NT_STATUS_IS_OK(status)) { @@ -1085,10 +1084,8 @@ connection_struct *make_connection_snum(struct smbd_server_connection *sconn, err_root_exit: TALLOC_FREE(smb_fname_cpath); change_to_root_user(); - if (on_err_call_dis_hook) { - /* Call VFS disconnect hook */ - SMB_VFS_DISCONNECT(conn); - } + /* Call VFS disconnect hook */ + SMB_VFS_DISCONNECT(conn); yield_connection(conn, lp_servicename(snum)); conn_free(conn); return NULL; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-4-test updated
The branch, v3-4-test has been updated via 2eb3385... Fix bug #6557 - Do not work VFS full_audit from 05e26ad... WHATSNEW: Update changes since 3.4.5. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test - Log - commit 2eb33851a753cbd5594d44243802388cff5ae152 Author: Jeremy Allison j...@samba.org Date: Wed Feb 17 10:46:42 2010 -0800 Fix bug #6557 - Do not work VFS full_audit Re-arrange the operations order so SMB_VFS_CONNECT is done first as root (to allow modules to correctly initialize themselves). Reviewed modules to check if they needed CONNECT invoked as a user (which we previously did) and it turns out any of them that cared needed root permissions anyway. Jeremy. --- Summary of changes: source3/smbd/service.c | 34 -- 1 files changed, 16 insertions(+), 18 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/service.c b/source3/smbd/service.c index 6248f5d..8490f17 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -649,7 +649,6 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser, fstring dev; int ret; char addr[INET6_ADDRSTRLEN]; - bool on_err_call_dis_hook = false; NTSTATUS status; fstrcpy(dev, pdev); @@ -887,6 +886,18 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser, return NULL; } + /* Invoke VFS make connection hook - must be the first + VFS operation we do. */ + + if (SMB_VFS_CONNECT(conn, lp_servicename(snum), + conn-server_info-unix_name) 0) { + DEBUG(0,(make_connection: VFS make connection failed!\n)); + yield_connection(conn, lp_servicename(snum)); + conn_free(conn); + *pstatus = NT_STATUS_UNSUCCESSFUL; + return NULL; + } + /* * Fix compatibility issue pointed out by Volker. * We pass the conn-connectpath to the preexec @@ -917,6 +928,7 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser, if (ret != 0 lp_rootpreexec_close(snum)) { DEBUG(1,(root preexec gave %d - failing connection\n, ret)); + SMB_VFS_DISCONNECT(conn); yield_connection(conn, lp_servicename(snum)); conn_free(conn); *pstatus = NT_STATUS_ACCESS_DENIED; @@ -928,6 +940,7 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser, if (!change_to_user(conn, conn-vuid)) { /* No point continuing if they fail the basic checks */ DEBUG(0,(Can't become connected user!\n)); + SMB_VFS_DISCONNECT(conn); yield_connection(conn, lp_servicename(snum)); conn_free(conn); *pstatus = NT_STATUS_LOGON_FAILURE; @@ -993,19 +1006,6 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser, lp_aio_write_behind(snum)); } - /* Invoke VFS make connection hook - do this before the VFS_STAT call - to allow any filesystems needing user credentials to initialize - themselves. */ - - if (SMB_VFS_CONNECT(conn, lp_servicename(snum), - conn-server_info-unix_name) 0) { - DEBUG(0,(make_connection: VFS make connection failed!\n)); - *pstatus = NT_STATUS_UNSUCCESSFUL; - goto err_root_exit; - } - - /* Any error exit after here needs to call the disconnect hook. */ - on_err_call_dis_hook = true; /* win2000 does not check the permissions on the directory during the tree connect, instead relying on permission @@ -1078,10 +1078,8 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser, err_root_exit: change_to_root_user(); - if (on_err_call_dis_hook) { - /* Call VFS disconnect hook */ - SMB_VFS_DISCONNECT(conn); - } + /* Call VFS disconnect hook */ + SMB_VFS_DISCONNECT(conn); yield_connection(conn, lp_servicename(snum)); conn_free(conn); return NULL; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-3-test updated
The branch, v3-3-test has been updated via 20b6d04... Fix bug #6557 - Do not work VFS full_audit from ce04bf6... Fixes issue with preexec scripts creating a share directory, and problems if a smb.conf reload turns wide links back on after a connection is establised. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test - Log - commit 20b6d0406f0f72895f99636beee7a370195147fd Author: Jeremy Allison j...@samba.org Date: Wed Feb 17 10:46:21 2010 -0800 Fix bug #6557 - Do not work VFS full_audit Re-arrange the operations order so SMB_VFS_CONNECT is done first as root (to allow modules to correctly initialize themselves). Reviewed modules to check if they needed CONNECT invoked as a user (which we previously did) and it turns out any of them that cared needed root permissions anyway. Jeremy. --- Summary of changes: source/smbd/service.c | 34 -- 1 files changed, 16 insertions(+), 18 deletions(-) Changeset truncated at 500 lines: diff --git a/source/smbd/service.c b/source/smbd/service.c index 7ba1043..8c9d75d 100644 --- a/source/smbd/service.c +++ b/source/smbd/service.c @@ -720,7 +720,6 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser, fstring dev; int ret; char addr[INET6_ADDRSTRLEN]; - bool on_err_call_dis_hook = false; NTSTATUS status; fstrcpy(dev, pdev); @@ -958,6 +957,18 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser, return NULL; } + /* Invoke VFS make connection hook - must be the first + VFS operation we do. */ + + if (SMB_VFS_CONNECT(conn, lp_servicename(snum), + conn-server_info-unix_name) 0) { + DEBUG(0,(make_connection: VFS make connection failed!\n)); + yield_connection(conn, lp_servicename(snum)); + conn_free(conn); + *pstatus = NT_STATUS_UNSUCCESSFUL; + return NULL; + } + /* * Fix compatibility issue pointed out by Volker. * We pass the conn-connectpath to the preexec @@ -988,6 +999,7 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser, if (ret != 0 lp_rootpreexec_close(snum)) { DEBUG(1,(root preexec gave %d - failing connection\n, ret)); + SMB_VFS_DISCONNECT(conn); yield_connection(conn, lp_servicename(snum)); conn_free(conn); *pstatus = NT_STATUS_ACCESS_DENIED; @@ -999,6 +1011,7 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser, if (!change_to_user(conn, conn-vuid)) { /* No point continuing if they fail the basic checks */ DEBUG(0,(Can't become connected user!\n)); + SMB_VFS_DISCONNECT(conn); yield_connection(conn, lp_servicename(snum)); conn_free(conn); *pstatus = NT_STATUS_LOGON_FAILURE; @@ -1064,19 +1077,6 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser, lp_aio_write_behind(snum)); } - /* Invoke VFS make connection hook - do this before the VFS_STAT call - to allow any filesystems needing user credentials to initialize - themselves. */ - - if (SMB_VFS_CONNECT(conn, lp_servicename(snum), - conn-server_info-unix_name) 0) { - DEBUG(0,(make_connection: VFS make connection failed!\n)); - *pstatus = NT_STATUS_UNSUCCESSFUL; - goto err_root_exit; - } - - /* Any error exit after here needs to call the disconnect hook. */ - on_err_call_dis_hook = true; /* win2000 does not check the permissions on the directory during the tree connect, instead relying on permission @@ -1149,10 +1149,8 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser, err_root_exit: change_to_root_user(); - if (on_err_call_dis_hook) { - /* Call VFS disconnect hook */ - SMB_VFS_DISCONNECT(conn); - } + /* Call VFS disconnect hook */ + SMB_VFS_DISCONNECT(conn); yield_connection(conn, lp_servicename(snum)); conn_free(conn); return NULL; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-5-test updated
The branch, v3-5-test has been updated via 61ea3d3... s3-modules: fix get_acl_blob in the acl_tdb VFS module. from 1d71d4b... Fix bug #6557 - Do not work VFS full_audit http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test - Log - commit 61ea3d3f897f2b6c1b893e727f57ce079782572b Author: Günther Deschner g...@samba.org Date: Thu Feb 18 02:13:07 2010 +0100 s3-modules: fix get_acl_blob in the acl_tdb VFS module. Shuttle-reviewed by jra :) Guenther (cherry picked from commit 6cf10cc1020dd7ef483887caebcbd76d28572432) Fix bug #7148 (vfs_acl_tdb module uses uninitialized variable. Reading blob can fail.) --- Summary of changes: source3/modules/vfs_acl_tdb.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_acl_tdb.c b/source3/modules/vfs_acl_tdb.c index ac11a51..bfed0eb 100644 --- a/source3/modules/vfs_acl_tdb.c +++ b/source3/modules/vfs_acl_tdb.c @@ -147,7 +147,7 @@ static NTSTATUS get_acl_blob(TALLOC_CTX *ctx, TDB_DATA data; struct file_id id; struct db_context *db; - NTSTATUS status; + NTSTATUS status = NT_STATUS_OK; SMB_STRUCT_STAT sbuf; SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via b6f58e2... s3-selftest: fix return code for modprinter.pl -a. from c42d9c4... tsocket/bsd: fix comment in tdgram_bsd_recvfrom_handler() http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit b6f58e25b5bbce25d4e8825e680afe3986f10e8c Author: Günther Deschner g...@samba.org Date: Thu Feb 18 11:20:49 2010 +0100 s3-selftest: fix return code for modprinter.pl -a. Background is: the SetPrinter level 2 calls addprinter command an fails if a share already existed (and the addprinter command returned a non-0 return code). Removing the non-0 return code is fine, as in AddPrinter{Ex}, we have checks to see if a share already exists before calling out the addprinter command. Maybe one day, we need to have a changeprinter command... Guenther --- Summary of changes: source3/script/tests/printing/modprinter.pl |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/script/tests/printing/modprinter.pl b/source3/script/tests/printing/modprinter.pl index 4064841..9e5e329 100755 --- a/source3/script/tests/printing/modprinter.pl +++ b/source3/script/tests/printing/modprinter.pl @@ -95,7 +95,8 @@ while (CONFIGFILE) { if ($section eq $share_name) { $found_section = 1; if ($opt_add) { - die(share $share_name already exists\n); + exit 0; +# die(share $share_name already exists\n); } if ($opt_delete) { $within_section = 1; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via b3c2b22... s3-spoolss: Fix _spoolss_EnumPrinters servername handling. from b6f58e2... s3-selftest: fix return code for modprinter.pl -a. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit b3c2b2260a503079b9abf22f6b35b56c61c2b372 Author: Günther Deschner g...@samba.org Date: Thu Feb 18 12:40:00 2010 +0100 s3-spoolss: Fix _spoolss_EnumPrinters servername handling. Guenther --- Summary of changes: source3/rpc_server/srv_spoolss_nt.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 445a654..9d9a148 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -4309,7 +4309,7 @@ WERROR _spoolss_EnumPrinters(pipes_struct *p, * Level 5: same as Level 2 */ - if (name) { + if (r-in.server) { name = talloc_strdup_upper(p-mem_ctx, r-in.server); W_ERROR_HAVE_NO_MEMORY(name); } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-5-test updated
The branch, v3-5-test has been updated via d1dfa2e... tsocket/bsd: set IPV6_V6ONLY on AF_INET6 sockets via b4a5c33... tsocket/bsd: fix bug #7140 autodetect ipv4 and ipv6 based on the remote address if the local address is any via c84c467... tsocket/bsd: fix bug #7140 use calculated sa_socklen for bind() in tstream_bsd_connect_send() via fc63303... tsocket/bsd: fix do_bind logic for AF_INET via 6aa0941... socket_wrapper: also ignore AF_INET6 in swrap_setsockopt() from 61ea3d3... s3-modules: fix get_acl_blob in the acl_tdb VFS module. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test - Log - commit d1dfa2e92fea3dc54771c4b1a6e3c06ee478b54f Author: Stefan Metzmacher me...@samba.org Date: Wed Feb 17 09:33:18 2010 +0100 tsocket/bsd: set IPV6_V6ONLY on AF_INET6 sockets Some system already have this as default. It's easier to behave the same way on all systems and handle ipv6 and ipv4 sockets separate. metze (cherry picked from commit 1ffcb991a900b78c9175f6b093839fe96b1bd7d9) commit b4a5c3325a272c97658aaede1f1c659260524789 Author: Stefan Metzmacher me...@samba.org Date: Wed Feb 17 08:49:28 2010 +0100 tsocket/bsd: fix bug #7140 autodetect ipv4 and ipv6 based on the remote address if the local address is any metze (cherry picked from commit 8a0949dfc8d2ecf577dfc5ef38496421101b734e) commit c84c467be347384ab1ceb7d74147fef364678235 Author: Stefan Metzmacher me...@samba.org Date: Wed Feb 17 08:45:58 2010 +0100 tsocket/bsd: fix bug #7140 use calculated sa_socklen for bind() in tstream_bsd_connect_send() This is needed because, we can't use sizeof(sockaddr_storage) for AF_UNIX sockets. Also some platforms require exact values for AF_INET and AF_INET6. metze (cherry picked from commit 6637b2f4b06fcee1e8e1b1782dd96e3273f8caac) commit fc63303b07b09f6d6855284f4e0080972fe424f7 Author: Stefan Metzmacher me...@samba.org Date: Wed Feb 17 08:42:22 2010 +0100 tsocket/bsd: fix do_bind logic for AF_INET We want the explicit bind() when we don't use the any address. metze (cherry picked from commit 135543b4c300e2fc31ee4165ce630644e1aef455) commit 6aa09416ad5f27e3db679765657b67e54dde5fd9 Author: Stefan Metzmacher me...@samba.org Date: Wed Feb 17 09:43:00 2010 +0100 socket_wrapper: also ignore AF_INET6 in swrap_setsockopt() metze (cherry picked from commit 0b3e950731fe72a258a631e39ca1304d54663536) --- Summary of changes: lib/socket_wrapper/socket_wrapper.c |4 ++ lib/tsocket/tsocket_bsd.c | 97 +-- 2 files changed, 96 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/socket_wrapper/socket_wrapper.c b/lib/socket_wrapper/socket_wrapper.c index a188cc6..9d732ee 100644 --- a/lib/socket_wrapper/socket_wrapper.c +++ b/lib/socket_wrapper/socket_wrapper.c @@ -1839,6 +1839,10 @@ _PUBLIC_ int swrap_setsockopt(int s, int level, int optname, const void *o switch (si-family) { case AF_INET: return 0; +#ifdef HAVE_IPV6 + case AF_INET6: + return 0; +#endif default: errno = ENOPROTOOPT; return -1; diff --git a/lib/tsocket/tsocket_bsd.c b/lib/tsocket/tsocket_bsd.c index 1c1e580..634deb8 100644 --- a/lib/tsocket/tsocket_bsd.c +++ b/lib/tsocket/tsocket_bsd.c @@ -1136,6 +1136,9 @@ static int tdgram_bsd_dgram_socket(const struct tsocket_address *local, int ret; bool do_bind = false; bool do_reuseaddr = false; + bool do_ipv6only = false; + bool is_inet = false; + int sa_fam = lbsda-u.sa.sa_family; socklen_t sa_socklen = sizeof(lbsda-u.ss); if (remote) { @@ -1164,9 +1167,11 @@ static int tdgram_bsd_dgram_socket(const struct tsocket_address *local, do_reuseaddr = true; do_bind = true; } - if (lbsda-u.in.sin_addr.s_addr == INADDR_ANY) { + if (lbsda-u.in.sin_addr.s_addr != INADDR_ANY) { do_bind = true; } + is_inet = true; + sa_socklen = sizeof(rbsda-u.in); break; #ifdef HAVE_IPV6 case AF_INET6: @@ -1179,6 +1184,9 @@ static int tdgram_bsd_dgram_socket(const struct tsocket_address *local, sizeof(in6addr_any)) != 0) { do_bind = true; } + is_inet = true; + sa_socklen = sizeof(rbsda-u.in6); + do_ipv6only = true; break; #endif default: @@ -1186,7 +1194,23 @@ static int tdgram_bsd_dgram_socket(const struct tsocket_address *local, return -1; } -
[SCM] Samba Shared Repository - branch v3-5-test updated
The branch, v3-5-test has been updated via d68c7db... tsocket/bsd: fix comment in tdgram_bsd_recvfrom_handler() via ba85fac... Fix commit d07cd37b993d3c9beded20323174633b806196b5 via b9e7200... tsocket/bsd: fix bug #7115 FreeBSD includes the UDP header in FIONREAD from d1dfa2e... tsocket/bsd: set IPV6_V6ONLY on AF_INET6 sockets http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test - Log - commit d68c7db67dc8f87be8a924d1b2b66379fc52b723 Author: Stefan Metzmacher me...@samba.org Date: Wed Feb 17 19:11:11 2010 +0100 tsocket/bsd: fix comment in tdgram_bsd_recvfrom_handler() metze (cherry picked from commit c42d9c4ec410e205091784cd97cbceb5572609d8) commit ba85facc2ce212d52140086f876eb4915b40bf22 Author: Jeremy Allison j...@samba.org Date: Wed Feb 17 09:24:34 2010 -0800 Fix commit d07cd37b993d3c9beded20323174633b806196b5 Which was: tsocket/bsd: fix bug #7115 FreeBSD includes the UDP header in FIONREAD Metze, this has to have been wrong - you are throwing away the talloc_realloc pointer returned. Also no error checking. Please review. Thank goodness for gcc warnings :-). Jeremy. (cherry picked from commit 936828de71023d90aaec6c1dba84052246bbad11) Signed-off-by: Stefan Metzmacher me...@samba.org commit b9e7200f933480bce20219f0294364288be3a5df Author: Stefan Metzmacher me...@samba.org Date: Wed Feb 17 13:53:02 2010 +0100 tsocket/bsd: fix bug #7115 FreeBSD includes the UDP header in FIONREAD metze (cherry picked from commit d07cd37b993d3c9beded20323174633b806196b5) --- Summary of changes: lib/tsocket/tsocket_bsd.c | 11 +-- 1 files changed, 9 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/tsocket/tsocket_bsd.c b/lib/tsocket/tsocket_bsd.c index 634deb8..201788e 100644 --- a/lib/tsocket/tsocket_bsd.c +++ b/lib/tsocket/tsocket_bsd.c @@ -877,10 +877,17 @@ static void tdgram_bsd_recvfrom_handler(void *private_data) return; } - if (ret != state-len) { - tevent_req_error(req, EIO); + /* +* Some systems (FreeBSD, see bug #7115) return too much +* bytes in tsocket_bsd_pending()/ioctl(fd, FIONREAD, ...), +* the return value includes some IP/UDP header bytes, +* while recvfrom() just returns the payload. +*/ + state-buf = talloc_realloc(state, state-buf, uint8_t, ret); + if (tevent_req_nomem(state-buf, req)) { return; } + state-len = ret; tevent_req_done(req); } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 37115f9... s3:docs: add some advice for usage of strict allocate from b3c2b22... s3-spoolss: Fix _spoolss_EnumPrinters servername handling. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 37115f91aebec9c846e54790c6bcf433ae35888a Author: Björn Jacke b...@sernet.de Date: Wed Feb 17 23:03:32 2010 +0100 s3:docs: add some advice for usage of strict allocate --- Summary of changes: docs-xml/smbdotconf/tuning/strictallocate.xml | 24 ++-- 1 files changed, 18 insertions(+), 6 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/smbdotconf/tuning/strictallocate.xml b/docs-xml/smbdotconf/tuning/strictallocate.xml index 2606f20..88ebfb0 100644 --- a/docs-xml/smbdotconf/tuning/strictallocate.xml +++ b/docs-xml/smbdotconf/tuning/strictallocate.xml @@ -10,14 +10,26 @@ of actually forcing the disk system to allocate real storage blocks when a file is created or extended to be a given size. In UNIX terminology this means that Samba will stop creating sparse files. -This can be slow on some systems./para +This can be slow on some systems. When you work with large files like +100MB or so you may even run into problems with clients running into +timeouts./para -paraWhen strict allocate is constantno/constant the server does sparse -disk block allocation when a file is extended./para +paraWhen you have an extent based filesystem it's likely that we can make +use of unwritten extents which allows Samba to allocate even large ammounts +of space very fast and you will not see any timeout problems caused by +strict allocate. With strict allocate in use you will also get much better +out of quota messages in case you use quotas. Another advantage of +activating this setting is that it will help to reduce file +fragmentation./para + +paraTo give you an idea on which filesystems this setting might currently +be a good option for you: XFS, ext4, btrfs, ocfs2 on Linux and JFS2 on +AIX support unwritten extents. On Filesystems that do not support it, +preallocation is probably an expensive operation where you will see reduced +performance and risk to let clients run into timeouts when creating large +files. Examples are ext3, ZFS, HFS+ and most others, so be aware if you +activate this setting on those filesystems./para -paraSetting this to constantyes/constant can help Samba return -out of quota messages on systems that are restricting the disk quota -of users./para /description value type=defaultno/value -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 4948197... s3-docs: Remove trailing whitespaces and fix a typo. from 37115f9... s3:docs: add some advice for usage of strict allocate http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 494819773d61daa32d4ee2a0a15088f3b4abe6e2 Author: Karolin Seeger ksee...@samba.org Date: Thu Feb 18 13:10:21 2010 +0100 s3-docs: Remove trailing whitespaces and fix a typo. Karolin --- Summary of changes: docs-xml/smbdotconf/tuning/strictallocate.xml |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/smbdotconf/tuning/strictallocate.xml b/docs-xml/smbdotconf/tuning/strictallocate.xml index 88ebfb0..1855574 100644 --- a/docs-xml/smbdotconf/tuning/strictallocate.xml +++ b/docs-xml/smbdotconf/tuning/strictallocate.xml @@ -3,8 +3,8 @@ type=boolean xmlns:samba=http://www.samba.org/samba/DTD/samba-doc; description -paraThis is a boolean that controls the handling of -disk space allocation in the server. When this is set to constantyes/constant +paraThis is a boolean that controls the handling of +disk space allocation in the server. When this is set to constantyes/constant the server will change from UNIX behaviour of not committing real disk storage blocks when a file is extended to the Windows behaviour of actually forcing the disk system to allocate real storage blocks @@ -15,7 +15,7 @@ timeouts./para paraWhen you have an extent based filesystem it's likely that we can make -use of unwritten extents which allows Samba to allocate even large ammounts +use of unwritten extents which allows Samba to allocate even large amounts of space very fast and you will not see any timeout problems caused by strict allocate. With strict allocate in use you will also get much better out of quota messages in case you use quotas. Another advantage of -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-5-test updated
The branch, v3-5-test has been updated via b3c5b9d... s3-docs: Remove trailing whitespaces and fix a typo. via cbf728c... s3:docs: add some advice for usage of strict allocate (cherry picked from commit 37115f91aebec9c846e54790c6bcf433ae35888a) from d68c7db... tsocket/bsd: fix comment in tdgram_bsd_recvfrom_handler() http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test - Log - commit b3c5b9d7739143cc3cc7c004a73fce2969aaa6b8 Author: Karolin Seeger ksee...@samba.org Date: Thu Feb 18 13:10:21 2010 +0100 s3-docs: Remove trailing whitespaces and fix a typo. Karolin (cherry picked from commit 494819773d61daa32d4ee2a0a15088f3b4abe6e2) commit cbf728ce617323ca866799370491a402800772c1 Author: Björn Jacke b...@sernet.de Date: Wed Feb 17 23:03:32 2010 +0100 s3:docs: add some advice for usage of strict allocate (cherry picked from commit 37115f91aebec9c846e54790c6bcf433ae35888a) --- Summary of changes: docs-xml/smbdotconf/tuning/strictallocate.xml | 28 +--- 1 files changed, 20 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/smbdotconf/tuning/strictallocate.xml b/docs-xml/smbdotconf/tuning/strictallocate.xml index 2606f20..1855574 100644 --- a/docs-xml/smbdotconf/tuning/strictallocate.xml +++ b/docs-xml/smbdotconf/tuning/strictallocate.xml @@ -3,21 +3,33 @@ type=boolean xmlns:samba=http://www.samba.org/samba/DTD/samba-doc; description -paraThis is a boolean that controls the handling of -disk space allocation in the server. When this is set to constantyes/constant +paraThis is a boolean that controls the handling of +disk space allocation in the server. When this is set to constantyes/constant the server will change from UNIX behaviour of not committing real disk storage blocks when a file is extended to the Windows behaviour of actually forcing the disk system to allocate real storage blocks when a file is created or extended to be a given size. In UNIX terminology this means that Samba will stop creating sparse files. -This can be slow on some systems./para +This can be slow on some systems. When you work with large files like +100MB or so you may even run into problems with clients running into +timeouts./para -paraWhen strict allocate is constantno/constant the server does sparse -disk block allocation when a file is extended./para +paraWhen you have an extent based filesystem it's likely that we can make +use of unwritten extents which allows Samba to allocate even large amounts +of space very fast and you will not see any timeout problems caused by +strict allocate. With strict allocate in use you will also get much better +out of quota messages in case you use quotas. Another advantage of +activating this setting is that it will help to reduce file +fragmentation./para + +paraTo give you an idea on which filesystems this setting might currently +be a good option for you: XFS, ext4, btrfs, ocfs2 on Linux and JFS2 on +AIX support unwritten extents. On Filesystems that do not support it, +preallocation is probably an expensive operation where you will see reduced +performance and risk to let clients run into timeouts when creating large +files. Examples are ext3, ZFS, HFS+ and most others, so be aware if you +activate this setting on those filesystems./para -paraSetting this to constantyes/constant can help Samba return -out of quota messages on systems that are restricting the disk quota -of users./para /description value type=defaultno/value -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 0a8011a... spoolss: use ndr_push_spoolss_PrinterInfo2 hand-marshalled version (moves devmode relative pointer down to sd). via 2881742... spoolss: add spoolss_security_descriptor. via 70f8b34... s3: re-run make samba3-idl. via f10a2d7... security: make two bitmaps public. via 8c4ff98... spoolss: make two bitmaps public. via 8f52957... spoolss: make all security descriptors and devicemodes 4 byte aligned and add missing subcontexts. via 6d0a397... spoolss: set NDR_RELATIVE_REVERSE flag for various unions that have relative pointers. via 2059a16... ndr_spoolss_buf: use LIBNDR_FLAG_NO_NDR_SIZE in NDR_SPOOLSS_SIZE_* via a4c3aeb... spoolss: use subcontext in NDR_SPOOLSS_PUSH_ENUM_OUT macro. via 8310f02... libndr: fix ndr_size_* calculation with relative reverse buffers via 4a76d29... libndr: for now align reverse relative pointers to 2 bytes by default. via 31c7780... libndr: implement LIBNDR_RELATIVE_REVERSE handling via 0534775... libndr: store a subcontext buffer size in ndr_push_subcontext_start. via b5f9c44... libndr: give an error when ndr_push_relative_ptr2_start()/_end() is used with the RELATIVE_REVERSE flag via a2c3429... libndr: add LIBNDR_FLAG_NO_RELATIVE_REVERSE so that relative reverse processing can be disabled for single structure elements. via ee13a51... libndr: add LIBNDR_FLAG_RELATIVE_REVERSE flag. via c9fa97b... libndr: change subcontext buffer allocation to allocate on subcontext_start. via 98e143c... librpc/ndr: make ndr_push_relative_ptr2() static via e035911... librpc/ndr_krb5pac: use ndr_push_relative_ptr2_start()/_end() via b423bd2... librpc/ndr_drsblobs: use ndr_push_relative_ptr2_start()/_end() via bfd6edb... spoolss: fix relative pointers in ndr_push_spoolss_DriverInfo101. via c869328... s3: re-run make full_idl. via a049d75... pidl: use ndr_push_relative_ptr2_start and ndr_push_relative_ptr2_end. via bc20d34... libndr: add ndr_push_relative_ptr2_start and ndr_push_relative_ptr2_end. from 4948197... s3-docs: Remove trailing whitespaces and fix a typo. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 0a8011aa98ccaa81dc6ba2d30672ef4856fc31d8 Author: Günther Deschner g...@samba.org Date: Sat Feb 13 03:45:25 2010 +0100 spoolss: use ndr_push_spoolss_PrinterInfo2 hand-marshalled version (moves devmode relative pointer down to sd). Guenther commit 28817424935e5b6eaf465fe993dedc2b0a0cf177 Author: Günther Deschner g...@samba.org Date: Tue Feb 16 02:48:01 2010 +0100 spoolss: add spoolss_security_descriptor. Guenther commit 70f8b34f513ceeb736061d79e9d44dda39b51642 Author: Günther Deschner g...@samba.org Date: Tue Feb 9 16:47:32 2010 +0100 s3: re-run make samba3-idl. Guenther commit f10a2d773d141f67319e19b45c40101bb9cb6cf4 Author: Günther Deschner g...@samba.org Date: Tue Feb 16 10:46:07 2010 +0100 security: make two bitmaps public. Guenther commit 8c4ff98ea11ff06e20bea73596e9643d8194a890 Author: Günther Deschner g...@samba.org Date: Sat Feb 13 04:27:05 2010 +0100 spoolss: make two bitmaps public. Guenther commit 8f52957369bf8ce7591d5d9a1436ccb7e384c612 Author: Stefan Metzmacher me...@samba.org Date: Thu Feb 18 15:36:08 2010 +0100 spoolss: make all security descriptors and devicemodes 4 byte aligned and add missing subcontexts. Guenther commit 6d0a39741dacd81e33b25a91fa28cdf983d10d84 Author: Günther Deschner g...@samba.org Date: Mon Dec 14 17:22:39 2009 +0100 spoolss: set NDR_RELATIVE_REVERSE flag for various unions that have relative pointers. Guenther commit 2059a165ee6f4d231aa4075d8ddea70b8df8944f Author: Stefan Metzmacher me...@samba.org Date: Thu Feb 18 15:17:42 2010 +0100 ndr_spoolss_buf: use LIBNDR_FLAG_NO_NDR_SIZE in NDR_SPOOLSS_SIZE_* metze commit a4c3aeb79306190b09e284a6a28e3b40fbc5823b Author: Stefan Metzmacher me...@samba.org Date: Wed Dec 23 15:52:39 2009 +0100 spoolss: use subcontext in NDR_SPOOLSS_PUSH_ENUM_OUT macro. metze commit 8310f02414efd3b792857ed20c636c4c114e1ba2 Author: Stefan Metzmacher me...@samba.org Date: Thu Feb 18 15:13:20 2010 +0100 libndr: fix ndr_size_* calculation with relative reverse buffers metze commit 4a76d29374769ba4c075b8d5767498848d2e17d6 Author: Stefan Metzmacher me...@samba.org Date: Thu Feb 18 13:40:44 2010 +0100 libndr: for now align reverse relative pointers to 2 bytes by default. This is just a hack and we should let the callers use FLAG_ALIGN2 explicit in future. metze commit 31c7780c16651b284009874cf3da04587dc36d19 Author: Stefan Metzmacher me...@samba.org Date: Wed Feb 17 21:24:40 2010 +0100
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 0bf9c5e... testprogs: add RPC_S_PROCNUM_OUT_OF_RANGE error. from 0a8011a... spoolss: use ndr_push_spoolss_PrinterInfo2 hand-marshalled version (moves devmode relative pointer down to sd). http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 0bf9c5ecf60d0264b4a7ba3070b3511adb7bd28c Author: Günther Deschner g...@samba.org Date: Thu Feb 18 14:48:57 2010 +0100 testprogs: add RPC_S_PROCNUM_OUT_OF_RANGE error. Guenther --- Summary of changes: testprogs/win32/spoolss/error.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/testprogs/win32/spoolss/error.c b/testprogs/win32/spoolss/error.c index 0ff775b..8ccc542 100644 --- a/testprogs/win32/spoolss/error.c +++ b/testprogs/win32/spoolss/error.c @@ -113,6 +113,8 @@ const char *errstr(DWORD error) #endif case ERROR_CANCELLED: return ERROR_CANCELLED; + case RPC_S_PROCNUM_OUT_OF_RANGE: + return RPC_S_PROCNUM_OUT_OF_RANGE; case RPC_S_SERVER_UNAVAILABLE: return RPC_S_SERVER_UNAVAILABLE; case RPC_S_INVALID_NET_ADDR: -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via df13b13... Fix bug #7154 - mangling method = hash can crash storing a name not containing a '.' from 0bf9c5e... testprogs: add RPC_S_PROCNUM_OUT_OF_RANGE error. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit df13b1303a751962d8f7d5298b39e4a7500fef15 Author: Jeremy Allison j...@samba.org Date: Thu Feb 18 11:22:44 2010 -0800 Fix bug #7154 - mangling method = hash can crash storing a name not containing a '.' Fix use of uninitialized variable. This can lead to crashes if mangling = hash processes names with no '.'. Jeremy. --- Summary of changes: source3/smbd/mangle_hash.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/mangle_hash.c b/source3/smbd/mangle_hash.c index 8369af4..1482d10 100644 --- a/source3/smbd/mangle_hash.c +++ b/source3/smbd/mangle_hash.c @@ -408,8 +408,8 @@ static void cache_mangled_name( const char mangled_name[13], { TDB_DATA data_val; char mangled_name_key[13]; - char *s1; - char *s2; + char *s1 = NULL; + char *s2 = NULL; /* If the cache isn't initialized, give up. */ if( !tdb_mangled_cache ) @@ -448,7 +448,9 @@ static void cache_mangled_name( const char mangled_name[13], DEBUG(5,(cache_mangled_name: Stored entry %s - %s\n, mangled_name_key, raw_name)); } /* Restore the change we made to the const string. */ - *s2 = '.'; + if (s2) { + *s2 = '.'; + } } /* ** ** -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via a4e8210... Fix bug #7155 - valgrind Conditional jump or move depends on uninitialised value(s) error when mangling method = hash from df13b13... Fix bug #7154 - mangling method = hash can crash storing a name not containing a '.' http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit a4e8210ba7d6d471cb9f17754244393b9c1e5930 Author: Jeremy Allison j...@samba.org Date: Thu Feb 18 12:21:10 2010 -0800 Fix bug #7155 - valgrind Conditional jump or move depends on uninitialised value(s) error when mangling method = hash The charset array allocated in init_chartest() is allocated by MALLOC, but only some elements of it being set after allocation. Fix is to memset to zero after allocation. Jeremy. --- Summary of changes: source3/smbd/mangle_hash.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/mangle_hash.c b/source3/smbd/mangle_hash.c index 1482d10..d1af099 100644 --- a/source3/smbd/mangle_hash.c +++ b/source3/smbd/mangle_hash.c @@ -331,6 +331,7 @@ static void init_chartest( void ) chartest = SMB_MALLOC_ARRAY(unsigned char, 256); SMB_ASSERT(chartest != NULL); + memset(chartest, '\0', 256); for( s = (const unsigned char *)basechars; *s; s++ ) { chartest[*s] |= BASECHAR_MASK; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 77164a8... testprogs: add tests for GetJob() to spoolss test. from a4e8210... Fix bug #7155 - valgrind Conditional jump or move depends on uninitialised value(s) error when mangling method = hash http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 77164a8a5de22c67cf8d86bda92408aef2ea146b Author: Günther Deschner g...@samba.org Date: Thu Feb 18 16:40:20 2010 +0100 testprogs: add tests for GetJob() to spoolss test. Guenther --- Summary of changes: testprogs/win32/spoolss/spoolss.c | 106 + 1 files changed, 106 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/testprogs/win32/spoolss/spoolss.c b/testprogs/win32/spoolss/spoolss.c index d097bf3..1a8516b 100644 --- a/testprogs/win32/spoolss/spoolss.c +++ b/testprogs/win32/spoolss/spoolss.c @@ -859,6 +859,111 @@ static BOOL test_DeviceModes(struct torture_context *tctx, / / +static BOOL test_GetJob(struct torture_context *tctx, + LPSTR printername, + HANDLE handle, + DWORD job_id) +{ + DWORD levels[] = { 1, 2, 3, 4 }; + DWORD success[] = { 1, 1, 1, 1 }; + DWORD i; + LPBYTE buffer = NULL; + + for (i=0; i ARRAY_SIZE(levels); i++) { + + DWORD needed = 0; + DWORD err = 0; + char tmp[1024]; + + torture_comment(tctx, Testing GetJob(%d) level %d, job_id, levels[i]); + + if (tctx-samba3 levels[i] == 4) { + torture_comment(tctx, skipping level %d getjob against samba\n, levels[i]); + continue; + } + + GetJob(handle, job_id, levels[i], NULL, 0, needed); + err = GetLastError(); + if (err == ERROR_INSUFFICIENT_BUFFER) { + err = 0; + buffer = malloc(needed); + torture_assert(tctx, buffer, malloc failed); + if (!GetJob(handle, job_id, levels[i], buffer, needed, needed)) { + err = GetLastError(); + } + } + if (err) { + sprintf(tmp, GetJob failed level %d on [%s] (buffer size = %d), error: %s\n, + levels[i], printername, needed, errstr(err)); + if (success[i]) { + torture_fail(tctx, tmp); + } else { + torture_warning(tctx, tmp); + } + } + + if (tctx-print) { + print_job_info_bylevel(levels[i], buffer, 1); + } + + free(buffer); + buffer = NULL; + } + + return TRUE; +} + +/ +/ + +static BOOL test_EachJob(struct torture_context *tctx, +LPSTR printername, +HANDLE handle) +{ + DWORD i; + PJOB_INFO_1 buffer = NULL; + DWORD needed = 0; + DWORD returned = 0; + DWORD err = 0; + DWORD level = 1; + char tmp[1024]; + BOOL ret = TRUE; + + torture_comment(tctx, Testing Each PrintJob %d); + + EnumJobs(handle, 0, 100, level, NULL, 0, needed, returned); + err = GetLastError(); + if (err == ERROR_INSUFFICIENT_BUFFER) { + err = 0; + buffer = (PJOB_INFO_1)malloc(needed); + torture_assert(tctx, buffer, malloc failed); + if (!EnumJobs(handle, 0, 100, level, (LPBYTE)buffer, needed, needed, returned)) { + err = GetLastError(); + } + } + if (err) { + sprintf(tmp, EnumJobs failed level %d on [%s] (buffer size = %d), error: %s\n, + level, printername, needed, errstr(err)); + torture_fail(tctx, tmp); + } + + if (tctx-print) { + print_job_info_bylevel(level, (LPBYTE)buffer, returned); + } + + for (i=0; i returned; i++) { + ret = test_GetJob(tctx, printername, handle, buffer[i].JobId); + } + + free(buffer); + + return ret; + +} + +/ +/ + static BOOL test_OnePrinter(struct torture_context *tctx,
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via c0ebca2... s3: optimize strict allocate for XFS on IRIX from 77164a8... testprogs: add tests for GetJob() to spoolss test. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit c0ebca237c6748365b2400529e02b5c8342e6ecc Author: Björn Jacke b...@sernet.de Date: Thu Feb 18 10:01:26 2010 +0100 s3: optimize strict allocate for XFS on IRIX --- Summary of changes: source3/lib/system.c | 25 + 1 files changed, 25 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/system.c b/source3/lib/system.c index 9c1da3a..58240a3 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -627,6 +627,31 @@ int sys_posix_fallocate(int fd, SMB_OFF_T offset, SMB_OFF_T len) return posix_fallocate64(fd, offset, len); #elif defined(HAVE_POSIX_FALLOCATE) !defined(HAVE_BROKEN_POSIX_FALLOCATE) return posix_fallocate(fd, offset, len); +#elif defined(F_RESVSP64) + /* this handles XFS on IRIX */ + struct flock64 fl; + SMB_OFF_T new_len = offset + len; + int ret; + struct stat64 sbuf; + + /* unlikely to get a too large file on a 64bit system but ... */ + if (new_len 0) + return EFBIG; + + fl.l_whence = SEEK_SET; + fl.l_start = offset; + fl.l_len = len; + + ret=fcntl(fd, F_RESVSP64, fl); + + if (ret != 0) + return errno; + + /* Make sure the file gets enlarged after we allocated space: */ + fstat64(fd, sbuf); + if (new_len sbuf.st_size) + ftruncate64(fd, new_len); + return 0; #else return ENOSYS; #endif -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 2eb83f2... s4-smbtorture: add LOCAL-NSS-WRAPPER-DUPLICATES test. via 9b9c9fd... s4-smbtorture: be more verbose in LOCAL-NSS-WRAPPER. from c0ebca2... s3: optimize strict allocate for XFS on IRIX http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 2eb83f29648c7647cff4ac6eb38830ae35fcbcb5 Author: Günther Deschner g...@samba.org Date: Thu Feb 18 23:23:28 2010 +0100 s4-smbtorture: add LOCAL-NSS-WRAPPER-DUPLICATES test. Guenther commit 9b9c9fd1759eb1f76cb54d0b6aec600c3c3a8f8f Author: Günther Deschner g...@samba.org Date: Thu Feb 18 23:22:52 2010 +0100 s4-smbtorture: be more verbose in LOCAL-NSS-WRAPPER. Guenther --- Summary of changes: lib/nss_wrapper/testsuite.c | 101 -- 1 files changed, 96 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/nss_wrapper/testsuite.c b/lib/nss_wrapper/testsuite.c index 02a10e3..d6b4839 100644 --- a/lib/nss_wrapper/testsuite.c +++ b/lib/nss_wrapper/testsuite.c @@ -3,7 +3,7 @@ local testing of the nss wrapper - Copyright (C) Guenther Deschner 2009 + Copyright (C) Guenther Deschner 2009-2010 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 @@ -772,8 +772,8 @@ static bool test_nwrap_membership(struct torture_context *tctx) int i; if (!old_pwd || !old_group) { + torture_comment(tctx, ENV NSS_WRAPPER_PASSWD or NSS_WRAPPER_GROUP not set\n); torture_skip(tctx, nothing to test\n); - return true; } torture_assert(tctx, test_nwrap_enum_passwd(tctx, pwd, num_pwd), @@ -797,8 +797,8 @@ static bool test_nwrap_enumeration(struct torture_context *tctx) const char *old_group = getenv(NSS_WRAPPER_GROUP); if (!old_pwd || !old_group) { + torture_comment(tctx, ENV NSS_WRAPPER_PASSWD or NSS_WRAPPER_GROUP not set\n); torture_skip(tctx, nothing to test\n); - return true; } torture_assert(tctx, test_nwrap_passwd(tctx), @@ -815,8 +815,8 @@ static bool test_nwrap_reentrant_enumeration(struct torture_context *tctx) const char *old_group = getenv(NSS_WRAPPER_GROUP); if (!old_pwd || !old_group) { + torture_comment(tctx, ENV NSS_WRAPPER_PASSWD or NSS_WRAPPER_GROUP not set\n); torture_skip(tctx, nothing to test\n); - return true; } torture_comment(tctx, Testing re-entrant calls\n); @@ -835,8 +835,8 @@ static bool test_nwrap_reentrant_enumeration_crosschecks(struct torture_context const char *old_group = getenv(NSS_WRAPPER_GROUP); if (!old_pwd || !old_group) { + torture_comment(tctx, ENV NSS_WRAPPER_PASSWD or NSS_WRAPPER_GROUP not set\n); torture_skip(tctx, nothing to test\n); - return true; } torture_comment(tctx, Testing re-entrant calls with cross checks\n); @@ -849,6 +849,96 @@ static bool test_nwrap_reentrant_enumeration_crosschecks(struct torture_context return true; } +static bool test_nwrap_passwd_duplicates(struct torture_context *tctx) +{ + int i, d; + struct passwd *pwd; + size_t num_pwd; + int duplicates = 0; + + torture_assert(tctx, test_nwrap_enum_passwd(tctx, pwd, num_pwd), + failed to enumerate passwd); + + for (i=0; i num_pwd; i++) { + const char *current_name = pwd[i].pw_name; + for (d=0; d num_pwd; d++) { + const char *dup_name = pwd[d].pw_name; + if (d == i) { + continue; + } + if (!strequal(current_name, dup_name)) { + continue; + } + + torture_warning(tctx, found duplicate names:); + print_passwd(pwd[d]); + print_passwd(pwd[i]); + duplicates++; + } + } + + if (duplicates) { + torture_fail(tctx, talloc_asprintf(tctx, found %d duplicate names, duplicates)); + } + + return true; +} + +static bool test_nwrap_group_duplicates(struct torture_context *tctx) +{ + int i, d; + struct group *grp; + size_t num_grp; + int duplicates = 0; + + torture_assert(tctx, test_nwrap_enum_group(tctx, grp, num_grp), + failed to enumerate group); + + for (i=0; i num_grp; i++) { + const char *current_name = grp[i].gr_name; + for (d=0; d num_grp; d++) { + const char
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 11a87cd... More fixes for bug #7146 - Samba miss-parses authenticated RPC packets. from 2eb83f2... s4-smbtorture: add LOCAL-NSS-WRAPPER-DUPLICATES test. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 11a87cd31eedaf4e43864bf51ac1f53bca53e327 Author: Jeremy Allison j...@samba.org Date: Thu Feb 18 15:03:30 2010 -0800 More fixes for bug #7146 - Samba miss-parses authenticated RPC packets. Ensure we calculate the space correctly (including the ss_padding_len) when constructing reply packets. Jeremy. --- Summary of changes: source3/rpc_server/srv_pipe.c | 30 -- 1 files changed, 16 insertions(+), 14 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c index 6b08f1f..1c10525 100644 --- a/source3/rpc_server/srv_pipe.c +++ b/source3/rpc_server/srv_pipe.c @@ -108,8 +108,15 @@ static bool create_next_pdu_ntlmssp(pipes_struct *p) return False; } - data_space_available = RPC_MAX_PDU_FRAG_LEN - RPC_HEADER_LEN - - RPC_HDR_RESP_LEN - RPC_HDR_AUTH_LEN - NTLMSSP_SIG_SIZE; + if (data_len_left % SERVER_NDR_PADDING_SIZE) { + ss_padding_len = SERVER_NDR_PADDING_SIZE - (data_len_left % SERVER_NDR_PADDING_SIZE); + DEBUG(10,(create_next_pdu_ntlmssp: adding sign/seal padding of %u\n, + ss_padding_len )); + } + + data_space_available = RPC_MAX_PDU_FRAG_LEN - RPC_HEADER_LEN - + RPC_HDR_RESP_LEN - ss_padding_len - RPC_HDR_AUTH_LEN - + NTLMSSP_SIG_SIZE; /* * The amount we send is the minimum of the available @@ -133,12 +140,6 @@ static bool create_next_pdu_ntlmssp(pipes_struct *p) p-hdr.flags |= DCERPC_PFC_FLAG_LAST; } - if (data_len_left % SERVER_NDR_PADDING_SIZE) { - ss_padding_len = SERVER_NDR_PADDING_SIZE - (data_len_left % SERVER_NDR_PADDING_SIZE); - DEBUG(10,(create_next_pdu_ntlmssp: adding sign/seal padding of %u\n, - ss_padding_len )); - } - /* * Set up the header lengths. */ @@ -328,8 +329,14 @@ static bool create_next_pdu_schannel(pipes_struct *p) return False; } + if (data_len_left % SERVER_NDR_PADDING_SIZE) { + ss_padding_len = SERVER_NDR_PADDING_SIZE - (data_len_left % SERVER_NDR_PADDING_SIZE); + DEBUG(10,(create_next_pdu_schannel: adding sign/seal padding of %u\n, + ss_padding_len )); + } + data_space_available = RPC_MAX_PDU_FRAG_LEN - RPC_HEADER_LEN - - RPC_HDR_RESP_LEN - RPC_HDR_AUTH_LEN + - RPC_HDR_RESP_LEN - ss_padding_len - RPC_HDR_AUTH_LEN - RPC_AUTH_SCHANNEL_SIGN_OR_SEAL_CHK_LEN; /* @@ -353,11 +360,6 @@ static bool create_next_pdu_schannel(pipes_struct *p) if(p-out_data.data_sent_length + data_len = prs_offset(p-out_data.rdata)) { p-hdr.flags |= DCERPC_PFC_FLAG_LAST; } - if (data_len_left % SERVER_NDR_PADDING_SIZE) { - ss_padding_len = SERVER_NDR_PADDING_SIZE - (data_len_left % SERVER_NDR_PADDING_SIZE); - DEBUG(10,(create_next_pdu_schannel: adding sign/seal padding of %u\n, - ss_padding_len )); - } p-hdr.frag_len = RPC_HEADER_LEN + RPC_HDR_RESP_LEN + data_len + ss_padding_len + RPC_HDR_AUTH_LEN + RPC_AUTH_SCHANNEL_SIGN_OR_SEAL_CHK_LEN; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 1a42b02... nss_wrapper: fix segfault in print_group() in the testsuite from 11a87cd... More fixes for bug #7146 - Samba miss-parses authenticated RPC packets. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 1a42b020fd8fdd96fa7433f3bb7589167040719a Author: Michael Adam ob...@samba.org Date: Fri Feb 19 00:33:45 2010 +0100 nss_wrapper: fix segfault in print_group() in the testsuite Running 'TESTS=posix_s3 POSIX_SUBTESTS=RPC-SAMR-LARGE-DC LOCAL-NSS-WRAPPER make test' from s3 made smbtorture4 crash on my box. Michael --- Summary of changes: lib/nss_wrapper/testsuite.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/nss_wrapper/testsuite.c b/lib/nss_wrapper/testsuite.c index d6b4839..da1a267 100644 --- a/lib/nss_wrapper/testsuite.c +++ b/lib/nss_wrapper/testsuite.c @@ -175,7 +175,7 @@ static void print_group(struct group *grp) grp-gr_passwd, (unsigned long)grp-gr_gid); - if (!grp-gr_mem[0]) { + if ((grp-gr_mem == NULL) || !grp-gr_mem[0]) { printf(\n); return; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 13533e1... s3-spoolss: add support for _spoolss_SetPrinter level 8. from 1a42b02... nss_wrapper: fix segfault in print_group() in the testsuite http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 13533e12fd33df5ac75839cf4cb145b247941205 Author: Günther Deschner g...@samba.org Date: Thu Feb 18 21:54:45 2010 +0100 s3-spoolss: add support for _spoolss_SetPrinter level 8. Guenther --- Summary of changes: source3/rpc_server/srv_spoolss_nt.c | 66 ++- 1 files changed, 65 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 9d9a148..c555a31 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -7,7 +7,7 @@ * Copyright (C) Jeremy Allison 2001-2002, * Copyright (C) Gerald Carter 2000-2004, * Copyright (C) Tim Potter 2001-2002. - * Copyright (C) Guenther Deschner 2009. + * Copyright (C) Guenther Deschner2009-2010. * * 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 @@ -5919,6 +5919,67 @@ static WERROR publish_or_unpublish_printer(pipes_struct *p, #endif } +/ + / + +static WERROR update_printer_devmode(pipes_struct *p, struct policy_handle *handle, +struct spoolss_DeviceMode *devmode) +{ + int snum; + NT_PRINTER_INFO_LEVEL *printer = NULL; + Printer_entry *Printer = find_printer_index_by_hnd(p, handle); + WERROR result; + + DEBUG(8,(update_printer_devmode\n)); + + result = WERR_OK; + + if (!Printer) { + result = WERR_BADFID; + goto done; + } + + if (!get_printer_snum(p, handle, snum, NULL)) { + result = WERR_BADFID; + goto done; + } + + if (!W_ERROR_IS_OK(get_a_printer(Printer, printer, 2, lp_const_servicename(snum { + result = WERR_BADFID; + goto done; + } + + if (devmode) { + /* we have a valid devmode + convert it and link it*/ + + DEBUGADD(8,(update_printer: Converting the devicemode struct\n)); + if (!convert_devicemode(printer-info_2-printername, devmode, + printer-info_2-devmode)) { + result = WERR_NOMEM; + goto done; + } + } + + /* Check calling user has permission to update printer description */ + + if (Printer-access_granted != PRINTER_ACCESS_ADMINISTER) { + DEBUG(3, (update_printer: printer property change denied by handle\n)); + result = WERR_ACCESS_DENIED; + goto done; + } + + + /* Update printer info */ + result = mod_a_printer(printer, 2); + +done: + free_a_printer(printer, 2); + + return result; +} + + / _spoolss_SetPrinter / @@ -5956,6 +6017,9 @@ WERROR _spoolss_SetPrinter(pipes_struct *p, case 7: return publish_or_unpublish_printer(p, r-in.handle, r-in.info_ctr-info.info7); + case 8: + return update_printer_devmode(p, r-in.handle, + r-in.devmode_ctr-devmode); default: return WERR_UNKNOWN_LEVEL; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 91a4db6... More fixes for bug #7146 - Samba miss-parses authenticated RPC packets. from 13533e1... s3-spoolss: add support for _spoolss_SetPrinter level 8. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 91a4db635802a391a560b739c996b5599a3df1a4 Author: Jeremy Allison j...@samba.org Date: Thu Feb 18 16:12:04 2010 -0800 More fixes for bug #7146 - Samba miss-parses authenticated RPC packets. Alignment space calculations are tricky :-). Jeremy. --- Summary of changes: source3/rpc_server/srv_pipe.c | 47 +++-- 1 files changed, 31 insertions(+), 16 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c index 1c10525..23f947f 100644 --- a/source3/rpc_server/srv_pipe.c +++ b/source3/rpc_server/srv_pipe.c @@ -1,7 +1,7 @@ /* * Unix SMB/CIFS implementation. * RPC Pipe client / server routines - * Almost completely rewritten by (C) Jeremy Allison 2005. + * Almost completely rewritten by (C) Jeremy Allison 2005 - 2010 * * 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 @@ -108,15 +108,9 @@ static bool create_next_pdu_ntlmssp(pipes_struct *p) return False; } - if (data_len_left % SERVER_NDR_PADDING_SIZE) { - ss_padding_len = SERVER_NDR_PADDING_SIZE - (data_len_left % SERVER_NDR_PADDING_SIZE); - DEBUG(10,(create_next_pdu_ntlmssp: adding sign/seal padding of %u\n, - ss_padding_len )); - } - + /* Space available - not including padding. */ data_space_available = RPC_MAX_PDU_FRAG_LEN - RPC_HEADER_LEN - - RPC_HDR_RESP_LEN - ss_padding_len - RPC_HDR_AUTH_LEN - - NTLMSSP_SIG_SIZE; + RPC_HDR_RESP_LEN - RPC_HDR_AUTH_LEN - NTLMSSP_SIG_SIZE; /* * The amount we send is the minimum of the available @@ -125,6 +119,19 @@ static bool create_next_pdu_ntlmssp(pipes_struct *p) data_len = MIN(data_len_left, data_space_available); + /* Work out any padding alignment requirements. */ + if ((RPC_HEADER_LEN + RPC_HDR_RESP_LEN + data_len) % SERVER_NDR_PADDING_SIZE) { + ss_padding_len = SERVER_NDR_PADDING_SIZE - + ((RPC_HEADER_LEN + RPC_HDR_RESP_LEN + data_len) % SERVER_NDR_PADDING_SIZE); + DEBUG(10,(create_next_pdu_ntlmssp: adding sign/seal padding of %u\n, + ss_padding_len )); + /* If we're over filling the packet, we need to make space +* for the padding at the end of the data. */ + if (data_len + ss_padding_len data_space_available) { + data_len -= SERVER_NDR_PADDING_SIZE; + } + } + /* * Set up the alloc hint. This should be the data left to * send. @@ -329,14 +336,9 @@ static bool create_next_pdu_schannel(pipes_struct *p) return False; } - if (data_len_left % SERVER_NDR_PADDING_SIZE) { - ss_padding_len = SERVER_NDR_PADDING_SIZE - (data_len_left % SERVER_NDR_PADDING_SIZE); - DEBUG(10,(create_next_pdu_schannel: adding sign/seal padding of %u\n, - ss_padding_len )); - } - + /* Space available - not including padding. */ data_space_available = RPC_MAX_PDU_FRAG_LEN - RPC_HEADER_LEN - - RPC_HDR_RESP_LEN - ss_padding_len - RPC_HDR_AUTH_LEN + - RPC_HDR_RESP_LEN - RPC_HDR_AUTH_LEN - RPC_AUTH_SCHANNEL_SIGN_OR_SEAL_CHK_LEN; /* @@ -346,6 +348,19 @@ static bool create_next_pdu_schannel(pipes_struct *p) data_len = MIN(data_len_left, data_space_available); + /* Work out any padding alignment requirements. */ + if ((RPC_HEADER_LEN + RPC_HDR_RESP_LEN + data_len) % SERVER_NDR_PADDING_SIZE) { + ss_padding_len = SERVER_NDR_PADDING_SIZE - + ((RPC_HEADER_LEN + RPC_HDR_RESP_LEN + data_len) % SERVER_NDR_PADDING_SIZE); + DEBUG(10,(create_next_pdu_schannel: adding sign/seal padding of %u\n, + ss_padding_len )); + /* If we're over filling the packet, we need to make space +* for the padding at the end of the data. */ + if (data_len + ss_padding_len data_space_available) { + data_len -= SERVER_NDR_PADDING_SIZE; + } + } + /* * Set up the alloc hint. This should be the data left to * send. -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via af4a7c0... s4:winbind Make the 'no SID found' message even more detailed from 91a4db6... More fixes for bug #7146 - Samba miss-parses authenticated RPC packets. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit af4a7c0f4be4bb94d6299e93f22d26e2f8340e69 Author: Andrew Bartlett abart...@samba.org Date: Fri Feb 19 11:14:15 2010 +1100 s4:winbind Make the 'no SID found' message even more detailed Now we give the user a clue as to what may be wrong, and the file path that we could not find the domain SID in. Andrew Bartlett --- Summary of changes: source4/param/secrets.c | 10 +++--- source4/winbind/wb_server.c | 21 +++-- 2 files changed, 26 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/param/secrets.c b/source4/param/secrets.c index 18a0800..407e27f 100644 --- a/source4/param/secrets.c +++ b/source4/param/secrets.c @@ -165,12 +165,15 @@ struct dom_sid *secrets_get_domain_sid(TALLOC_CTX *mem_ctx, attrs, 0, SECRETS_PRIMARY_DOMAIN_FILTER, domain); if (ldb_ret != LDB_SUCCESS) { - *errstring = talloc_asprintf(mem_ctx, Failed to find record for %s in secrets.ldb: %s: %s, domain, ldb_strerror(ldb_ret), ldb_errstring(ldb)); + *errstring = talloc_asprintf(mem_ctx, Failed to find record for %s in %s: %s: %s, +domain, ldb_get_opaque(ldb, ldb_url), +ldb_strerror(ldb_ret), ldb_errstring(ldb)); return NULL; } v = ldb_msg_find_ldb_val(msg, objectSid); if (v == NULL) { - *errstring = talloc_asprintf(mem_ctx, Failed to find a SID on record for %s in secrets.ldb, domain); + *errstring = talloc_asprintf(mem_ctx, Failed to find a SID on record for %s in %s, +domain, ldb_get_opaque(ldb, ldb_url)); return NULL; } result = talloc(mem_ctx, struct dom_sid); @@ -182,7 +185,8 @@ struct dom_sid *secrets_get_domain_sid(TALLOC_CTX *mem_ctx, ndr_err = ndr_pull_struct_blob(v, result, NULL, result, (ndr_pull_flags_fn_t)ndr_pull_dom_sid); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - *errstring = talloc_asprintf(mem_ctx, Failed to parse SID on record for %s in secrets.ldb, domain); + *errstring = talloc_asprintf(mem_ctx, Failed to parse SID on record for %s in %s, +domain, ldb_get_opaque(ldb, ldb_url)); talloc_free(result); talloc_free(ldb); return NULL; diff --git a/source4/winbind/wb_server.c b/source4/winbind/wb_server.c index 03a443a..306c8e2 100644 --- a/source4/winbind/wb_server.c +++ b/source4/winbind/wb_server.c @@ -241,19 +241,36 @@ static void winbind_task_init(struct task_server *task) service-task-lp_ctx, lp_netbios_name(service-task-lp_ctx), errstring); if (!primary_sid) { - char *message = talloc_asprintf(task, Cannot start Winbind (standalone configuration): %s, errstring); + char *message = talloc_asprintf(task, + Cannot start Winbind (standalone configuration): %s: + Have you provisioned this server (%s) or changed it's name?, + errstring, lp_netbios_name(service-task-lp_ctx)); task_server_terminate(task, message, true); return; } break; case ROLE_DOMAIN_MEMBER: + primary_sid = secrets_get_domain_sid(service, +service-task-event_ctx, +service-task-lp_ctx, + lp_workgroup(service-task-lp_ctx), errstring); + if (!primary_sid) { + char *message = talloc_asprintf(task, Cannot start Winbind (domain member): %s: + Have you joined the %s domain?, + errstring, lp_workgroup(service-task-lp_ctx)); + task_server_terminate(task, message, true); + return; + } + break; case ROLE_DOMAIN_CONTROLLER: primary_sid =
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 809dd8c... s4:selftest Add test for the RPC proxy via a8b2088... s4:selftest Add infrastructure for testing against an RPC proxy via e4523e3... misc.idl: Add reference to the slightly odd representation of if_version via 10fed05... s4:rpc_server Record the remote connections association group ID from af4a7c0... s4:winbind Make the 'no SID found' message even more detailed http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 809dd8c4137e8dcb52613067fea49357b71355fa Author: Andrew Bartlett abart...@samba.org Date: Fri Feb 19 15:57:59 2010 +1100 s4:selftest Add test for the RPC proxy commit a8b2088a0eb6cd5b8f9a7fba276ca31418a7989a Author: Andrew Bartlett abart...@samba.org Date: Fri Feb 19 15:56:30 2010 +1100 s4:selftest Add infrastructure for testing against an RPC proxy This also changes the 'testenv' code to use a new environment 'all' (we may wish to make other complex tests depend on this in future), and exports more names in more namespaces. Andrew Bartlett commit e4523e3c8f68752da65bedd3c1559c78b3be67a2 Author: Andrew Bartlett abart...@samba.org Date: Fri Feb 19 15:55:28 2010 +1100 misc.idl: Add reference to the slightly odd representation of if_version I found this confusing, so explian for the next poor programmer who has to get up to speed with this quickly. Andrew Bartlett commit 10fed057cde7649b8fc8ee6611ea588a471c2483 Author: Andrew Bartlett abart...@samba.org Date: Fri Feb 19 15:53:31 2010 +1100 s4:rpc_server Record the remote connections association group ID By recording the association group the remote server assigned to our proxied RPC connection, we can ensure we use the same value when the client wishes to use it. This isn't stored in a private pointer, as mapiproxy will want to use this feature too. Andrew Bartlett --- Summary of changes: librpc/idl/misc.idl |3 + selftest/selftest.pl | 14 +++- selftest/target/Samba4.pm | 114 ++--- source4/rpc_server/dcerpc_server.h|3 + source4/rpc_server/remote/dcesrv_remote.c | 42 +-- source4/selftest/tests.sh |3 + 6 files changed, 162 insertions(+), 17 deletions(-) Changeset truncated at 500 lines: diff --git a/librpc/idl/misc.idl b/librpc/idl/misc.idl index adaac9a..a60d30b 100644 --- a/librpc/idl/misc.idl +++ b/librpc/idl/misc.idl @@ -21,6 +21,9 @@ interface misc typedef [public] struct { GUID uuid; + /* The major version is encoded in the 16 least significant bits, + the minor in the 16 most significant bits. + http://www.opengroup.org/onlinepubs/9629399/chap12.htm */ uint32 if_version; } ndr_syntax_id; diff --git a/selftest/selftest.pl b/selftest/selftest.pl index ba66049..ea09c26 100755 --- a/selftest/selftest.pl +++ b/selftest/selftest.pl @@ -457,7 +457,7 @@ my $target; my $testenv_default = none; if ($opt_target eq samba4) { - $testenv_default = member; + $testenv_default = all; require target::Samba4; $target = new Samba4($bindir, $ldap, $srcdir/setup, $exeext); } elsif ($opt_target eq samba3) { @@ -729,6 +729,18 @@ my @exported_envvars = ( DC_NETBIOSNAME, DC_NETBIOSALIAS, + # domain controller stuff + MEMBER_SERVER, + MEMBER_SERVER_IP, + MEMBER_NETBIOSNAME, + MEMBER_NETBIOSALIAS, + + # domain controller stuff + RPC_PROXY_SERVER, + RPC_PROXY_SERVER_IP, + RPC_PROXY_NETBIOSNAME, + RPC_PROXY_NETBIOSALIAS, + # server stuff SERVER, SERVER_IP, diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm index b3f1e58..c1d6bec 100644 --- a/selftest/target/Samba4.pm +++ b/selftest/target/Samba4.pm @@ -715,7 +715,7 @@ sub provision_raw_step2($$$) sub provision($$$) { - my ($self, $prefix, $server_role, $netbiosname, $netbiosalias, $swiface, $password, $kdc_ipv4) = @_; + my ($self, $prefix, $server_role, $netbiosname, $netbiosalias, $swiface, $password, $kdc_ipv4, $extra_smbconf_options) = @_; my $ctx = $self-provision_raw_prepare($prefix, $server_role, $netbiosname, $netbiosalias, @@ -730,6 +730,7 @@ sub provision($$$) max xmit = 32K server max protocol = SMB2 +$extra_smbconf_options [tmp] path = $ctx-{tmpdir} @@ -825,7 +826,8 @@ sub provision_member($$$) localmember, 3, localmemberpass, -
Build status as of Fri Feb 19 07:00:06 2010
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2010-02-18 00:01:00.0 -0700 +++ /home/build/master/cache/broken_results.txt 2010-02-19 00:00:24.0 -0700 @@ -1,9 +1,9 @@ -Build status as of Thu Feb 18 07:00:04 2010 +Build status as of Fri Feb 19 07:00:06 2010 Build counts: Tree Total Broken Panic build_farm 0 0 0 -ccache 35 20 0 +ccache 35 19 0 ldb 35 34 0 libreplace 35 12 0 lorikeet 0 0 0 @@ -13,9 +13,9 @@ samba-docs 0 0 0 samba-web0 0 0 samba_3_current 33 32 2 -samba_3_master 33 31 4 -samba_3_next 29 28 5 -samba_4_0_test 35 33 0 +samba_3_master 33 32 3 +samba_3_next 29 29 4 +samba_4_0_test 35 34 0 talloc 35 11 0 tdb 33 21 0
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 76aa37f... librpc/ndr: don't overwrite the content in ndr_push_relative_ptr2_end() from 809dd8c... s4:selftest Add test for the RPC proxy http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 76aa37f653fec2d511921768381db7da661750cb Author: Stefan Metzmacher me...@samba.org Date: Fri Feb 19 08:11:24 2010 +0100 librpc/ndr: don't overwrite the content in ndr_push_relative_ptr2_end() metze --- Summary of changes: librpc/ndr/ndr.c | 10 -- 1 files changed, 8 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/librpc/ndr/ndr.c b/librpc/ndr/ndr.c index b6110d5..4d763e0 100644 --- a/librpc/ndr/ndr.c +++ b/librpc/ndr/ndr.c @@ -1253,11 +1253,17 @@ _PUBLIC_ enum ndr_err_code ndr_push_relative_ptr2_end(struct ndr_push *ndr, cons } if (len 0) { + uint32_t clear_size = correct_offset - begin_offset; + + clear_size = MIN(clear_size, len); + /* now move the marshalled buffer to the end of the main buffer */ memmove(ndr-data + correct_offset, ndr-data + begin_offset, len); - /* and wipe out old buffer within the main buffer */ - memset(ndr-data + begin_offset, '\0', len); + if (clear_size) { + /* and wipe out old buffer within the main buffer */ + memset(ndr-data + begin_offset, '\0', clear_size); + } } /* and set the end offset for the next buffer */ -- Samba Shared Repository