Re: [Samba] solaris 10 winbind authentication with ADS
On Mon, Dec 27, 2010 at 08:10:16AM -0700, CJ Keist wrote: Thank you. ./wbinfo -n login_name works. But the wbinfo -i doesn't work, Could not get info for user COLOSTATE\login. So windbind is working partially? Could there be something on the Windows domain controller that isn't allowing the information to my samba server? That's unlikely. Try wbinfo -n login_name and use the resulting SID to try wbinfo --sid-to-uid sid If the latter step fails, your id mapping does not work. If that works and the wbinfo -n still does not work, we need winbind debug level 10 logs. With best regards, Volker Lendecke -- SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen phone: +49-551-37-0, fax: +49-551-37-9 AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] Newbie : bad uid in the smbpasswd file ?
Hello everybody, I don't understand why the uid isn't correct in the /etc/samba/smbpasswd file. My OS is Ubuntu 10.04. Some precise explanations below: #--- # smbd -V Version 3.4.7 # testparm -s /etc/samba/smb.conf Load smb config files from /etc/samba/smb.conf rlimit_max: rlimit_max (1024) below minimum Windows limit (16384) Processing section [PARTAGE] Loaded services file OK. Server role: ROLE_STANDALONE [global] workgroup = MON-DOMAINE netbios name = SAMBA-SRV server string = map to guest = Bad User passdb backend = smbpasswd guest account = francois lanman auth = Yes log level = 1 max log size = 10 wins support = Yes [PARTAGE] comment = Pour faire des tests path = /resteDisque1/dossier read only = No guest ok = Yes # service smbd restart smbd start/running, process 6638 # service nmbd restart nmbd start/running, process 6650 # cat /etc/samba/smbpasswd # no output, the file is empty # pdbedit -L # no result, no samba user # smbpasswd -a francois # I create the user francois New SMB password: Retype new SMB password: Added user francois. # cat /etc/samba/smbpasswd # In this file, the uid is 0, like root ?! francois:0:96E3B942381CBE5BAAD3B435B51404EE:BBB4013EC9D4E3D7A88CA89C2519DB11:[U ]:LCT-4D116896: # pdbedit -L # With this command, the uid is 1000 ?! francois:1000:francois # cat /etc/passwd | grep francois # 1000 is the *real* uid of francois francois:x:1000:1000:francois,,,:/home/francois:/bin/bash #--- The real uid of francois is 1000. Why is the uid equal to 0 in the smbpasswd file ? Thanks in advance for your help. -- Francois Lafont -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] Problem Roaming Profile
Hello. I have configured PDC (Primary domain controler) with samba 3.2.5 and LDAP. The workstation has installed Windows XP Service Pack 3. When i log in to the server its work perfectly, i create files and when i log out these files are created on the server correctly. But if i log in with the same account from other computer, it doesn't load the files that belongs to this account. When i log in i can see the message (Loading the personal configuration...) and finish without alerts. My smb.conf file: [global] dos charset = 850 Unix charset = ISO8859-1 workgroup = ASESORIA realm = skynetlink.com server string = %h server map to guest = Bad User username map = /etc/samba/smbusers passdb backend = ldapsam:ldap://127.0.0.1/ ldap admin dn = cn=admin,dc=skynetlink,dc=com ldap delete dn = Yes ldap group suffix = ou=group ldap idmap suffix = ou=idmap ldap machine suffix = ou=computer ldap suffix = dc=skynetlink,dc=com ldap ssl = no ldap user suffix = ou=people add user script = /usr/sbin/smbldap-useradd -m %u delete user script = /usr/sbin/smbldap-userdel %u add group script = /usr/sbin/smbldap-groupadd -p %g delete group script = /usr/sbin/smbldap-groupdel %g add user to group script = /usr/sbin/smbldap-groupmod -m %u %g delete user from group script = /usr/sbin/smbldap-groupmod -x %u %g set primary group script = /usr/sbin/smbldap-usermod -g %g %u add machine script = /usr/sbin/smbldap-useradd -w %u socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8182 interfaces = eth0 lo hosts allow = 127.0.0.1, 192.168.1.0/24 hosts deny = 0.0.0.0 smb ports = 139 445 bind interfaces only = Yes name resolve order = wins hosts lmhosts bcast remote announce = 192.168.1.255 pam password change = Yes passwd program = /usr/sbin/smbldap-passwd -u %u passwd chat = *New*password* %n\n *Retype*new*password* %n\n *all*authentication*tokens*updated* logon script = 'logon.bat %U' logon path = \\%N\profiles\%U logon drive = U: domain logons = Yes os level = 65 preferred master = Yes domain master = Yes dns proxy = No wins support = Yes panic action = /usr/share/samba/panic-action %d map acl inherit = Yes case sensitive = No hide unreadable = Yes unix password sync = Yes syslog = 0 log file = /var/log/samba/log.%m max log size = 1000 time server = Yes map hidden = Yes map system = Yes [homes] comment = Home Directories valid users = %S read only = No create mask = 0611 directory mask = 0711 browseable = No [printers] comment = All Printers path = /var/spool/samba create mask = 0611 directory mask = 0711 printable = Yes browseable = No [print$] comment = Printer Drivers path = /var/lib/samba/printers create mask = 0611 directory mask = 0711 [netlogon] path = /var/lib/samba/netlogon browseable = No create mask = 0611 directory mask = 0711 [profiles] path = /var/lib/samba/profiles force user = %U read only = No create mask = 0611 directory mask = 0711 guest ok = Yes profile acls = Yes browseable = No csc policy = disable writeable = Yes [public] path = /tmp read only = No guest ok = Yes create mask = 0611 directory mask = 0711 -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Need Help Getting Windows XP To Use Samba Properly
My apologies, it's Samba 3.4.2 that I'm running on Solaris. -Original Message- From: Hodges, Robert CTR USAF AFMC 520 SMXS/MXDEC Sent: Tuesday, December 28, 2010 11:39 AM To: 'samba@lists.samba.org' Subject: Need Help Getting Windows XP To Use Samba Properly Hi everyone, new to the list. My apologies if this issue has already been covered, but I am having the following problem with Samba: Using Windows XP as a client, I am trying to see a Solaris system as a server. Solaris is running Samba 2.4.2, and Windows 2000 sees it as a server without any problems. Windows XP, however, generates the error The network name is no longer available when trying to browse to shares on the Solaris box. Browsing is what produces the error - otherwise, I can map to and access resources directly with \\servername\share. Running the command browstat status on the WinXP box shows that the Windows machine is not able to pull the server list from the Solaris box. Again, Windows 2000, however, works fine and does not have this problem. Desperate for help to get this resolved. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] Need Help Getting Windows XP To Use Samba Properly
Hi everyone, new to the list. My apologies if this issue has already been covered, but I am having the following problem with Samba: Using Windows XP as a client, I am trying to see a Solaris system as a server. Solaris is running Samba 2.4.2, and Windows 2000 sees it as a server without any problems. Windows XP, however, generates the error The network name is no longer available when trying to browse to shares on the Solaris box. Browsing is what produces the error - otherwise, I can map to and access resources directly with \\servername\share. Running the command browstat status on the WinXP box shows that the Windows machine is not able to pull the server list from the Solaris box. Again, Windows 2000, however, works fine and does not have this problem. Desperate for help to get this resolved. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Need Help Getting Windows XP To Use Samba Properly
On Tue, Dec 28, 2010 at 1:39 PM, Hodges, Robert CTR USAF AFMC 520 SMXS/MXDEC robert.hodges@hill.af.mil wrote: Hi everyone, new to the list. My apologies if this issue has already been covered, but I am having the following problem with Samba: Using Windows XP as a client, I am trying to see a Solaris system as a server. Solaris is running Samba 2.4.2, and Windows 2000 sees it as a server without any problems. Windows XP, however, generates the error The network name is no longer available when trying to browse to shares on the Solaris box. Browsing is what produces the error - otherwise, I can map to and access resources directly with \\servername\share. Running the command browstat status on the WinXP box shows that the Windows machine is not able to pull the server list from the Solaris box. Again, Windows 2000, however, works fine and does not have this problem. Desperate for help to get this resolved. Did you enable WINS on the samba server and set that up on the XP box? Usually that fixes a lot of windows browsing problems. John -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Need Help Getting Windows XP To Use Samba Properly
John, First, thank you for the response. I'll take any help I can get. Yes, I do have WINS enabled on the Samba box. Do I set WinXP to use the Samba box as the WINS server? If so, then I have already tried this and it didn't work. Other details: I do not use a DNS server, I use the hosts file in XP. The Samba box and the WinXP box simply share a worgroup name. Trying to keep this as simplistic as possible. Also, the Computer Browser service is disabled in XP - this is to force WinXP to use the Samba server as the master browser, and is the method I used in Win2K which worked great. In XP, however, it produces the error Network name is no longer available. Enabling the service causes XP to elect itself as the master browser and ignore the Samba box (which I want to be master browser like it was with Win2K). This improves things SOMETIMES - the Network name error still pops up half the time, meaning network browsing of the Samba box from XP went from 100% broken to Cross your fingers. REALLY desperate to get this working. MAJOR thanks to anyone who can help me with this, especially since the internet is loaded with people who have posted for help on this problem and no solutions follow. -Original Message- From: John Drescher [mailto:dresche...@gmail.com] Sent: Tuesday, December 28, 2010 12:01 PM To: Hodges, Robert CTR USAF AFMC 520 SMXS/MXDEC Cc: samba@lists.samba.org Subject: Re: [Samba] Need Help Getting Windows XP To Use Samba Properly On Tue, Dec 28, 2010 at 1:39 PM, Hodges, Robert CTR USAF AFMC 520 SMXS/MXDEC robert.hodges@hill.af.mil wrote: Hi everyone, new to the list. My apologies if this issue has already been covered, but I am having the following problem with Samba: Using Windows XP as a client, I am trying to see a Solaris system as a server. Solaris is running Samba 2.4.2, and Windows 2000 sees it as a server without any problems. Windows XP, however, generates the error The network name is no longer available when trying to browse to shares on the Solaris box. Browsing is what produces the error - otherwise, I can map to and access resources directly with \\servername\share. Running the command browstat status on the WinXP box shows that the Windows machine is not able to pull the server list from the Solaris box. Again, Windows 2000, however, works fine and does not have this problem. Desperate for help to get this resolved. Did you enable WINS on the samba server and set that up on the XP box? Usually that fixes a lot of windows browsing problems. John -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Newbie : bad uid in the smbpasswd file ?
On 28/12/10 06:44 AM, Francois Lafont wrote: Hello everybody, I don't understand why the uid isn't correct in the /etc/samba/smbpasswd file. My OS is Ubuntu 10.04. Some precise explanations below: #--- # smbd -V Version 3.4.7 # testparm -s /etc/samba/smb.conf Load smb config files from /etc/samba/smb.conf rlimit_max: rlimit_max (1024) below minimum Windows limit (16384) Processing section [PARTAGE] Loaded services file OK. Server role: ROLE_STANDALONE [global] workgroup = MON-DOMAINE netbios name = SAMBA-SRV server string = map to guest = Bad User passdb backend = smbpasswd guest account = francois lanman auth = Yes log level = 1 max log size = 10 wins support = Yes [PARTAGE] comment = Pour faire des tests path = /resteDisque1/dossier read only = No guest ok = Yes # service smbd restart smbd start/running, process 6638 # service nmbd restart nmbd start/running, process 6650 # cat /etc/samba/smbpasswd # no output, the file is empty # pdbedit -L # no result, no samba user # smbpasswd -a francois # I create the user francois New SMB password: Retype new SMB password: Added user francois. # cat /etc/samba/smbpasswd # In this file, the uid is 0, like root ?! francois:0:96E3B942381CBE5BAAD3B435B51404EE:BBB4013EC9D4E3D7A88CA89C2519DB11:[U ]:LCT-4D116896: # pdbedit -L # With this command, the uid is 1000 ?! francois:1000:francois # cat /etc/passwd | grep francois # 1000 is the *real* uid of francois francois:x:1000:1000:francois,,,:/home/francois:/bin/bash #--- The real uid of francois is 1000. Why is the uid equal to 0 in the smbpasswd file ? Thanks in advance for your help. Bonjour Francois. One question is why are you using smbpasswd instead of tdb for the backend? I suggest that you remove (purge) your samba implementation and reinstall it with the defaults. Next use swat to configure things. You need to consider the role the server plays, I highly recommend that you make it a domain controller unless you already have one. If you have a domain controller then join the server to the domain. If you don't have a domain controller, then use your samba server as domain controller. Once you have your server's role established, add and enable the accounts using swat. If this is a workstation that you are simply trying to share a folder from, then consider whether that is really a good idea. Sharing files exposes your machine unnecessarily. It is far better to set up a server with a shared folder. You can get all kinds of network storage devices quite cheaply that will do the job. Or you can use an old computer and set it up as domain controller/file server. You can even share printers, scanners, etc. from it. However, if you must use a workstation to share files, then use swat to configure it as a standalone or domain member server with whatever access rights you want. However, I strongly advise against using your account to provide guest access. Set up a real guest account that has no login rights (e.g. set the login shell to /bin/false). -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Need Help Getting Windows XP To Use Samba Properly
On Tue, Dec 28, 2010 at 2:23 PM, Hodges, Robert CTR USAF AFMC 520 SMXS/MXDEC robert.hodges@hill.af.mil wrote: Other details: I do not use a DNS server, I use the hosts file in XP. Yes, but NetBIOS desires the lmhosts file. See my ancient (but still valid) scribblings here: http://realcomputerguy.com/networksetup.htm#hosts Chris -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Need Help Getting Windows XP To Use Samba Properly
Excellent information, thank you. Unfortunately, none of it solved my problem. I see a lot of The specified network name is no longer available error messages all over the internet from Linux users, and none of the very few solutions I have come across have worked for me. Anybody else able to chime in and take a guess as why my XP box is having a problem talking to my Solaris/Samba box? Again, Win2K has no problems talking to the Samba box - it's just XP. Refresh: This error happens when you try to browse using My Network Places in the desktop. Mapping works fine, access works fine. Browsing is what fails in XP. I need this to work or I'm looking at a huge and expensive documentation change effort that few would understand. Still desperate for help on this. This problem happens with WinXP right out of the box, we have nothing weird installed. Help! -Original Message- From: Chris Smith [mailto:smb...@chrissmith.org] Sent: Tuesday, December 28, 2010 12:45 PM To: Hodges, Robert CTR USAF AFMC 520 SMXS/MXDEC Cc: John Drescher; samba@lists.samba.org Subject: Re: [Samba] Need Help Getting Windows XP To Use Samba Properly On Tue, Dec 28, 2010 at 2:23 PM, Hodges, Robert CTR USAF AFMC 520 SMXS/MXDEC robert.hodges@hill.af.mil wrote: Other details: I do not use a DNS server, I use the hosts file in XP. Yes, but NetBIOS desires the lmhosts file. See my ancient (but still valid) scribblings here: http://realcomputerguy.com/networksetup.htm#hosts Chris -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Need Help Getting Windows XP To Use Samba Properly
Excellent information, thank you. Unfortunately, none of it solved my problem. Start sniffing the machine as you do a Network Neighborhood search. You might also check and see just where and how lookups are being done for NETBios from an XP box command terminal nbtstat -r which will tell you how lookups are being done. Might lead you to a culprit. I see a lot of The specified network name is no longer available error messages all over the internet from Linux users, and none of the very few solutions I have come across have worked for me. Anybody else able to chime in and take a guess as why my XP box is having a problem talking to my Solaris/Samba box? Again, Win2K has no problems talking to the Samba box - it's just XP. Refresh: This error happens when you try to browse using My Network Places in the desktop. Mapping works fine, access works fine. Browsing is what fails in XP. I need this to work or I'm looking at a huge and expensive documentation change effort that few would understand. Still desperate for help on this. This problem happens with WinXP right out of the box, we have nothing weird installed. Help! -Original Message- From: Chris Smith [mailto:smb...@chrissmith.org] Sent: Tuesday, December 28, 2010 12:45 PM To: Hodges, Robert CTR USAF AFMC 520 SMXS/MXDEC Cc: John Drescher; samba@lists.samba.org Subject: Re: [Samba] Need Help Getting Windows XP To Use Samba Properly On Tue, Dec 28, 2010 at 2:23 PM, Hodges, Robert CTR USAF AFMC 520 SMXS/MXDEC robert.hodges@hill.af.mil wrote: Other details: I do not use a DNS server, I use the hosts file in XP. Yes, but NetBIOS desires the lmhosts file. See my ancient (but still valid) scribblings here: http://realcomputerguy.com/networksetup.htm#hosts Chris -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Need Help Getting Windows XP To Use Samba Properly
2010/12/29 Hodges, Robert CTR USAF AFMC 520 SMXS/MXDEC robert.hodges@hill.af.mil: Refresh: This error happens when you try to browse using My Network Places in the desktop. Mapping works fine, access works fine. Browsing is what fails in XP. I need this to work or I'm looking at a huge and expensive documentation change effort that few would understand. Windows XP should work well as a browsing client. Most of problems around browsing are recently cause by firewall or anti-virus functions. Do you disable your firewall or anti-virus which blocks incoming UDP traffic (137/udp and 138/udp)? Or using sniffer as tms3 said below. 2010/12/29 t...@tms3.com: Start sniffing the machine as you do a Network Neighborhood search. You might also check and see just where and how lookups are being done for NETBios from an XP box command terminal nbtstat -r which will tell you how lookups are being done. Might lead you to a culprit. --- TAKAHASHI Motonobu mo...@samba.gr.jp -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Newbie : bad uid in the smbpasswd file ?
Le 28/12/2010 20:29, Gary Dale a écrit : Bonjour Francois. One question is why are you using smbpasswd instead of tdb for the backend? As I said in the title of my post, I'm a newbie and I'm just learning Samba and at the moment I'm just trying a few basic shares. I have seen that tdb backend is better than smbpasswd backend but to begin I thought It was clearer for me to use plain text file for the storage of the users'accounts. And I met this problem of uid that annoys me and I would like to understand. I suggest that you remove (purge) your samba implementation and reinstall it with the defaults. I have tried this: # apt-get update # apt-get purge samba # apt-get install samba But, with the smb.conf file that I have posted in my first message, I have exactly the same problem: #-- # smbpasswd -a francois -D 10 | grep -i 'uid' New SMB password: Retype new SMB password: getsmbfilepwent: returning passwd entry for user francois, uid 0 getsmbfilepwent: returning passwd entry for user francois, uid 0 # cat smbpasswd francois:0: [snip] # cat /etc/passwd | grep francois francois:x:1000:1000:francois,,,:/home/francois:/bin/bash #-- I'd really like to understand the problem. Next use swat to configure things. Is it not better to edit smb.conf with a simple editor? You need to consider the role the server plays, I highly recommend that you make it a domain controller unless you already have one. If you have a domain controller then join the server to the domain. If you don't have a domain controller, then use your samba server as domain controller. Once you have your server's role established, add and enable the accounts using swat. If this is a workstation that you are simply trying to share a folder from, then consider whether that is really a good idea. Sharing files exposes your machine unnecessarily. It is far better to set up a server with a shared folder. You can get all kinds of network storage devices quite cheaply that will do the job. Or you can use an old computer and set it up as domain controller/file server. You can even share printers, scanners, etc. from it. However, if you must use a workstation to share files, then use swat to configure it as a standalone or domain member server with whatever access rights you want. However, I strongly advise against using your account to provide guest access. Set up a real guest account that has no login rights (e.g. set the login shell to /bin/false). Thanks for the pieces of advice. At the moment, I'm just learning with my computer (Ubuntu 10.04) and client XP (Virtual machine with VirtualBox). Francois Lafont -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] Missing Samba documentation pages: migration
Hello, There is a small document, which (I hope) useful to others samba user to avoid mistakes, wrong path, that i take, to reach my goal. This document is covered by license: xkcd501[12]. 1. Target 2. Situation 2.1. Software versions 2.2. Software setup 3. Data migration 3.1. alternatives 3.1.1. robocopy 3.1.2. xcopy 3.1.3. net 3.1.4. smbfs/cifs 4. Migration 4.1. Start samba 4.2. ACL vs ACL 4.3. mount.cifs 4.4. copy using xcopy 4.5. copy using robocopy 4.6. documentation ... 4.7. net rpc share 4.8. NT_STATUS_MEDIA_WRITE_PROTECTED 4.9. share_info.tdb 4.10. ACL test using WINXP on DST 4.11. documentation ... 4.12. Searching for root 4.13. Samba works 4.14. Samba compiling 4.15. Limitations of net rpc share migrate 5. Migrations isn't migration 5.1. How to do better? References 1. Target = Goal is to migrate shares from old Pentium III with Windows 2003 (name it SRC) to Samba on Debian stable (name it DST). 2. Situation Both servers are inside a domain. Primary (and the only one) DC runs on Windows 2008 R2. Clients are mostly Windows Vista, Windows 7, some Linux with Samba, some Windows XP machines. SRC is used on during work hours, huge downtime isn't acceptable. Stores about 2TB data on local SATA/IDE disks on NTFS file systems. SRC has about 10 shares. And a lot of files (some times a lot of small files)... Network card is 100Mbps, but copy test shows that on large files SRC capable to make 50Mbps with near 100% CPU-kernel time. On small files speed drops, drops near 10-20 times. Having full time copy this can lead to 20 days [1] copy operation. 2.1. Software versions -- DST is run on Debian Stable 5.0 (lenny) with samba 2:3.2.5-4lenny13 with kernel 2.6.26-2-amd64 on Intel Core i7, data stored in raiserfs3 with ACL. SRC with Windows 2003 running on Pentium 3. Data stored on several NTFS partitions. 2.2. Software setup --- DST are joined into Domain. Domain name is MSHOME. This document doesn't covers, domain join part, this is described inside The Official Samba 3.5.x HOWTO and Reference Guide[5]. There I will show that DST is correctly (I hope) configured, and how to check that. Is the winbindd deamon running? DST# pidof winbindd 12111 12108 12072 12067 12064 Is winbind enabled in nsswitch.conf? DST# cat /etc/nsswitch.conf | grep winbind passwd: compat winbind group: compat winbind Is winbind working? DST# getent passwd | grep administrator administrator:*:10004:10013:Administrator:/home/MSHOME/administrator:/bin/false DST# wbinfo -u | grep -i administrator administrator DST# wbinfo -U 10004 S-1-5-21-3103004317-3667232127-1157729718-500 DST# wbinfo -s S-1-5-21-3103004317-3667232127-1157729718-500 MSHOME+Administrator 1 What /etc/samba/smb.conf is? DST# testparm -s 2/dev/null| grep '\(workgroup\|realm\|security\|password server\|idmap\|winbind\)' workgroup = MSHOME realm = MSHOME.LOCAL security = ADS password server = 10.0.0.250 idmap uid = 1-2 idmap gid = 1-2 winbind separator = + winbind enum users = Yes winbind enum groups = Yes winbind use default domain = Yes How share is made? DST# cat /etc/samba/smb.conf | tail -n 4 [testshare] path = /srv/testshare browseable = yes writable = yes What permissions has test share? DST# ls -ld /srv/testshare/ drwxrwxrwt+ 2 root root 112 2010-12-28 07:18 /srv/testshare/ DST# getfacl /srv/testshare/ # file: srv/testshare/ # owner: root # group: root user::rwx group::rwx other::rwx Is this directory writable? DST# id uid=0(root) gid=0(root) groups=0(root) DST# touch /srv/testshare/0.txt; echo $? 0 Is this directory writable by domain Administrator? DST# su -s /bin/sh administrator -c 'id;touch /srv/install/testshare/10004.txt;echo $?' uid=10004(administrator) gid=10013(rtchsdomainservices) groups=10002(BUILTIN+administrators),10006(domain admins),10008(schema admins),10009(enterprise admins),10010(denied rodc password replication group),10013(rtchsdomainservices),10014(group policy creator owners),10018(rtc server local group) 0 3. Data migration = To reach our goal, we need to move data from one server/storage to another one, file by file, share by share. And by doing that we need to make sure that: - data is in sync - ACL are copied - minimal downtime. Every service migration (how good it will be) needs data copy part. Lets make a little discus about it. 3.1. alternatives - After some unsuccessful try, and some searches I found some hints how to do this in samba way. [2] [3] 3.1.1. robocopy ^^^ Robocopy tool from Microsoft. Tool witch was made by some one inside of corporation, and seems by mistake was discovered by sales people... After that was some made the ugly part (added Robocopy GUI). Distribution scheme of this tools is also confused. This can be found inside resource kit (these days it's possible free
[Samba] local users in a domain...
so I have some local users that I'd like to show up in my samba domain a bit more properly, but it's infeasable to add their accounts to the ldap directory proper. I've tried to create an idmap entry (probably wrong) and a structural SID with a sam account pointing to the numeric UID and a proper name for the unix account, but it still shows up as UNIX-USER/accountname. what am I in need of doing to make this show up as a user in the domain short of adding an actual user for it? -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Need Help Getting Windows XP To Use Samba Properly
On Tue, Dec 28, 2010 at 5:25 PM, Hodges, Robert CTR USAF AFMC 520 SMXS/MXDEC robert.hodges@hill.af.mil wrote: Excellent information, thank you. Unfortunately, none of it solved my problem. Do you have a valid NETBIOS domain or workstation name? I mean less than 16 characters and absolutely no . in the name. John -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Need Help Getting Windows XP To Use Samba Properly
On Tue, Dec 28, 2010 at 10:12 PM, John Drescher dresche...@gmail.com wrote: On Tue, Dec 28, 2010 at 5:25 PM, Hodges, Robert CTR USAF AFMC 520 SMXS/MXDEC robert.hodges@hill.af.mil wrote: Excellent information, thank you. Unfortunately, none of it solved my problem. Do you have a valid NETBIOS domain or workstation name? I mean less than 16 characters and absolutely no . in the name. Also make sure that nmbd is running on the linux box. John -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] local users in a domain...
Hello, Use smbldap-tools. It also contains the script to migrate system users to ldap. --- wbr, Denis. On Wed, Dec 29, 2010 at 7:38 AM, Christ Schlacta li...@aarcane.org wrote: so I have some local users that I'd like to show up in my samba domain a bit more properly, but it's infeasable to add their accounts to the ldap directory proper. I've tried to create an idmap entry (probably wrong) and a structural SID with a sam account pointing to the numeric UID and a proper name for the unix account, but it still shows up as UNIX-USER/accountname. what am I in need of doing to make this show up as a user in the domain short of adding an actual user for it? -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] local users in a domain...
I think, if you have samba to talk with ldap there is as far as I know no feature to make samba talk to your local users too. A long time ago I remember there was a hack with samba 2 but this is history. --- EDV Daniel Müller Leitung EDV Tropenklinik Paul-Lechler-Krankenhaus Paul-Lechler-Str. 24 72076 Tübingen Tel.: 07071/206-463, Fax: 07071/206-499 eMail: muel...@tropenklinik.de Internet: www.tropenklinik.de --- -Ursprüngliche Nachricht- Von: samba-boun...@lists.samba.org [mailto:samba-boun...@lists.samba.org] Im Auftrag von Christ Schlacta Gesendet: Mittwoch, 29. Dezember 2010 02:39 An: samba@lists.samba.org Betreff: [Samba] local users in a domain... so I have some local users that I'd like to show up in my samba domain a bit more properly, but it's infeasable to add their accounts to the ldap directory proper. I've tried to create an idmap entry (probably wrong) and a structural SID with a sam account pointing to the numeric UID and a proper name for the unix account, but it still shows up as UNIX-USER/accountname. what am I in need of doing to make this show up as a user in the domain short of adding an actual user for it? -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via c604388 s3:winbindd: remove useless ';' from 7ea7ba6 WHATSNEW: fix indentation http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit c604388ec3daa69184f9c45d48599353ddb54240 Author: Stefan Metzmacher me...@samba.org Date: Tue Dec 28 11:57:04 2010 +0100 s3:winbindd: remove useless ';' metze Autobuild-User: Stefan Metzmacher me...@samba.org Autobuild-Date: Tue Dec 28 12:45:20 CET 2010 on sn-devel-104 --- Summary of changes: source3/winbindd/winbindd_cm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index 3f21db5..f3eba90 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -2026,7 +2026,7 @@ static NTSTATUS cm_get_schannel_creds(struct winbindd_domain *domain, struct rpc_pipe_client *netlogon_pipe; if (lp_client_schannel() == False) { - return NT_STATUS_CANT_ACCESS_DOMAIN_INFO;; + return NT_STATUS_CANT_ACCESS_DOMAIN_INFO; } result = cm_connect_netlogon(domain, netlogon_pipe); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 5717114 s3: Make node_status_query return NTSTATUS via e1ab3c3 s3: Remove an ancient typedef via b0ff97d s3: Fix some typos via c4b18bd async_send-sendto, async_recv-recvfrom from c604388 s3:winbindd: remove useless ';' http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 571711431885e8e556822c14b3d117025860bf81 Author: Volker Lendecke v...@samba.org Date: Tue Dec 28 12:53:12 2010 +0100 s3: Make node_status_query return NTSTATUS Also make the result talloc'ed Autobuild-User: Volker Lendecke vlen...@samba.org Autobuild-Date: Tue Dec 28 13:46:59 CET 2010 on sn-devel-104 commit e1ab3c3470a7f1159d52ed0c1eacf4a5a7b6bc2b Author: Volker Lendecke v...@samba.org Date: Tue Dec 28 11:55:47 2010 +0100 s3: Remove an ancient typedef commit b0ff97d8d37957fc34861214b6cbab513072bef1 Author: Volker Lendecke v...@samba.org Date: Tue Dec 28 11:48:43 2010 +0100 s3: Fix some typos commit c4b18bd860bc18529249a8c54c7db6aba2347591 Author: Volker Lendecke v...@samba.org Date: Sun Dec 26 16:03:58 2010 +0100 async_send-sendto, async_recv-recvfrom --- Summary of changes: lib/async_req/async_sock.c | 74 + lib/async_req/async_sock.h | 21 ++- nsswitch/wins.c |6 ++-- source3/include/proto.h | 12 --- source3/include/smb.h|4 +- source3/libsmb/namequery.c | 60 ++ source3/utils/nmblookup.c| 16 + source3/winbindd/winbindd_wins.c | 26 - 8 files changed, 126 insertions(+), 93 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/async_req/async_sock.c b/lib/async_req/async_sock.c index 18adb42..9b2a625 100644 --- a/lib/async_req/async_sock.c +++ b/lib/async_req/async_sock.c @@ -36,28 +36,30 @@ #define TALLOC_FREE(ctx) do { talloc_free(ctx); ctx=NULL; } while(0) #endif -struct async_send_state { +struct sendto_state { int fd; const void *buf; size_t len; int flags; + const struct sockaddr *addr; + socklen_t addr_len; ssize_t sent; }; -static void async_send_handler(struct tevent_context *ev, +static void sendto_handler(struct tevent_context *ev, struct tevent_fd *fde, uint16_t flags, void *private_data); -struct tevent_req *async_send_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, - int fd, const void *buf, size_t len, - int flags) +struct tevent_req *sendto_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + int fd, const void *buf, size_t len, int flags, + const struct sockaddr *addr, + socklen_t addr_len) { struct tevent_req *result; - struct async_send_state *state; + struct sendto_state *state; struct tevent_fd *fde; - result = tevent_req_create(mem_ctx, state, struct async_send_state); + result = tevent_req_create(mem_ctx, state, struct sendto_state); if (result == NULL) { return result; } @@ -65,8 +67,10 @@ struct tevent_req *async_send_send(TALLOC_CTX *mem_ctx, state-buf = buf; state-len = len; state-flags = flags; + state-addr = addr; + state-addr_len = addr_len; - fde = tevent_add_fd(ev, state, fd, TEVENT_FD_WRITE, async_send_handler, + fde = tevent_add_fd(ev, state, fd, TEVENT_FD_WRITE, sendto_handler, result); if (fde == NULL) { TALLOC_FREE(result); @@ -75,16 +79,17 @@ struct tevent_req *async_send_send(TALLOC_CTX *mem_ctx, return result; } -static void async_send_handler(struct tevent_context *ev, +static void sendto_handler(struct tevent_context *ev, struct tevent_fd *fde, uint16_t flags, void *private_data) { struct tevent_req *req = talloc_get_type_abort( private_data, struct tevent_req); - struct async_send_state *state = - tevent_req_data(req, struct async_send_state); + struct sendto_state *state = + tevent_req_data(req, struct sendto_state); - state-sent = send(state-fd, state-buf, state-len, state-flags); + state-sent = sendto(state-fd, state-buf, state-len, state-flags, +state-addr, state-addr_len); if ((state-sent == -1) (errno == EINTR)) { /* retry */ return; @@ -96,10 +101,10 @@ static void async_send_handler(struct tevent_context *ev,
[SCM] Samba Shared Repository - branch v3-6-test updated
The branch, v3-6-test has been updated via 02f21dc s3:winbindd: remove useless ';' from 896d58b WHATSNEW: fix indentation http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test - Log - commit 02f21dc060fcec9cd9dd68edc645902f54f9 Author: Stefan Metzmacher me...@samba.org Date: Tue Dec 28 11:57:04 2010 +0100 s3:winbindd: remove useless ';' metze Autobuild-User: Stefan Metzmacher me...@samba.org Autobuild-Date: Tue Dec 28 12:45:20 CET 2010 on sn-devel-104 (cherry picked from commit c604388ec3daa69184f9c45d48599353ddb54240) --- Summary of changes: source3/winbindd/winbindd_cm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index 3f21db5..f3eba90 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -2026,7 +2026,7 @@ static NTSTATUS cm_get_schannel_creds(struct winbindd_domain *domain, struct rpc_pipe_client *netlogon_pipe; if (lp_client_schannel() == False) { - return NT_STATUS_CANT_ACCESS_DOMAIN_INFO;; + return NT_STATUS_CANT_ACCESS_DOMAIN_INFO; } result = cm_connect_netlogon(domain, netlogon_pipe); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 4622812 s3: Make name_query return NTSTATUS via 28d997a s3: AllowDebugChange is gone via 5f79588 Fix a memleak in nss_wins via 181cd32 Fix a crash in libnss_wins from 5717114 s3: Make node_status_query return NTSTATUS http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 4622812a41eb5ce07dd8f74534217e858743883f Author: Volker Lendecke v...@samba.org Date: Tue Dec 28 13:47:35 2010 +0100 s3: Make name_query return NTSTATUS Also use talloc for the result Autobuild-User: Volker Lendecke vlen...@samba.org Autobuild-Date: Tue Dec 28 18:21:05 CET 2010 on sn-devel-104 commit 28d997a89056f144de6a7b95af0e54a044c5e5b3 Author: Volker Lendecke v...@samba.org Date: Tue Dec 28 17:17:04 2010 +0100 s3: AllowDebugChange is gone commit 5f79588de07754ef112abac33535a34624b3b078 Author: Volker Lendecke v...@samba.org Date: Tue Dec 28 17:08:57 2010 +0100 Fix a memleak in nss_wins commit 181cd3281c4f2c53dc507f59d281a2517579cfe1 Author: Volker Lendecke v...@samba.org Date: Tue Dec 28 17:05:18 2010 +0100 Fix a crash in libnss_wins lp_set_parm accesses the case tables --- Summary of changes: nsswitch/wins.c | 10 +--- source3/client/client.c |1 - source3/include/proto.h |4 ++- source3/libsmb/namequery.c | 46 + source3/utils/nmblookup.c| 23 ++ source3/web/diagnose.c | 10 +--- source3/winbindd/winbindd_wins.c | 25 +--- 7 files changed, 70 insertions(+), 49 deletions(-) Changeset truncated at 500 lines: diff --git a/nsswitch/wins.c b/nsswitch/wins.c index 731efcb..ac062fe 100644 --- a/nsswitch/wins.c +++ b/nsswitch/wins.c @@ -40,8 +40,6 @@ static pthread_mutex_t wins_nss_mutex = PTHREAD_MUTEX_INITIALIZER; static int initialised; -extern bool AllowDebugChange; - NSS_STATUS _nss_wins_gethostbyname_r(const char *hostname, struct hostent *he, char *buffer, size_t buflen, int *h_errnop); NSS_STATUS _nss_wins_gethostbyname2_r(const char *name, int af, struct hostent *he, @@ -94,11 +92,11 @@ static int wins_lookup_open_socket_in(void) static void nss_wins_init(void) { initialised = 1; + load_case_tables(); lp_set_cmdline(log level, 0); TimeInit(); setup_logging(nss_wins,False); - load_case_tables(); lp_load(get_dyn_CONFIGFILE(),True,False,False,True); load_interfaces(); } @@ -142,16 +140,20 @@ static struct in_addr *lookup_byname_backend(const char *name, int *count) const struct in_addr *bcast = iface_n_bcast_v4(j); struct sockaddr_storage ss; struct sockaddr_storage *pss; + NTSTATUS status; + if (!bcast) { continue; } in_addr_to_sockaddr_storage(ss, *bcast); - pss = name_query(fd,name,0x00,True,True,ss,count, flags, NULL); + status = name_query(fd, name, 0x00, True, True, ss, + NULL, pss, count, flags, NULL); if (pss) { if ((ret = SMB_MALLOC_P(struct in_addr)) == NULL) { return NULL; } *ret = ((struct sockaddr_in *)pss)-sin_addr; + TALLOC_FREE(pss); break; } } diff --git a/source3/client/client.c b/source3/client/client.c index b3bbcf5..8486bb2 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -36,7 +36,6 @@ extern int do_smb_browse(void); /* mDNS browsing */ -extern bool AllowDebugChange; extern bool override_logfile; extern char tar_type; diff --git a/source3/include/proto.h b/source3/include/proto.h index 8278ffb..9b391ae 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -2712,12 +2712,14 @@ bool name_status_find(const char *q_name, const struct sockaddr_storage *to_ss, fstring name); int ip_service_compare(struct ip_service *ss1, struct ip_service *ss2); -struct sockaddr_storage *name_query(int fd, +NTSTATUS name_query(int fd, const char *name, int name_type, bool bcast, bool recurse, const struct sockaddr_storage *to_ss, + TALLOC_CTX *mem_ctx, + struct sockaddr_storage **addrs, int *count, int *flags, bool *timed_out); diff --git a/source3/libsmb/namequery.c
autobuild: intermittent test failure detected
The autobuild test system has detected an intermittent failing test in the current master tree. The autobuild log of the failure is available here: http://git.samba.org/autobuild.flakey/2010-12-28-1823/flakey.log The source3 build logs are available here: http://git.samba.org/autobuild.flakey/2010-12-28-1823/source3.stderr http://git.samba.org/autobuild.flakey/2010-12-28-1823/source3.stdout The source4 build logs are available here: http://git.samba.org/autobuild.flakey/2010-12-28-1823/source4.stderr http://git.samba.org/autobuild.flakey/2010-12-28-1823/source4.stdout The top commit at the time of the failure was: commit 571711431885e8e556822c14b3d117025860bf81 Author: Volker Lendecke v...@samba.org Date: Tue Dec 28 12:53:12 2010 +0100 s3: Make node_status_query return NTSTATUS Also make the result talloc'ed Autobuild-User: Volker Lendecke vlen...@samba.org Autobuild-Date: Tue Dec 28 13:46:59 CET 2010 on sn-devel-104
[SCM] Samba Shared Repository - branch v3-6-test updated
The branch, v3-6-test has been updated via cef866a Fix a memleak in nss_wins from 02f21dc s3:winbindd: remove useless ';' http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test - Log - commit cef866ad8021f85a9c89d1749d47fb2178930244 Author: Volker Lendecke v...@samba.org Date: Tue Dec 28 17:08:57 2010 +0100 Fix a memleak in nss_wins --- Summary of changes: nsswitch/wins.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/nsswitch/wins.c b/nsswitch/wins.c index aa02f32..913e833 100644 --- a/nsswitch/wins.c +++ b/nsswitch/wins.c @@ -152,6 +152,7 @@ static struct in_addr *lookup_byname_backend(const char *name, int *count) return NULL; } *ret = ((struct sockaddr_in *)pss)-sin_addr; + SAFE_FREE(pss); break; } } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-6-test updated
The branch, v3-6-test has been updated via 9eb0084 s3:selftest: mark samba3.posix_s3.smb2.lock (dc).rw-exclusive as known to fail via c86299b tevent: More doc fixes via 86772b9 tevent: Some documentation fixes via d288159 tevent: Fix a typo from cef866a Fix a memleak in nss_wins http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test - Log - commit 9eb0084726c18a43e581388032dd59c31525adb3 Author: Stefan Metzmacher me...@samba.org Date: Mon Dec 27 11:18:44 2010 +0100 s3:selftest: mark samba3.posix_s3.smb2.lock (dc).rw-exclusive as known to fail This sometimes fails like this: [218/271 in 22m22s] samba3.posix_s3.smb2.lock (dc) UNEXPECTED(failure): samba3.posix_s3.smb2.lock (dc).rw-exclusive REASON: _StringException: _StringException: ../torture/smb2/lock.c:406: status was NT_STATUS_END_OF_FILE, expected NT_STATUS_OK: (../torture/smb2/lock.c:406) command: LD_LIBRARY_PATH=/memdisk/tridge/flakey/b18675/source3/source3/bin/shared:/memdisk/tridge/flakey/b18675/source3/source3/bin: bin/smbtorture4 --configfile=$SMB_CONF_PATH --maximum-runtime=1200 --target=samba3 --basedir=/memdisk/tridge/flakey/b18675/source3/source3/st --option=torture:winbindd_netbios_name=$SERVER --option=torture:winbindd_netbios_domain=$DOMAIN --option=torture:localdir=/memdisk/tridge/flakey/b18675/source3/source3/st/dc/share --option=torture:sharedelay=10 //$SERVER_IP/tmp -U$USERNAME%$PASSWORD smb2.lock 21 | ../selftest/filter-subunit --prefix samba3.posix_s3.smb2.lock (dc). expanded command: LD_LIBRARY_PATH=/memdisk/tridge/flakey/b18675/source3/source3/bin/shared:/memdisk/tridge/flakey/b18675/source3/source3/bin: bin/smbtorture4 --configfile=/memdisk/tridge/flakey/b18675/source3/source3/st/client/client.conf --maximum-runtime=1200 --target=samba3 --basedir=/memdisk/tridge/flakey/b18675/source3/source3/st --option=torture:winbindd_netbios_name=LOCALDC2 --option=torture:winbindd_netbios_domain=SAMBA-TEST --option=torture:localdir=/memdisk/tridge/flakey/b18675/source3/source3/st/dc/share --option=torture:sharedelay=10 //127.0.0.2/tmp -Utridge%localdc2pass smb2.lock 21 | ../selftest/filter-subunit --prefix samba3.posix_s3.smb2.lock (dc). ERROR: Testsuite[samba3.posix_s3.smb2.lock (dc)] REASON: Exit code was 1 metze Autobuild-User: Stefan Metzmacher me...@samba.org Autobuild-Date: Mon Dec 27 12:08:51 CET 2010 on sn-devel-104 (cherry picked from commit e1de884eaa28d8ac67d4060e76e146e0216447ff) commit c86299b76a05746f12d2c5b576ec01d27c759ce6 Author: Volker Lendecke v...@samba.org Date: Sat Dec 25 23:45:30 2010 +0100 tevent: More doc fixes Autobuild-User: Volker Lendecke vlen...@samba.org Autobuild-Date: Sun Dec 26 10:20:51 CET 2010 on sn-devel-104 (cherry picked from commit d2de01f95bc55529281e2860222330d5021d3d69) commit 86772b9a7a0a6c30203c84b2a9cd28fa8217e417 Author: Volker Lendecke v...@samba.org Date: Sat Dec 25 23:09:19 2010 +0100 tevent: Some documentation fixes Autobuild-User: Volker Lendecke vlen...@samba.org Autobuild-Date: Sat Dec 25 23:58:20 CET 2010 on sn-devel-104 (cherry picked from commit f16740a408a7a5f648a4cb4b5bef098cf3aec458) commit d2881592fd0bfc9f25e863a608c032fdb24bfb54 Author: Volker Lendecke v...@samba.org Date: Sat Dec 25 15:19:16 2010 +0100 tevent: Fix a typo Autobuild-User: Volker Lendecke vlen...@samba.org Autobuild-Date: Sat Dec 25 22:56:18 CET 2010 on sn-devel-104 (cherry picked from commit 5353eaea33f34752a27ed47fee26426227f5a752) --- Summary of changes: lib/tevent/doc/mainpage.dox |2 +- lib/tevent/tevent.h | 119 +++--- source3/selftest/knownfail |1 + 3 files changed, 90 insertions(+), 32 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/tevent/doc/mainpage.dox b/lib/tevent/doc/mainpage.dox index 5cd3969..e2f986e 100644 --- a/lib/tevent/doc/mainpage.dox +++ b/lib/tevent/doc/mainpage.dox @@ -8,7 +8,7 @@ * signals, and the classic file descriptor events. * * Tevent also provide helpers to deal with asynchronous code providing the - * tevent_req (tevent tequest) functions. + * tevent_req (tevent request) functions. * * @section tevent_download Download * diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h index 82c1483..1c01a63 100644 --- a/lib/tevent/tevent.h +++ b/lib/tevent/tevent.h @@ -509,50 +509,65 @@ int tevent_set_debug_stderr(struct tevent_context *ev); * @defgroup tevent_request The tevent request functions. * @ingroup tevent * - * This represents an async request being processed by callbacks via an event - * context. A user can issue for example a write request to a socket, giving - * an implementation function the fd, the buffer and the number of bytes
[SCM] Samba Shared Repository - branch v3-6-test updated
The branch, v3-6-test has been updated via 6def684 Fix bug #7892 - open_file_fchmod() leaves a stale lock. (cherry picked from commit 079da9a83d12945e8e7bc86ef27abd0bd1599fa4) from 9eb0084 s3:selftest: mark samba3.posix_s3.smb2.lock (dc).rw-exclusive as known to fail http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test - Log - commit 6def6847f770e828286c37c456de8423ddcc4e46 Author: Jeremy Allison j...@samba.org Date: Tue Dec 28 16:25:16 2010 -0800 Fix bug #7892 - open_file_fchmod() leaves a stale lock. (cherry picked from commit 079da9a83d12945e8e7bc86ef27abd0bd1599fa4) --- Summary of changes: source3/include/proto.h |3 +-- source3/smbd/dosmode.c| 11 --- source3/smbd/open.c | 40 source3/smbd/posix_acls.c |4 ++-- 4 files changed, 11 insertions(+), 47 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/include/proto.h b/source3/include/proto.h index f9bf72f..ef08dd7 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -5013,10 +5013,9 @@ bool map_open_params_to_ntcreate(const struct smb_filename *smb_fname, uint32_t *pprivate_flags); void remove_deferred_open_entry(struct file_id id, uint64_t mid, struct server_id pid); -NTSTATUS open_file_fchmod(struct smb_request *req, connection_struct *conn, +NTSTATUS open_file_fchmod(connection_struct *conn, struct smb_filename *smb_fname, files_struct **result); -NTSTATUS close_file_fchmod(struct smb_request *req, files_struct *fsp); NTSTATUS create_directory(connection_struct *conn, struct smb_request *req, struct smb_filename *smb_dname); void msg_file_was_renamed(struct messaging_context *msg, diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index cf95348..838dec0 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -415,7 +415,7 @@ static bool set_ea_dos_attribute(connection_struct *conn, * are not violating security in doing the setxattr. */ - if (!NT_STATUS_IS_OK(open_file_fchmod(NULL, conn, smb_fname, + if (!NT_STATUS_IS_OK(open_file_fchmod(conn, smb_fname, fsp))) return ret; become_root(); @@ -425,7 +425,7 @@ static bool set_ea_dos_attribute(connection_struct *conn, ret = true; } unbecome_root(); - close_file_fchmod(NULL, fsp); + close_file(NULL, fsp, NORMAL_CLOSE); return ret; } DEBUG(10,(set_ea_dos_attribute: set EA 0x%x on file %s\n, @@ -823,18 +823,15 @@ int file_set_dosmode(connection_struct *conn, struct smb_filename *smb_fname, * We need to open the file with write access whilst * still in our current user context. This ensures we * are not violating security in doing the fchmod. -* This file open does *not* break any oplocks we are -* holding. We need to review this may need to -* break batch oplocks open by others. JRA. */ files_struct *fsp; - if (!NT_STATUS_IS_OK(open_file_fchmod(NULL, conn, smb_fname, + if (!NT_STATUS_IS_OK(open_file_fchmod(conn, smb_fname, fsp))) return -1; become_root(); ret = SMB_VFS_FCHMOD(fsp, unixmode); unbecome_root(); - close_file_fchmod(NULL, fsp); + close_file(NULL, fsp, NORMAL_CLOSE); if (!newfile) { notify_fname(conn, NOTIFY_ACTION_MODIFIED, FILE_NOTIFY_CHANGE_ATTRIBUTES, diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 32a08b5..722e461 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -2291,23 +2291,15 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, Open a file for for write to ensure that we can fchmod it. / -NTSTATUS open_file_fchmod(struct smb_request *req, connection_struct *conn, +NTSTATUS open_file_fchmod(connection_struct *conn, struct smb_filename *smb_fname, files_struct **result) { - files_struct *fsp = NULL; - NTSTATUS status; - if (!VALID_STAT(smb_fname-st)) { return NT_STATUS_INVALID_PARAMETER; } - status = file_new(req, conn, fsp); - if(!NT_STATUS_IS_OK(status)) { - return
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 9b31f6ab Fix bug #7892 - open_file_fchmod() leaves a stale lock. from 4622812 s3: Make name_query return NTSTATUS http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9b31f6ab6cce55824f3e62f59061085abc1240db Author: Jeremy Allison j...@samba.org Date: Tue Dec 28 16:25:16 2010 -0800 Fix bug #7892 - open_file_fchmod() leaves a stale lock. Autobuild-User: Jeremy Allison j...@samba.org Autobuild-Date: Wed Dec 29 02:15:23 CET 2010 on sn-devel-104 --- Summary of changes: source3/include/proto.h |3 +-- source3/smbd/dosmode.c| 11 --- source3/smbd/open.c | 40 source3/smbd/posix_acls.c |4 ++-- 4 files changed, 11 insertions(+), 47 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/include/proto.h b/source3/include/proto.h index 9b391ae..c469888 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -5017,10 +5017,9 @@ bool map_open_params_to_ntcreate(const struct smb_filename *smb_fname, uint32_t *pprivate_flags); void remove_deferred_open_entry(struct file_id id, uint64_t mid, struct server_id pid); -NTSTATUS open_file_fchmod(struct smb_request *req, connection_struct *conn, +NTSTATUS open_file_fchmod(connection_struct *conn, struct smb_filename *smb_fname, files_struct **result); -NTSTATUS close_file_fchmod(struct smb_request *req, files_struct *fsp); NTSTATUS create_directory(connection_struct *conn, struct smb_request *req, struct smb_filename *smb_dname); void msg_file_was_renamed(struct messaging_context *msg, diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index cf95348..838dec0 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -415,7 +415,7 @@ static bool set_ea_dos_attribute(connection_struct *conn, * are not violating security in doing the setxattr. */ - if (!NT_STATUS_IS_OK(open_file_fchmod(NULL, conn, smb_fname, + if (!NT_STATUS_IS_OK(open_file_fchmod(conn, smb_fname, fsp))) return ret; become_root(); @@ -425,7 +425,7 @@ static bool set_ea_dos_attribute(connection_struct *conn, ret = true; } unbecome_root(); - close_file_fchmod(NULL, fsp); + close_file(NULL, fsp, NORMAL_CLOSE); return ret; } DEBUG(10,(set_ea_dos_attribute: set EA 0x%x on file %s\n, @@ -823,18 +823,15 @@ int file_set_dosmode(connection_struct *conn, struct smb_filename *smb_fname, * We need to open the file with write access whilst * still in our current user context. This ensures we * are not violating security in doing the fchmod. -* This file open does *not* break any oplocks we are -* holding. We need to review this may need to -* break batch oplocks open by others. JRA. */ files_struct *fsp; - if (!NT_STATUS_IS_OK(open_file_fchmod(NULL, conn, smb_fname, + if (!NT_STATUS_IS_OK(open_file_fchmod(conn, smb_fname, fsp))) return -1; become_root(); ret = SMB_VFS_FCHMOD(fsp, unixmode); unbecome_root(); - close_file_fchmod(NULL, fsp); + close_file(NULL, fsp, NORMAL_CLOSE); if (!newfile) { notify_fname(conn, NOTIFY_ACTION_MODIFIED, FILE_NOTIFY_CHANGE_ATTRIBUTES, diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 32a08b5..722e461 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -2291,23 +2291,15 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, Open a file for for write to ensure that we can fchmod it. / -NTSTATUS open_file_fchmod(struct smb_request *req, connection_struct *conn, +NTSTATUS open_file_fchmod(connection_struct *conn, struct smb_filename *smb_fname, files_struct **result) { - files_struct *fsp = NULL; - NTSTATUS status; - if (!VALID_STAT(smb_fname-st)) { return NT_STATUS_INVALID_PARAMETER; } - status = file_new(req, conn, fsp); - if(!NT_STATUS_IS_OK(status)) { - return status; - } - -status = SMB_VFS_CREATE_FILE( +