[Samba] Re: PDC, BDCs - how do you synchronize roaming profiles?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Argh! You are correct. I thought this was the one really good article that Buchan Milne wrote. It seems to have disapeared. | http://linsec.ca/bin/view/Main/LdapAdvanced | NO, this article is about LDAP mainly, and says nothing about | replicating/synchronizing profiles/data/files. | Tomek Jim C. - -- - - | I can be reached on the following Instant Messenger services: | |---| | MSN: j_c_llings @ hotmail.com AIM: WyteLi0n ICQ: 123291844 | |---| | Y!: j_c_llingsJabber: jcllings @ njs.netlab.cz| - - -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.5 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBvBG657L0B7uXm9oRAkY3AJ9blmu6Q7ZGVCAwpu+jGilObYSeAgCfRyUI fAJ/IzpMXWVhA7vGa5mZHXU= =oi0a -END PGP SIGNATURE- -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Re: PDC, BDCs - how do you synchronize roaming profiles?
John H Terpstra wrote: NT4 does not replicate or synchronize desktop profiles - nor does Samba. Where on earth did you obtain the idea that this ought to happen? Well, I know Samba doesn't replicate profiles. I just asked what is the best way to do it. The notion that all roaming profiles are stored on a central server and that profiles are transferred over a wide-area link at login time is not one I have created. Where did you get such a notion? I would not call that silly, I'd call that insane and completely unworkable. I got such a notion in one of replies to my post; which I criticized as not very useful/possibly harmful. The answer is: Practice good account management. Locate the users' profile on a server close to where the user is - preferably on the same network segment. I a user roams across multiple network segments and the wide-area bandwith can not handle the roaming profile then do exempt that user from having a roaming profile and instead store the profile locally on the workstation (or notebook) that is used by this user. Yes, this is why I asked my question. I want to introduce good account management. But if there are two buildings, 2 minutes walk, connected by a 1 Mbit VPN/WAN link, and users (students) need to use their profile in each building (and they use different computers in different rooms, so can't store profiles locally), I need some profile replication mechanism. I thought of this approach: - keep profile size to the minimum (20-30 megs), - rsync changes of the profile to the other domain controllers when user logs out. Do you think it's a good approach, or should I think of something else? Tomek -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Logon Script
Norman Zhang schrieb: Hi, Is [netlogon] only applicable for Samba Domain Controllers? I like to create use root preexec script to create home folders for first time users. I'm currently running ADS mode, and using KiXtart logon script. Would this work? Regards, Norman Zhang Hi, Creating homedirs for firsttime users is much better achived using the pam_mkhomdir.so pam module. This way the homedir gets created the first time the user authenticates by the pam system. You don't need to script this process, which can be tricky... Christoph -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
[Samba] Re: Linux server to microsoft client problems
Brad Delano skrev: I apologize in advance if this is a repeated or common question. I am a sales guy and am working with a client on moving forward with their project. Issue: We have a Linux server hosting a Microsoft Access database file. There are three computers who need access to this data. One is Windows XP pro, this one works fine. Another is Windows 98 SE, this computer can see the file but can not execute or use the file in anyway. The same problem exists on the Windows 2000 pro machine. This computer can see the file but is unable to open or access it. Please help! Thank you, Brad Delano Hi Brad, take a look at this http://hr.uoregon.edu/davidrl/samba.html, especially the section about oplocks. Cheers Rolf -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
[Samba] Roaming profiles not roamin :(
Hello folks! I have a small problem configuring samba-3.0.9 (on Debian, if that matters). My samba server acts like primary domain controller, and my users can log to the domain. But, their profiles are not roaming (yes, those users have roaming profile selected on every workstation, that's not it). That is - they are not created on samba machine, but instead, on every workstation I have c:\documents and settings\username.domain, with all their data. As you can imagine, that's not what I want. Btw, workstations are running WindowsXP SP2. Here is my smb.conf: [global] workgroup = zbor netbios name = callisto server string = callisto encrypt passwords = yes passdb backend = smbpasswd domain master = yes local master = yes preferred master = yes os level = 65 security = user domain logons = yes time server = yes logon drive = x: logon path = \\%L\profiles\%u logon script = logon.bat wins support = yes [netlogon] comment = Logon Service path = /home/samba/netlogon admin users = root, mosor writable = no browsable = no [profiles] comment = Roamin Profile Share path = /home/xp-profile browseable = no writeable = yes create mask = 0600 directory mask = 0700 Any ideas will be greatly appreciated :). -- Karlo Lozovina - Mosor -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Logon Script
Hi Christoph, Is [netlogon] only applicable for Samba Domain Controllers? I like to create use root preexec script to create home folders for first time users. I'm currently running ADS mode, and using KiXtart logon script. Would this work? Creating homedirs for firsttime users is much better achived using the pam_mkhomdir.so pam module. This way the homedir gets created the first time the user authenticates by the pam system. You don't need to script this process, which can be tricky... Thanks for your suggestion. Unfortunately, I had to disable 'obey pam restrictions' because https://bugzilla.samba.org/show_bug.cgi?id=1860. With it and security = ADS, machine_name home folders are created instead user_name home folders in homedir. I think for now root preexec is the way to go? I need something to check for username, create folder if not existed, then assign permission? Regards, Norman Zhang -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
[Samba] %U server-side script executed after user logs out - possible?
Hello, I ahve a Samba domain controller and Windows users in that domain. I would like to execute a script on a server for a user that logs out. For example, after user joe logged out, I would like to execute /home/samba/scripts/logout/joe.sh Is it possible? If so, how? Tomek -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] %U server-side script executed after user logs out - possible?
On Sunday 12 December 2004 09:08, Tomasz Chmielewski wrote: Hello, I ahve a Samba domain controller and Windows users in that domain. I would like to execute a script on a server for a user that logs out. For example, after user joe logged out, I would like to execute /home/samba/scripts/logout/joe.sh Try the postexec option. The problem you will find is that not all logouts will send the instructions necessary to trigger this script. - John T. -- John H Terpstra Samba-Team Member Phone: +1 (650) 580-8668 Author: The Official Samba-3 HOWTO Reference Guide, ISBN: 0131453556 Samba-3 by Example, ISBN: 0131472216 Hardening Linux, ISBN: 0072254971 Other books in production. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] %U server-side script executed after user logs out - possible?
John H Terpstra wrote: On Sunday 12 December 2004 09:08, Tomasz Chmielewski wrote: Hello, I ahve a Samba domain controller and Windows users in that domain. I would like to execute a script on a server for a user that logs out. For example, after user joe logged out, I would like to execute /home/samba/scripts/logout/joe.sh Try the postexec option. The problem you will find is that not all logouts will send the instructions necessary to trigger this script. What do you mean? Is it Windows-version specific problem (i.e. NT4 and win2k with no service packs only), Samba-version problem (Samba 3.0.5), or it just works like that and noone know why? :) As far as I understand postexec, it will execute each time after user disconnets from a given share: [profiles] path = /home/samba/profiles (...) root postexec = /home/samba/scripts/logout/%u.sh So joe.sh should execute after Joe logs out. Considering what you said (not all logouts will send the instructions triggering the script) - what may be a cause for such a misbehaviuor? Tomek -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
[Samba] Samba PDC print share
I am trying to share a printer from samba to windows clients. I am using the cups subsystem. As a printer I am using Canon LBP 1120. I have found and installed the drivers from the japanese site, and I can print from linux directly on it. I managed to add the CUPS postscript drivers to the print$ share, and the printer installs on the clients without any problems. I have also set up the default preferneces of the printer to initiialize it. The problem is that I -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Re: PDC, BDCs - how do you synchronize roaming profiles?
John H Terpstra wrote: I thought of this approach: - keep profile size to the minimum (20-30 megs), How will you control the size of the profile? I can not see a practical solution to do this. Didn't think of it yet. Several years ago, in a rather big university facility I saw something like that on Windows NT workstations: if student profile was too big, user was disallowed to logout until he/she deleted some data (there was a pop-up window your profile is bigger than XY megabytes, you can't log out, delete some files etc.). The only way to logout was to delete some files and try again, or to poweroff the machine (which meant the profile was lost). Anyone knows what this could be? - rsync changes of the profile to the other domain controllers when user logs out. The trouble is that you have to do it from each WAN location and there is just no way to maintain data integrity with multiple source locations and multiple targets. Given the fact that one user can log in only once and in one place, I think it is doable: just rsync changes to other places using postexec %U script. There are some problems to be solved (what if changes can't be uploaded for some time and we have two different profiles?), but I think I have to live with that as I didn't think of anything better so far. It would be great if there was some profile-daemon which could take care of profile replication: 1) user logs out and uploads profile to a local Samba server, 2) profile-daemon notices that user logged out and finished uploading profile locally, 3) profile-daemon attempts to copy profile to other location(s); if upload successful, exit 4) if upload unsuccessful, retries, 5) if user wants to log in locally again - no problem; if user is a olympic sprinter and managed to reach another building before the profile was fully uploaded, he should be notified during login that profile is not in sync (and ask what to do), 6) if upload unsuccessful because link broken, triggers dial-up and notifies other locations that the profile is *not uploaded*, 7) now other locations know that profiles are not in sync, and won't allow user to log in (or allow to log in, but warn that profile is not in sync), 8) every 5 or 10 minutes profile-daemons should communicate and exchange information; if they can't communicate, they know it, and during login present a user a window explaining last profile change was on Friday, 11:34 etc., what to do... This would need some additional software installed on a Windows side, too I think. Anyway I think it could be a killer Samba feature, especially for bigger organizations like universities. Do you think it's a good approach, or should I think of something else? I'd suggest local profiles for such mobile users. Remember you can use Windows XP Pro off-line folders to replicate data to a home server. But these mobile users can sit in front of a random workstation, so I can't do it like that. Tomek -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
[Samba] Dial-Up Users Not Able to Access Network with Samba PDC
I recently replaced my NT PDC with a Samba PDC with an LDAP backend. Most clients have 2000 and XP machines but a few clients who have 98 machines are not able to access any servers on the network when they dial in to our NT 4.0 RAS server in spite of the fact that they receive all of the proper network settings from the DHCP server and they are successfully authenticated by the Samba/LDAP PDC. The 98 clients can not ping any other machine by name or IP address. They cannot ping the RAS server either. This is quite perplexing. Any insight into the cause of this problem will be greatly appeciated. Alex -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. Georgia State Board of Pardons and Paroles -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
[Samba] tdbsam and variables
Dear List Members We are trying to setup samba PDC with tdbsam backend. First question: When Home Directory is not set in tdbsam does samba just use the setting of logon home in smb.conf? And when it's set does it ignore the smb.conf setting? Second question: Does tdbsam allow the inclusion of variables such as %a, %u, %H, etc.? We were looking at the Big 500 Users Example [1] but had some difficulties. When we were using the tdbsam backand, samba ignored the settings which was set in smb.conf and we had to hard-code the varibles. E.g.: Profile Path: \\myserver\myuser\.profile.WinXP\profile.pds As we still have some computers running NT and 2k we tried to use %a: Profile Path: \\myserver\myuser\.profile.%a\profile.pds But this resulted in the generation of a folder .profile.%a and %a was not interpreted at all. We also wanted to use %L and %u in the profile path but then the profile wasn't found at all. When we left the Profile Path in tdbsam empty the setting in smb.conf was ignored and the profile not found. When using smbpasswd as backand everything works as expected with all variables. Therefore, my answer to my own question would be: all parameters have to be statically set in tdbsam because the settings in smb.conf are ignored and the inclusion of variables does not work. But when I look at the Big 500 Users Example [1] this answer does not make sense at all. If it were true why are the logon path and logon home set in the example configuration? My guess is that I have something wrong in my setup but I just cannot figure out what it is (I've added smb.con at the end of this message). BTW, this is samba-3.0.7-1.3E.1 on RedHat EL 3. Thanks for any hints to resolve this problem. Kind regards, Marc [1] http://us1.samba.org/samba/docs/man/Samba-Guide/Big500users.html /etc/samba/smb.conf #=== Global Settings = [global] workgroup = mydomain #netbios name = %L domain logons = yes server string = SMB-Server 6/6 %v hosts allow = xx.xxx.xx. log file = /var/log/samba/%m.log max log size = 50 security = user debug level = 0 # password server = %L password level = 8 username level = 8 encrypt passwords = yes passdb backend = tdbsam:/etc/samba/private/passdb.tdb unix password sync = no socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 local master = yes os level = 33 domain master = yes preferred master = yes logon path = \\%L\profiles\.profile%a\profile.pds name resolve order = wins hosts wins support = no wins server = xx.xx.xx.xx dns proxy = no nis homedir = true homedir map = auto.home preserve case = yes short preserve case = yes default case = lower case sensitive = no logon drive = P: # Share Definitions == [homes] comment = %U's Data on %L Group %G path = %H browseable = no writable = yes create mask = 0700 directory mask = 0700 follow symlinks = yes [profiles] path = /home/%u browseable = no writable = yes create mask = 0700 directory mask = 0700 -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Re: PDC, BDCs - how do you synchronize roaming profiles?
Tomasz Chmielewski rta: John H Terpstra wrote: I thought of this approach: - keep profile size to the minimum (20-30 megs), How will you control the size of the profile? I can not see a practical solution to do this. Didn't think of it yet. Several years ago, in a rather big university facility I saw something like that on Windows NT workstations: if student profile was too big, user was disallowed to logout until he/she deleted some data (there was a pop-up window your profile is bigger than XY megabytes, you can't log out, delete some files etc.). The only way to logout was to delete some files and try again, or to poweroff the machine (which meant the profile was lost). Anyone knows what this could be? NTConfig.POL made with NT4 policy editor saved to the root of the netlogon share can implement profile size limitations. I think one of the adm files distributed with poledit.exe can do the trick. - rsync changes of the profile to the other domain controllers when user logs out. The trouble is that you have to do it from each WAN location and there is just no way to maintain data integrity with multiple source locations and multiple targets. Given the fact that one user can log in only once and in one place, I think it is doable: just rsync changes to other places using postexec %U script. There are some problems to be solved (what if changes can't be uploaded for some time and we have two different profiles?), but I think I have to live with that as I didn't think of anything better so far. It would be great if there was some profile-daemon which could take care of profile replication: 1) user logs out and uploads profile to a local Samba server, 2) profile-daemon notices that user logged out and finished uploading profile locally, 3) profile-daemon attempts to copy profile to other location(s); if upload successful, exit 4) if upload unsuccessful, retries, 5) if user wants to log in locally again - no problem; if user is a olympic sprinter and managed to reach another building before the profile was fully uploaded, he should be notified during login that profile is not in sync (and ask what to do), 6) if upload unsuccessful because link broken, triggers dial-up and notifies other locations that the profile is *not uploaded*, 7) now other locations know that profiles are not in sync, and won't allow user to log in (or allow to log in, but warn that profile is not in sync), 8) every 5 or 10 minutes profile-daemons should communicate and exchange information; if they can't communicate, they know it, and during login present a user a window explaining last profile change was on Friday, 11:34 etc., what to do... This would need some additional software installed on a Windows side, too I think. Anyway I think it could be a killer Samba feature, especially for bigger organizations like universities. Do you think it's a good approach, or should I think of something else? I'd suggest local profiles for such mobile users. Remember you can use Windows XP Pro off-line folders to replicate data to a home server. But these mobile users can sit in front of a random workstation, so I can't do it like that. Tomek Very nice, but very hard to implement. Another idea: There is coda (http://coda.cs.cmu.edu/), which was designed for disconected operation, you could try to make it interoperate with samba. I think it is not trivial either, as coda uses its own authentication/authorization methods, with some support for kerberos. Cheers, Geza Gemes -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
[Samba] Followed John's book, frustrating smbldap-problem
Hi all, Im having a hard time figuring whats wrong with my Samba-ldap setup. I hope somebody may point out the error. I've set it up according to John H. Terpstra's excellent Samba 3 by example. This book is also availible from samba.org, and chapter I'm referencing is this: http://us1.samba.org/samba/docs/man/Samba-Guide/happy.html I followed the book character by character, and it seemed to work. I added two test-users, elev1 and elev2 by doing 'smbldap-useradd -m -a elev1; smbldap-passwd elev1; smbpasswd -a elev1'. Everything worked fine. I put elev1 in the 'Domain Admins' group to allow him to add computers to the domain. Worked fine. I tried adding more users, but now something is very wrong. I may have tampered a little, but I have no clue to what's wrong. If I try logging on an Windows 2000 machinge with one of the new users, the logs says nothings wrong, but i still cant log on. Strange check_ntlm_password: authentication for user [mhervik] - [mhervik] - [mhervik] succeeded If i do a smbclient //FILSERVER/netlogon -Umhervik, still no error, everything seems to be just fine: tkelev:/tmp/smbldap # smbclient //FILSERVER/netlogon -Umhervik Password: Domain=[ELEV] OS=[Unix] Server=[Samba 3.0.7-5.2-SUSE] smb: \ As you see, authentication works fine, just not on the Win2000-clients. May this have something to do with machine trust accounts? To keep this email as short as possible, I've uploaded the needed log- and conf-files (log-level 4) to http://www.tysvernett.no/smbldap/, please give it a look and I'll buy you a beer if we meet :) Distribution: SuSE 9.2 Clients: Windows 2000 -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
[Samba] SMBFS - Input/Output Errors on Save - Kernel = 2.6.8
I have a Debian (Unstable) workstation which accesses Samba shared directories on a Mitel Server via smbfs mounts. All worked well up to an incuding kernel 2.6.7. After upgrading to 2.6.9 I found that trying to save a file to the share in Open Office resulted in an input/output error. I found this also extends to other programs. Subsequent experimentation reveals that the problem commences with Kernel 2.6.8 and extends to 2.6.9. The same server setup that works with 2.6.7 is broken with 2.6.8 and 2.6.9. I've gone back to running 2.6.7 but would like to update when the problem is solved. Does anyone have any idea of what changes to the Kernel might have caused the problem, and how it might be fixed? regards, Darryl -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Re: Logon Script
Hi Christoph, Is [netlogon] only applicable for Samba Domain Controllers? I like to create use root preexec script to create home folders for first time users. I'm currently running ADS mode, and using KiXtart logon script. Would this work? Creating homedirs for firsttime users is much better achived using the pam_mkhomdir.so pam module. This way the homedir gets created the first time the user authenticates by the pam system. You don't need to script this process, which can be tricky... Thanks for your suggestion. Unfortunately, I had to disable 'obey pam restrictions' because https://bugzilla.samba.org/show_bug.cgi?id=1860. With it and security = ADS, machine_name home folders are created instead user_name home folders in homedir. I think for now root preexec is the way to go? I need something to check for username, create folder if not existed, then assign permission? Regards, Norman Zhang -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Re: PDC, BDCs - how do you synchronize roaming profiles?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tomasz Chmielewski wrote: | Hello, Thinking out loud hmmm Small storeage area network? Gigabit ethernet might be cheap enough. Perhaps you could create a Gigabit backbone and basically do a mirror setup? Would RAID help? Have you been thinking of a backup solution? Jim C. - -- - - | I can be reached on the following Instant Messenger services: | |---| | MSN: j_c_llings @ hotmail.com AIM: WyteLi0n ICQ: 123291844 | |---| | Y!: j_c_llingsJabber: jcllings @ njs.netlab.cz| - - -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.5 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBvSwk57L0B7uXm9oRAiRgAJ9rD4Rgl7fWD8y3Pcn01S+/U0odNQCeLSRM YSKY74yJ7igVjfFWXMHAlio= =qQpg -END PGP SIGNATURE- -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] what samba can't do list
I was wondering what of this was still true? quote Things that samba cannot yet, but are under rapid development, are: - Trust relationships with other domains. - PDC and BDC integration. - Windows NT ACLs (on the Samba shares). - Offer a list of domain users to User Manager for Domains (or the Security Tab etc). At the moment Samba behaves as an NT domain controller, not as a Windows 2000 server. This isn't likely to change much in the future. /quote from: http://www.physics.gla.ac.uk/itsig/reports/samba_pdc_2001-11-19.html Google cache: http://64.233.161.104/search?q=cache:Y9GKboMdu3wJ:www.physics.gla.ac.uk/itsig/reports/samba_pdc_2001-11-19.html+hl=enlr=lang_en -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Partner Sr. Manager #1 2739 Saint Paul Street - - +1 (410) 808-6646 (c) Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, purge the message from your system and notify the sender immediately. Any other use of the email by you is prohibited. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Re: PDC, BDCs - how do you synchronize roaming profiles?
On Sunday 12 December 2004 06:15, Tomasz Chmielewski wrote: John H Terpstra wrote: NT4 does not replicate or synchronize desktop profiles - nor does Samba. Where on earth did you obtain the idea that this ought to happen? Well, I know Samba doesn't replicate profiles. I just asked what is the best way to do it. Sorry. My mis-reading of your posting. The notion that all roaming profiles are stored on a central server and that profiles are transferred over a wide-area link at login time is not one I have created. Where did you get such a notion? I would not call that silly, I'd call that insane and completely unworkable. I got such a notion in one of replies to my post; which I criticized as not very useful/possibly harmful. The answer is: Practice good account management. Locate the users' profile on a server close to where the user is - preferably on the same network segment. I a user roams across multiple network segments and the wide-area bandwith can not handle the roaming profile then do exempt that user from having a roaming profile and instead store the profile locally on the workstation (or notebook) that is used by this user. Yes, this is why I asked my question. I want to introduce good account management. But if there are two buildings, 2 minutes walk, connected by a 1 Mbit VPN/WAN link, and users (students) need to use their profile in each building (and they use different computers in different rooms, so can't store profiles locally), I need some profile replication mechanism. Windows has no good replication solution for this. The only workable is a local profile. I thought of this approach: - keep profile size to the minimum (20-30 megs), How will you control the size of the profile? I can not see a practical solution to do this. Folder redirection is the best way to limit the size of the profile, but that means any profile contents will be accessed over the WAN link. Bandwidth could be a problem for that. The other solution is to share the profile data via NFS. I know I would not like to entertain that over a slow WAN link. - rsync changes of the profile to the other domain controllers when user logs out. The trouble is that you have to do it from each WAN location and there is just no way to maintain data integrity with multiple source locations and multiple targets. Do you think it's a good approach, or should I think of something else? I'd suggest local profiles for such mobile users. Remember you can use Windows XP Pro off-line folders to replicate data to a home server. - John T. -- John H Terpstra Samba-Team Member Phone: +1 (650) 580-8668 Author: The Official Samba-3 HOWTO Reference Guide, ISBN: 0131453556 Samba-3 by Example, ISBN: 0131472216 Hardening Linux, ISBN: 0072254971 Other books in production. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
[Samba] Re: Samba PDC print share
I am trying to share a printer from samba to windows clients. I am using the cups subsystem. As a printer I am using Canon LBP 1120. I have found and installed the drivers from the japanese site, and I can print from linux directly on it. I managed to add the CUPS postscript drivers to the print$ share, and the printer installs on the clients without any problems. I have also set up the default preferneces of the printer to initiialize it. The problem is that after I print something from the clients I cannot print anything on the printer. I can see the job in the que but it doesn't do anything. I can't print on linux either after this. PS. sorry for the first message instead if saving it I pressed send :P -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] %U server-side script executed after user logs out - possible?
On Sunday 12 December 2004 09:54, Tomasz Chmielewski wrote: John H Terpstra wrote: On Sunday 12 December 2004 09:08, Tomasz Chmielewski wrote: Hello, I ahve a Samba domain controller and Windows users in that domain. I would like to execute a script on a server for a user that logs out. For example, after user joe logged out, I would like to execute /home/samba/scripts/logout/joe.sh Try the postexec option. The problem you will find is that not all logouts will send the instructions necessary to trigger this script. What do you mean? Is it Windows-version specific problem (i.e. NT4 and win2k with no service packs only), Samba-version problem (Samba 3.0.5), or it just works like that and noone know why? :) As far as I understand postexec, it will execute each time after user disconnets from a given share: Correct, but can you be sure that Samba will always receive that logoff information? [profiles] path = /home/samba/profiles (...) root postexec = /home/samba/scripts/logout/%u.sh So joe.sh should execute after Joe logs out. Considering what you said (not all logouts will send the instructions triggering the script) - what may be a cause for such a misbehaviuor? Reliability of network hardware infrastructure may be the key factor, however, I have seen apparently reliable networks where Windows NT4 and 2000 workstation logoffs would not trigger the postexec process. Using Ethereal it was plain to see that the workstation did not send anything to Samba either - it just dropped off the network. As far as Samba was concerned the client was still connected and the user was still logged in. - John T. -- John H Terpstra Samba-Team Member Phone: +1 (650) 580-8668 Author: The Official Samba-3 HOWTO Reference Guide, ISBN: 0131453556 Samba-3 by Example, ISBN: 0131472216 Hardening Linux, ISBN: 0072254971 Other books in production. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
RE: [SAMBA] printing problem:Error = No space left on device
Hi Gerald, Thanks very much. I have upgraded samba from 3.0.2a to 3.0.9, and all the printing errors I got before has gone. Regards, Hugh Tran -Original Message- From: Gerald (Jerry) Carter [mailto:[EMAIL PROTECTED] Sent: Saturday, 11 December 2004 1:29 AM To: Hugh Tran Cc: [EMAIL PROTECTED] Subject: Re: [SAMBA] printing problem:Error = No space left on device -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hugh Tran wrote: | Hi, | | I'm trying to fix the printing problem in Samba 3.0.2a | on Solaris 9: When I printed a file via Samba, I got | the message | | smb: \ print /etc/hosts | NT_STATUS_DISK_FULL opening remote file hosts-20027 ... | allocate_print_jobid: failed to allocate a print job | for queue acctspr4 I would really recommend upgrading if you need printing. There have been a lot of bugs fixed that relate to big endian boxes since 3.0.2a. I suggest 3.0.9 + the printing-3-0-9.patch which you can download from http://samba.org/~jerry/patches/post-3.0.9/ cheers, jerry - - Alleviating the pain of Windows(tm) --- http://www.samba.org GnuPG Key- http://www.plainjoe.org/gpg_public.asc If we're adding to the noise, turn off this song--Switchfoot (2003) -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBubKaIR7qMdg1EfYRArfBAKCvH6NvYl+bec/mJxCFbg0weGA2owCcCiiR Ry+D//je+OAeIE1EdT2UARc= =pLcm -END PGP SIGNATURE- -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
svn commit: samba r4160 - in branches/SAMBA_4_0/source/ntvfs/ipc: .
Author: tridge Date: 2004-12-12 08:33:08 + (Sun, 12 Dec 2004) New Revision: 4160 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4160 Log: fixed the file_type in ntcreatex reply on a named pipe. NT4 requires this to be right. Modified: branches/SAMBA_4_0/source/ntvfs/ipc/vfs_ipc.c Changeset: Modified: branches/SAMBA_4_0/source/ntvfs/ipc/vfs_ipc.c === --- branches/SAMBA_4_0/source/ntvfs/ipc/vfs_ipc.c 2004-12-12 07:22:59 UTC (rev 4159) +++ branches/SAMBA_4_0/source/ntvfs/ipc/vfs_ipc.c 2004-12-12 08:33:08 UTC (rev 4160) @@ -267,6 +267,7 @@ ZERO_STRUCT(oi-ntcreatex.out); oi-ntcreatex.out.fnum = p-fnum; oi-ntcreatex.out.ipc_state = p-ipc_state; + oi-ntcreatex.out.file_type = FILE_TYPE_MESSAGE_MODE_PIPE; return status; }
svn commit: samba r4161 - in branches/SAMBA_4_0/source/rpc_server: .
Author: tridge Date: 2004-12-12 08:35:11 + (Sun, 12 Dec 2004) New Revision: 4161 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4161 Log: two more fixes for NT4 clients. Bugs found by kukks. - nt4 doesn't setup the pfc flags correctly for rpc packet types other than normal requests, so don't check for fragmented packets unless they are of type request - ensure we give STATUS_BUFFER_OVERFLOW when we return a partial fragment in SMBtrans requests on ncacn_np Modified: branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c Changeset: Modified: branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c === --- branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c2004-12-12 08:33:08 UTC (rev 4160) +++ branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c2004-12-12 08:35:11 UTC (rev 4161) @@ -849,7 +849,8 @@ dce_partial_advance(dce_conn, blob.length); /* see if this is a continued packet */ - if (!(call-pkt.pfc_flags DCERPC_PFC_FLAG_FIRST)) { + if (call-pkt.ptype == DCERPC_PKT_REQUEST + !(call-pkt.pfc_flags DCERPC_PFC_FLAG_FIRST)) { struct dcesrv_call_state *call2 = call; uint32_t alloc_size; @@ -895,7 +896,8 @@ /* this may not be the last pdu in the chain - if its isn't then just put it on the call_list and wait for the rest */ - if (!(call-pkt.pfc_flags DCERPC_PFC_FLAG_LAST)) { + if (call-pkt.ptype == DCERPC_PKT_REQUEST + !(call-pkt.pfc_flags DCERPC_PFC_FLAG_LAST)) { DLIST_ADD_END(dce_conn-call_list, call, struct dcesrv_call_state *); return NT_STATUS_OK; } @@ -998,6 +1000,8 @@ if (rep-data.length == 0) { /* we're done with this section of the call */ DLIST_REMOVE(call-replies, rep); + } else { + return STATUS_BUFFER_OVERFLOW; } if (call-replies == NULL) {
svn commit: samba r4163 - in branches/SAMBA_4_0/source/ntvfs/posix: .
Author: tridge Date: 2004-12-12 09:11:39 + (Sun, 12 Dec 2004) New Revision: 4163 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4163 Log: 2nd attempt at fixing the OS/2 del * problem Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_dirlist.c Changeset: Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_dirlist.c === --- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_dirlist.c2004-12-12 09:02:18 UTC (rev 4162) +++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_dirlist.c2004-12-12 09:11:39 UTC (rev 4163) @@ -179,8 +179,6 @@ return dir-last_name; } - if (dir-last_name) talloc_free(dir-last_name); - dir-last_name = NULL; dir-end_of_search = True; pvfs_list_hibernate(dir); return NULL; @@ -196,10 +194,6 @@ closedir(dir-dir); dir-dir = NULL; } - if (!dir-no_wildcard dir-last_name) { - talloc_free(dir-last_name); - dir-last_name = NULL; - } }
svn commit: samba r4164 - in branches/SAMBA_4_0/source/torture/raw: .
Author: tridge Date: 2004-12-12 11:29:35 + (Sun, 12 Dec 2004) New Revision: 4164 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4164 Log: added a test that simulates a OS/2 file delete. This includes seek by name back into a directory for files that no longer exist. Modified: branches/SAMBA_4_0/source/torture/raw/search.c Changeset: Modified: branches/SAMBA_4_0/source/torture/raw/search.c === --- branches/SAMBA_4_0/source/torture/raw/search.c 2004-12-12 09:11:39 UTC (rev 4163) +++ branches/SAMBA_4_0/source/torture/raw/search.c 2004-12-12 11:29:35 UTC (rev 4164) @@ -1068,7 +1068,111 @@ return ret; } + /* + testing of OS/2 style delete +*/ +static BOOL test_os2_delete(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) +{ + const int num_files = 700; + const int delete_count = 4; + int total_deleted = 0; + int i, fnum; + char *fname; + BOOL ret = True; + NTSTATUS status; + union smb_search_first io; + union smb_search_next io2; + struct multiple_result result; + + if (!torture_setup_dir(cli, BASEDIR)) { + return False; + } + + printf(Testing OS/2 style delete on %d files\n, num_files); + + for (i=0;inum_files;i++) { + asprintf(fname, BASEDIR \\file%u.txt, i); + fnum = smbcli_open(cli-tree, fname, O_CREAT|O_RDWR, DENY_NONE); + if (fnum == -1) { + printf(Failed to create %s - %s\n, fname, smbcli_errstr(cli-tree)); + ret = False; + goto done; + } + free(fname); + smbcli_close(cli-tree, fnum); + } + + + ZERO_STRUCT(result); + result.mem_ctx = mem_ctx; + + io.t2ffirst.level = RAW_SEARCH_EA_SIZE; + io.t2ffirst.in.search_attrib = 0; + io.t2ffirst.in.max_count = 100; + io.t2ffirst.in.flags = FLAG_TRANS2_FIND_REQUIRE_RESUME; + io.t2ffirst.in.storage_type = 0; + io.t2ffirst.in.pattern = BASEDIR \\*; + + status = smb_raw_search_first(cli-tree, mem_ctx, + io, result, multiple_search_callback); + CHECK_STATUS(status, NT_STATUS_OK); + + for (i=0;iMIN(result.count, delete_count);i++) { + asprintf(fname, BASEDIR \\%s, result.list[i].ea_size.name.s); + status = smbcli_unlink(cli-tree, fname); + CHECK_STATUS(status, NT_STATUS_OK); + total_deleted++; + } + + io2.t2fnext.level = RAW_SEARCH_EA_SIZE; + io2.t2fnext.in.handle = io.t2ffirst.out.handle; + io2.t2fnext.in.max_count = 100; + io2.t2fnext.in.resume_key = result.list[i-1].ea_size.resume_key; + io2.t2fnext.in.flags = FLAG_TRANS2_FIND_REQUIRE_RESUME; + io2.t2fnext.in.last_name = result.list[i-1].ea_size.name.s; + + do { + ZERO_STRUCT(result); + result.mem_ctx = mem_ctx; + + status = smb_raw_search_next(cli-tree, mem_ctx, +io2, result, multiple_search_callback); + if (!NT_STATUS_IS_OK(status)) { + break; + } + + for (i=0;iMIN(result.count, delete_count);i++) { + asprintf(fname, BASEDIR \\%s, result.list[i].ea_size.name.s); + status = smbcli_unlink(cli-tree, fname); + CHECK_STATUS(status, NT_STATUS_OK); + total_deleted++; + } + + if (i0) { + io2.t2fnext.in.resume_key = 0; + io2.t2fnext.in.last_name = result.list[i-1].ea_size.name.s; + } + } while (NT_STATUS_IS_OK(status) result.count != 0); + + CHECK_STATUS(status, NT_STATUS_OK); + + if (total_deleted != num_files) { + printf(error: deleted %d - expected to delete %d\n, + total_deleted, num_files); + ret = False; + } + +done: + smb_raw_exit(cli-session); + smbcli_deltree(cli-tree, BASEDIR); + + return ret; +} + + + +/* basic testing of all RAW_SEARCH_* calls using a single file */ BOOL torture_raw_search(void) @@ -1088,6 +1192,7 @@ ret = test_sorted(cli, mem_ctx); ret = test_modify_search(cli, mem_ctx); ret = test_many_dirs(cli, mem_ctx); + ret = test_os2_delete(cli, mem_ctx); torture_close_connection(cli); talloc_destroy(mem_ctx);
svn commit: samba r4165 - in branches/SAMBA_4_0/source/ntvfs/posix: .
Author: tridge Date: 2004-12-12 11:30:30 + (Sun, 12 Dec 2004) New Revision: 4165 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4165 Log: added a 100 element name cache to cope with some amount of seeking back to filenames that have been deleted. This fixes the new os/2 delete test. Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_dirlist.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_search.c Changeset: Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_dirlist.c === --- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_dirlist.c2004-12-12 11:29:35 UTC (rev 4164) +++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_dirlist.c2004-12-12 11:30:30 UTC (rev 4165) @@ -25,15 +25,24 @@ #include vfs_posix.h #include system/dir.h +#define NAME_CACHE_SIZE 100 + +struct name_cache_entry { + char *name; + off_t offset; +}; + struct pvfs_dir { struct pvfs_state *pvfs; BOOL no_wildcard; - char *last_name; + char *single_name; const char *pattern; off_t offset; DIR *dir; const char *unix_path; BOOL end_of_search; + struct name_cache_entry *name_cache; + uint32_t name_cache_index; }; /* @@ -55,8 +64,8 @@ return NT_STATUS_NO_MEMORY; } - dir-last_name = talloc_strdup(dir, pattern); - if (!dir-last_name) { + dir-single_name = talloc_strdup(dir, pattern); + if (!dir-single_name) { return NT_STATUS_NO_MEMORY; } @@ -88,7 +97,7 @@ char *pattern; struct pvfs_dir *dir; - (*dirp) = talloc_p(mem_ctx, struct pvfs_dir); + (*dirp) = talloc_zero_p(mem_ctx, struct pvfs_dir); if (*dirp == NULL) { return NT_STATUS_NO_MEMORY; } @@ -126,9 +135,15 @@ dir-pvfs = pvfs; dir-no_wildcard = False; - dir-last_name = NULL; dir-end_of_search = False; dir-offset = 0; + dir-name_cache = talloc_zero_array_p(dir, + struct name_cache_entry, + NAME_CACHE_SIZE); + if (dir-name_cache == NULL) { + talloc_free(dir); + return NT_STATUS_NO_MEMORY; + } talloc_set_destructor(dir, pvfs_dirlist_destructor); @@ -147,7 +162,7 @@ dir-end_of_search = True; if (*ofs != 0) return NULL; (*ofs)++; - return dir-last_name; + return dir-single_name; } if (*ofs != dir-offset) { @@ -157,6 +172,7 @@ while ((de = readdir(dir-dir))) { const char *dname = de-d_name; + struct name_cache_entry *e; if (ms_fnmatch(dir-pattern, dname, dir-pvfs-tcon-smb_conn-negotiate.protocol) != 0) { @@ -173,10 +189,15 @@ dir-offset = telldir(dir-dir); (*ofs) = dir-offset; - if (dir-last_name) talloc_free(dir-last_name); - dir-last_name = talloc_strdup(dir, de-d_name); + dir-name_cache_index = (dir-name_cache_index+1) % NAME_CACHE_SIZE; + e = dir-name_cache[dir-name_cache_index]; - return dir-last_name; + if (e-name) talloc_free(e-name); + + e-name = talloc_strdup(dir, de-d_name); + e-offset = dir-offset; + + return e-name; } dir-end_of_search = True; @@ -248,17 +269,27 @@ { struct dirent *de; NTSTATUS status; + int i; status = pvfs_list_wakeup(dir, ofs); if (!NT_STATUS_IS_OK(status)) { return status; } - if (dir-last_name - StrCaseCmp(name, dir-last_name) == 0) { - *ofs = dir-offset; - return NT_STATUS_OK; + for (i=dir-name_cache_index;i=0;i--) { + struct name_cache_entry *e = dir-name_cache[i]; + if (e-name StrCaseCmp(name, e-name) == 0) { + *ofs = e-offset; + return NT_STATUS_OK; + } } + for (i=NAME_CACHE_SIZE-1;idir-name_cache_index;i--) { + struct name_cache_entry *e = dir-name_cache[i]; + if (e-name StrCaseCmp(name, e-name) == 0) { + *ofs = e-offset; + return NT_STATUS_OK; + } + } rewinddir(dir-dir); @@ -266,8 +297,6 @@ if (StrCaseCmp(name, de-d_name) == 0) { dir-offset = telldir(dir-dir); *ofs = dir-offset; - if (dir-last_name) talloc_free(dir-last_name); - dir-last_name = talloc_strdup(dir, de-d_name); return NT_STATUS_OK; } }
svn commit: linux-cifs-client r18 - in branches/linux-2.6bk/fs/cifs: .
Author: sfrench Date: 2004-12-12 21:36:55 + (Sun, 12 Dec 2004) New Revision: 18 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=linux-cifs-clientrev=18 Log: Merge with current cifs bk code Modified: branches/linux-2.6bk/fs/cifs/CHANGES branches/linux-2.6bk/fs/cifs/cifsfs.c branches/linux-2.6bk/fs/cifs/cifsfs.h branches/linux-2.6bk/fs/cifs/cifsglob.h branches/linux-2.6bk/fs/cifs/cifsproto.h branches/linux-2.6bk/fs/cifs/cifssmb.c branches/linux-2.6bk/fs/cifs/connect.c branches/linux-2.6bk/fs/cifs/file.c branches/linux-2.6bk/fs/cifs/transport.c Changeset: Sorry, the patch is too large (508 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=linux-cifs-clientrev=18
svn commit: samba r4166 - in branches/SAMBA_4_0/source: include lib/registry lib/registry/common lib/registry/tools rpc_server/winreg
Author: jelmer Date: 2004-12-13 00:45:29 + (Mon, 13 Dec 2004) New Revision: 4166 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4166 Log: More small API fixes, keep registry structs as small as possible. Implement DelValue in the RPC server Modified: branches/SAMBA_4_0/source/include/registry.h branches/SAMBA_4_0/source/lib/registry/common/reg_interface.c branches/SAMBA_4_0/source/lib/registry/reg_backend_dir.c branches/SAMBA_4_0/source/lib/registry/reg_backend_ldb.c branches/SAMBA_4_0/source/lib/registry/reg_backend_rpc.c branches/SAMBA_4_0/source/lib/registry/reg_backend_w95.c branches/SAMBA_4_0/source/lib/registry/tools/regpatch.c branches/SAMBA_4_0/source/lib/registry/tools/regshell.c branches/SAMBA_4_0/source/rpc_server/winreg/rpc_winreg.c Changeset: Modified: branches/SAMBA_4_0/source/include/registry.h === --- branches/SAMBA_4_0/source/include/registry.h2004-12-12 11:30:30 UTC (rev 4165) +++ branches/SAMBA_4_0/source/include/registry.h2004-12-13 00:45:29 UTC (rev 4166) @@ -75,10 +75,8 @@ const char *path; /* Full path to the key */ char *class_name; /* Name of key class */ NTTIME last_mod; /* Time last modified */ - SEC_DESC *security; struct registry_hive *hive; void *backend_data; - int ref; }; struct registry_value { @@ -86,10 +84,6 @@ unsigned int data_type; int data_len; void *data_blk;/* Might want a separate block */ - struct registry_hive *hive; - struct registry_key *parent; - void *backend_data; - int ref; }; /* FIXME */ @@ -142,7 +136,7 @@ /* Value management */ WERROR (*set_value)(struct registry_key *, const char *name, int type, void *data, int len); - WERROR (*del_value)(struct registry_value *); + WERROR (*del_value)(struct registry_key *, const char *valname); }; struct registry_hive { Modified: branches/SAMBA_4_0/source/lib/registry/common/reg_interface.c === --- branches/SAMBA_4_0/source/lib/registry/common/reg_interface.c 2004-12-12 11:30:30 UTC (rev 4165) +++ branches/SAMBA_4_0/source/lib/registry/common/reg_interface.c 2004-12-13 00:45:29 UTC (rev 4166) @@ -281,8 +281,6 @@ return WERR_NOT_SUPPORTED; } - (*val)-parent = key; - (*val)-hive = key-hive; return WERR_OK; } @@ -408,9 +406,6 @@ if(!W_ERROR_IS_OK(error) !W_ERROR_EQUAL(error, WERR_NO_MORE_ITEMS)) return error; - (*val)-parent = key; - (*val)-hive = key-hive; - return WERR_OK; } @@ -447,7 +442,7 @@ } if(W_ERROR_IS_OK(error)) { - error = reg_del_value(val); + error = reg_del_value(key, val-name); if(!W_ERROR_IS_OK(error)) { talloc_destroy(mem_ctx); return error; @@ -564,13 +559,13 @@ -WERROR reg_del_value(struct registry_value *val) +WERROR reg_del_value(struct registry_key *key, const char *valname) { WERROR ret = WERR_OK; - if(!val-hive-functions-del_value) + if(!key-hive-functions-del_value) return WERR_NOT_SUPPORTED; - ret = val-hive-functions-del_value(val); + ret = key-hive-functions-del_value(key, valname); if(!W_ERROR_IS_OK(ret)) return ret; Modified: branches/SAMBA_4_0/source/lib/registry/reg_backend_dir.c === --- branches/SAMBA_4_0/source/lib/registry/reg_backend_dir.c2004-12-12 11:30:30 UTC (rev 4165) +++ branches/SAMBA_4_0/source/lib/registry/reg_backend_dir.c2004-12-13 00:45:29 UTC (rev 4166) @@ -120,27 +120,13 @@ return WERR_OK; } -static WERROR reg_dir_set_value(struct registry_key *p, const char *name, int type, void *data, int len) -{ - /* FIXME */ - return WERR_NOT_SUPPORTED; -} - -static WERROR reg_dir_del_value(struct registry_value *v) -{ - /* FIXME*/ - return WERR_NOT_SUPPORTED; -} - static struct hive_operations reg_backend_dir = { .name = dir, .open_hive = reg_dir_open, .open_key = reg_dir_open_key, .add_key = reg_dir_add_key, .del_key = reg_dir_del_key, - .get_subkey_by_index = reg_dir_key_by_index, - .set_value = reg_dir_set_value, - .del_value = reg_dir_del_value, + .get_subkey_by_index = reg_dir_key_by_index }; NTSTATUS registry_dir_init(void) Modified: branches/SAMBA_4_0/source/lib/registry/reg_backend_ldb.c === --- branches/SAMBA_4_0/source/lib/registry/reg_backend_ldb.c2004-12-12 11:30:30 UTC (rev 4165) +++ branches/SAMBA_4_0/source/lib/registry/reg_backend_ldb.c
svn commit: samba r4167 - in branches/SAMBA_4_0/source: lib/registry librpc/idl torture/rpc
Author: jelmer Date: 2004-12-13 01:37:18 + (Mon, 13 Dec 2004) New Revision: 4167 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4167 Log: Fix CreateKey Support CreateKey in the RPC registry backend Modified: branches/SAMBA_4_0/source/lib/registry/reg_backend_rpc.c branches/SAMBA_4_0/source/librpc/idl/winreg.idl branches/SAMBA_4_0/source/torture/rpc/winreg.c Changeset: Modified: branches/SAMBA_4_0/source/lib/registry/reg_backend_rpc.c === --- branches/SAMBA_4_0/source/lib/registry/reg_backend_rpc.c2004-12-13 00:45:29 UTC (rev 4166) +++ branches/SAMBA_4_0/source/lib/registry/reg_backend_rpc.c2004-12-13 01:37:18 UTC (rev 4167) @@ -259,7 +259,32 @@ static WERROR rpc_add_key(TALLOC_CTX *mem_ctx, struct registry_key *parent, const char *name, uint32_t access_mask, SEC_DESC *sec, struct registry_key **key) { - return WERR_NOT_SUPPORTED; + NTSTATUS status; + struct winreg_CreateKey r; + + init_winreg_String(r.in.key, name); + init_winreg_String(r.in.class, NULL); + + r.in.handle = parent-backend_data; + r.out.handle = talloc_p(mem_ctx, struct policy_handle); + r.in.options = 0; + r.in.access_mask = access_mask; + r.in.sec_desc = NULL; + + status = dcerpc_winreg_CreateKey((struct dcerpc_pipe *)(parent-hive-backend_data), mem_ctx, r); + +if (!NT_STATUS_IS_OK(status)) { +DEBUG(1, (CreateKey failed - %s\n, nt_errstr(status))); +return ntstatus_to_werror(status); +} + + if (W_ERROR_IS_OK(r.out.result)) { + *key = talloc_p(mem_ctx, struct registry_key); + (*key)-name = talloc_strdup(*key, name); + (*key)-backend_data = r.out.handle; + } + + return r.out.result; } static WERROR rpc_query_key(struct registry_key *k) Modified: branches/SAMBA_4_0/source/librpc/idl/winreg.idl === --- branches/SAMBA_4_0/source/librpc/idl/winreg.idl 2004-12-13 00:45:29 UTC (rev 4166) +++ branches/SAMBA_4_0/source/librpc/idl/winreg.idl 2004-12-13 01:37:18 UTC (rev 4167) @@ -75,10 +75,9 @@ [in,out,ref] policy_handle *handle, [in] winreg_String key, [in] winreg_String class, - [in] uint32 reserved, - [out] uint32 *unknown, + [in] uint32 options, [in] uint32 access_mask, - [in,ref] uint32 *sec_info, + [in,out,ref] uint32 *action_taken, [in] sec_desc_buf *sec_desc ); Modified: branches/SAMBA_4_0/source/torture/rpc/winreg.c === --- branches/SAMBA_4_0/source/torture/rpc/winreg.c 2004-12-13 00:45:29 UTC (rev 4166) +++ branches/SAMBA_4_0/source/torture/rpc/winreg.c 2004-12-13 01:37:18 UTC (rev 4167) @@ -67,7 +67,7 @@ struct winreg_CreateKey r; struct policy_handle newhandle; NTSTATUS status; - uint32_t sec_info = 0; + uint32_t action_taken = 0; printf(\ntesting CreateKey\n); @@ -75,9 +75,9 @@ r.out.handle = newhandle; init_winreg_String(r.in.key, name); init_winreg_String(r.in.class, class); - r.in.reserved = 0x0; + r.in.options = 0x0; r.in.access_mask = 0x0200; - r.in.sec_info = sec_info; + r.in.action_taken = r.out.action_taken = action_taken; r.in.sec_desc = NULL; status = dcerpc_winreg_CreateKey(p, mem_ctx, r); @@ -710,7 +710,7 @@ if (lp_parm_int(-1, torture, dangerous) != 1) { printf(winreg_InitiateShutdown disabled - enable dangerous tests to use\n); - + } else { ret = test_InitiateSystemShutdown(p, mem_ctx, spottyfood, 30); ret = test_AbortSystemShutdown(p, mem_ctx); }
svn commit: samba r4168 - in branches/SAMBA_4_0/source: librpc/idl rpc_server/winreg torture/rpc
Author: jelmer Date: 2004-12-13 02:04:34 + (Mon, 13 Dec 2004) New Revision: 4168 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4168 Log: Implement QueryValue in the server IDL for NotifyChangeKeyValue Modified: branches/SAMBA_4_0/source/librpc/idl/winreg.idl branches/SAMBA_4_0/source/rpc_server/winreg/rpc_winreg.c branches/SAMBA_4_0/source/torture/rpc/winreg.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/idl/winreg.idl === --- branches/SAMBA_4_0/source/librpc/idl/winreg.idl 2004-12-13 01:37:18 UTC (rev 4167) +++ branches/SAMBA_4_0/source/librpc/idl/winreg.idl 2004-12-13 02:04:34 UTC (rev 4168) @@ -181,6 +181,13 @@ /**/ /* Function: 0x0e */ WERROR winreg_NotifyChangeKeyValue( + [in,ref] policy_handle *handle, + [in] uint8 watch_subtree, + [in] uint32 notify_filter, + [in] uint32 unknown, + [in] winreg_String string1, + [in] winreg_String string2, + [in] uint32 unknown2 ); /**/ Modified: branches/SAMBA_4_0/source/rpc_server/winreg/rpc_winreg.c === --- branches/SAMBA_4_0/source/rpc_server/winreg/rpc_winreg.c2004-12-13 01:37:18 UTC (rev 4167) +++ branches/SAMBA_4_0/source/rpc_server/winreg/rpc_winreg.c2004-12-13 02:04:34 UTC (rev 4168) @@ -240,6 +240,11 @@ static WERROR winreg_GetKeySecurity(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct winreg_GetKeySecurity *r) { + struct dcesrv_handle *h; + + h = dcesrv_handle_fetch(dce_call-conn, r-in.handle, HTYPE_REGKEY); + DCESRV_CHECK_HANDLE(h); + return WERR_NOT_SUPPORTED; } @@ -341,7 +346,28 @@ static WERROR winreg_QueryValue(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct winreg_QueryValue *r) { - return WERR_NOT_SUPPORTED; + struct dcesrv_handle *h; + struct registry_key *key; + struct registry_value *val; + WERROR result; + + h = dcesrv_handle_fetch(dce_call-conn, r-in.handle, HTYPE_REGKEY); + DCESRV_CHECK_HANDLE(h); + + key = h-data; + + result = reg_key_get_value_by_name(mem_ctx, key, r-in.value_name.name, val); + + if (!W_ERROR_IS_OK(result)) { + return result; + } + + r-out.type = val-data_type; + r-out.size = r-in.size; + r-out.length = val-data_len; + r-out.data = val-data_blk; + + return WERR_OK; } Modified: branches/SAMBA_4_0/source/torture/rpc/winreg.c === --- branches/SAMBA_4_0/source/torture/rpc/winreg.c 2004-12-13 01:37:18 UTC (rev 4167) +++ branches/SAMBA_4_0/source/torture/rpc/winreg.c 2004-12-13 02:04:34 UTC (rev 4168) @@ -60,6 +60,36 @@ return True; } +static BOOL test_NotifyChangeKeyValue(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, + struct policy_handle *handle) +{ + struct winreg_NotifyChangeKeyValue r; + NTSTATUS status; + + printf(\ntesting NotifyChangeKeyValue\n); + + r.in.handle = handle; + r.in.watch_subtree = 1; + r.in.notify_filter = 0; + r.in.unknown = r.in.unknown2 = 0; + init_winreg_String(r.in.string1, NULL); + init_winreg_String(r.in.string2, NULL); + + status = dcerpc_winreg_NotifyChangeKeyValue(p, mem_ctx, r); + + if (!NT_STATUS_IS_OK(status)) { + printf(NotifyChangeKeyValue failed - %s\n, nt_errstr(status)); + return False; + } + + if (!W_ERROR_IS_OK(r.out.result)) { + printf(NotifyChangeKeyValue failed - %s\n, win_errstr(r.out.result)); + return False; + } + + return True; +} + static BOOL test_CreateKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *name, const char *class) @@ -609,6 +639,9 @@ } + if (!test_NotifyChangeKeyValue(p, mem_ctx, handle)) { + } + if (!test_GetKeySecurity(p, mem_ctx, handle)) { }
svn commit: linux-cifs-client r19 - in branches/linux-2.6bk/fs/cifs: .
Author: sfrench Date: 2004-12-13 04:17:27 + (Mon, 13 Dec 2004) New Revision: 19 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=linux-cifs-clientrev=19 Log: Add support for changing cifs buffer size on insmod Modified: branches/linux-2.6bk/fs/cifs/CHANGES branches/linux-2.6bk/fs/cifs/cifsfs.c branches/linux-2.6bk/fs/cifs/cifsfs.h branches/linux-2.6bk/fs/cifs/cifssmb.c branches/linux-2.6bk/fs/cifs/connect.c branches/linux-2.6bk/fs/cifs/file.c branches/linux-2.6bk/fs/cifs/misc.c branches/linux-2.6bk/fs/cifs/transport.c Changeset: Modified: branches/linux-2.6bk/fs/cifs/CHANGES === --- branches/linux-2.6bk/fs/cifs/CHANGES2004-12-12 21:36:55 UTC (rev 18) +++ branches/linux-2.6bk/fs/cifs/CHANGES2004-12-13 04:17:27 UTC (rev 19) @@ -1,3 +1,9 @@ +Version 1.28 + +Add module init parm for large SMB buffer size (to allow it to be changed +from its default of 16K) which is especially useful for large file copy +when mounting with the directio mount option. + Version 1.27 Turn off DNOTIFY (directory change notification support) by default Modified: branches/linux-2.6bk/fs/cifs/cifsfs.c === --- branches/linux-2.6bk/fs/cifs/cifsfs.c 2004-12-12 21:36:55 UTC (rev 18) +++ branches/linux-2.6bk/fs/cifs/cifsfs.c 2004-12-13 04:17:27 UTC (rev 19) @@ -634,13 +634,14 @@ { if(CIFSMaxBufSize 4096) { CIFSMaxBufSize = 4096; - cFYI(1,(Buffer size set to minimum of 1 page (4096))); } else if (CIFSMaxBufSize 1024*127) { CIFSMaxBufSize = 1024 * 127; - cFYI(1,(Buffer size set to maximum)); + } else { + CIFSMaxBufSize = 0x1FE00; /* Round size to even 512 byte mult*/ } +/* cERROR(1,(CIFSMaxBufSize %d 0x%x,CIFSMaxBufSize,CIFSMaxBufSize)); */ cifs_req_cachep = kmem_cache_create(cifs_request, - CIFS_MAX_MSGSIZE + + CIFSMaxBufSize + MAX_CIFS_HDR_SIZE, 0, SLAB_HWCACHE_ALIGN, NULL, NULL); if (cifs_req_cachep == NULL) Modified: branches/linux-2.6bk/fs/cifs/cifsfs.h === --- branches/linux-2.6bk/fs/cifs/cifsfs.h 2004-12-12 21:36:55 UTC (rev 18) +++ branches/linux-2.6bk/fs/cifs/cifsfs.h 2004-12-13 04:17:27 UTC (rev 19) @@ -90,5 +90,5 @@ size_t, int); extern ssize_t cifs_getxattr(struct dentry *, const char *, void *, size_t); extern ssize_t cifs_listxattr(struct dentry *, char *, size_t); -#define CIFS_VERSION 1.27 +#define CIFS_VERSION 1.28 #endif /* _CIFSFS_H */ Modified: branches/linux-2.6bk/fs/cifs/cifssmb.c === --- branches/linux-2.6bk/fs/cifs/cifssmb.c 2004-12-12 21:36:55 UTC (rev 18) +++ branches/linux-2.6bk/fs/cifs/cifssmb.c 2004-12-13 04:17:27 UTC (rev 19) @@ -288,7 +288,7 @@ (char *)pSMB; if((total_size = (*(u16 *)pBCC)) (total_size - CIFS_MAX_MSGSIZE+MAX_CIFS_HDR_SIZE)) { + CIFSMaxBufSize+MAX_CIFS_HDR_SIZE)) { return 0; } @@ -341,7 +341,7 @@ /* probably no need to store and check maxvcs */ server-maxBuf = min(le32_to_cpu(pSMBr-MaxBufferSize), - (__u32) CIFS_MAX_MSGSIZE + MAX_CIFS_HDR_SIZE); + (__u32) CIFSMaxBufSize + MAX_CIFS_HDR_SIZE); server-maxRw = le32_to_cpu(pSMBr-MaxRawSize); cFYI(0, (Max buf = %d , ses-server-maxBuf)); GETU32(ses-server-sessid) = le32_to_cpu(pSMBr-SessionKey); @@ -823,7 +823,7 @@ __u16 data_length = le16_to_cpu(pSMBr-DataLength); *nbytes = data_length; /*check that DataLength would not go beyond end of SMB */ - if ((data_length CIFS_MAX_MSGSIZE) + if ((data_length CIFSMaxBufSize) || (data_length count)) { cFYI(1,(bad length %d for count %d,data_length,count)); rc = -EIO; @@ -2359,7 +2359,7 @@ pSMB-SearchAttributes = cpu_to_le16(ATTR_READONLY | ATTR_HIDDEN | ATTR_SYSTEM | ATTR_DIRECTORY); - pSMB-SearchCount = cpu_to_le16(CIFS_MAX_MSGSIZE / sizeof (FILE_DIRECTORY_INFO)); /* should this be shrunk even more ? */ + pSMB-SearchCount =
svn commit: samba r4162 - in branches/SAMBA_4_0/source/ntvfs/posix: .
Author: tridge Date: 2004-12-12 09:02:18 + (Sun, 12 Dec 2004) New Revision: 4162 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4162 Log: this should fix the delete/findnext problem from OS/2 clients. Thanks again to kukks for the excellent and detailed bug report Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_dirlist.c branches/SAMBA_4_0/source/ntvfs/posix/pvfs_search.c Changeset: Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_dirlist.c === --- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_dirlist.c2004-12-12 08:35:11 UTC (rev 4161) +++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_dirlist.c2004-12-12 09:02:18 UTC (rev 4162) @@ -282,5 +282,7 @@ pvfs_list_hibernate(dir); - return NT_STATUS_OBJECT_NAME_NOT_FOUND; + /* it is not an error to give a bad name (it may have been deleted). Instead + just continue from end of directory */ + return NT_STATUS_OK; } Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_search.c === --- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_search.c 2004-12-12 08:35:11 UTC (rev 4161) +++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_search.c 2004-12-12 09:02:18 UTC (rev 4162) @@ -562,6 +562,10 @@ talloc_free(search); } + if (reply_count == 0) { + return NT_STATUS_NO_SUCH_FILE; + } + return NT_STATUS_OK; }