[Samba] samba as a time server (newby question): time not updated
Colleagues, I am trying to use my PDC as a time server. time server = yes upon login a group based scripts are executed. Scripts include line: net time \\samba.server /set /yes Time changes only if a user who logs was added Power Users Group on the local machine. My users belong to either staff, pgrads, ugrads, vis UNIX groups. What do I need to do to ensure that time is synchronised on XP client when non-admin user logs into the machine. Thank you in advance. -- Ivan Teliatnikov F09 Madsen Bld. School of Geosciences, University of Sydney phone: +612 9351 2031 mobile: +614 02 173 179 fax:+612 9351 3644 e-mail:[EMAIL PROTECTED] -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Samba permission issue
Hello I use Windows XP Pro on almost all of the desktops I need to access the linux server. I also have one Apple Mac G5 that uses OS 10.4. I have various applications I use to access the server. One of the biggest ones I use is OpenOffice. If I create a new document on one of our windows XP desktops like a spreadsheet then save it to a shared folder on the server the desktop that created that file can go back later and edit that file and save the changes back on the server with out any problem. HoIver if any of the other XP desktops go to edit the file they cannot save the file with the changes. They can copy it they can delete it but cannot edit it. The Mac hoIver can edit the file and save the changes without any problem. HoIver once the Mac has changed that file none of the XP desktops can then edit and save the file, including the original desktop that created the file. This now appears to be the case no matter what program you use. The files that I could edit before Ire files that my desktop created originally. It appears to be some strange Samba setting that I am not aware of that is not letting us have full access to our files . I need to be able to edit and change these files no matter what machine I am using as long as the user is one of the user group. Thanks Regards, Komal -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] samba as a time server (newby question): time not updated
On 6/20/06, Ivan Teliatnikov [EMAIL PROTECTED] wrote: Colleagues, I am trying to use my PDC as a time server. time server = yes upon login a group based scripts are executed. Scripts include line: net time \\samba.server /set /yes Time changes only if a user who logs was added Power Users Group on the local machine. My users belong to either staff, pgrads, ugrads, vis UNIX groups. What do I need to do to ensure that time is synchronised on XP client when non-admin user logs into the machine. You don't already have an NTP server cluster in your organisation? Windows machines do NTP quite nicely, with no admin rights issues, since it runs as a system service on the client. I know this only sidesteps the issue, but if you have NTP running already, I think you'll find the results are better. This was my experience, in any case. David -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] changing windows ACL permissions from smb client
Bonjour à tous, I'm french, I will continue in English... I've got a samba 3.0.1 on a Linux debian 2.4.18 It is configured as a member of an ADS domain 'MYDOM', and I mounted a share disk from a winY2K3 server with the command line: smbmount //srv20031/bibli /mnt/smb/srv20031/bibli -o username=ec firstly, I tried to do the same config on an other Linux debian 3.1r2. with samba 3.0.14, but I got troubles with the smbmount point which says access denied. the user 'ec' is member of a group 'RandD' on the ADS domain. When a user on the Linux server create a directory or file on this share disk of the winY2K3 server, the owner of the file is MYDOM\ec, and the ACL of the file inherit the folder of superior level . How can I, with a command line on the Linux server, disable the inherit property on this file and add an ACL witch enable the write access to members of the AD group 'RandD' ? thanks you for help. Vincent MALIEN -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] smpasswd
Pierre MARC wrote: Le lun 19/06/2006 à 14:30, rich a écrit : /Pierre MARC wrote: Le lun 19/06/2006 à 12:46, rich a écrit : /Pierre MARC wrote: Le ven 16/06/2006 à 17:42, rich a écrit : /Pierre MARC wrote: Le ven 16/06/2006 à 15:04, rich a écrit : Hi, I have just installed samba-3.0.22 and copied my smb.conf across from my previous version on the same machine. With my previous version I never had to run smbpasswd -a username. It would do the authentication from /etc/passwd. ie when I added someone as a user with useradd they would automatically be able to mount samab shares. I am now having to add all my users with smbpasswd. I didn't compile the previous version. Could anyone tell me what I need to do to allow authentication from /etc/passwd? TIA, Rich [global] workgroup = WORKGROUP server string = BLA unix password sync = Yes log level = 2 log file = /var/log/samba/samba.log.%m max log size = 50 wins support = Yes invalid users = root bin web create mask = 0777 directory mask = 0777 hosts allow = 192.168.1. localhost [homes] comment = Home Directories path = /userdata/home/%u read only = No guest ok = Yes browseable = No Try encrypt password = no thanks. unfortunately it didn't make any difference mount -t cifs -o username=testing //mendel/testing /mnt/testing ount error 13 = Permission denied Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)/ What was your last samba version ? And OS ? Hi, my OS is Solaris 8 and my version of samba is 2.0.5a thanks r/ And If you try to use the smbmount command coming with the 3.0.22 version ? I am trying to mount from a linux box using smbmount that comes with fedora core 5. / -- Pierre MARC [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] id3 Semiconductors / -- Pierre MARC [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] id3 Semiconductors / OK, have you seen somethong wrong in the log.smb from the server or the client. If yes, it should be useful to post it. Hi Pierre, thanks for the help. what I was getting in the server logs was: [2006/06/15 14:05:28, 2] auth/auth.c:check_ntlm_password(317) check_ntlm_password: Authentication for user [richard] - [richard] FAILED with error NT_STATUS_NO_SUCH_USER which of course disappeared when i added the user with smbpasswd -a richard thanks -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] 3.0.23 + afsacl build problem
On Mon, Jun 19, 2006 at 02:27:09PM +0200, Greszler Szilárd wrote: I've tried to compile samba 3.0.23rc2 --with-vfs-afsacl --fake-kaserver, but I've got errors. Thanks for pointing that out, trying to fix it. Volker pgp19hpEm97UN.pgp Description: PGP signature -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] 3.0.23 + afsacl build problem
On Mon, Jun 19, 2006 at 02:27:09PM +0200, Greszler Szilárd wrote: I've tried to compile samba 3.0.23rc2 --with-vfs-afsacl --fake-kaserver, but I've got errors. Can you try with r16411? So the question is, how can I get a mem_ctx variable in that function, where can I learn more about mem_ctx, because now I don't know what is it. mem_ctx is a talloc context. This is a structure that you can attach other memory to, and if you free the talloc context all attached memory is also freed. There's more to it, see http://samba.org/ftp/unpacked/samba4/source/lib/talloc/talloc_guide.txt for a reference. In Samba3, we now have the easy tmp_talloc_ctx() that is a per-smbrequest talloc context that is freed after every smb request is done. Volker pgpL0eC7wwRdu.pgp Description: PGP signature -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] samba as a time server (newby question): time not updated
Hi On Tue, Jun 20, 2006 at 07:17:53PM +1000, Ivan Teliatnikov wrote: Colleagues, I am trying to use my PDC as a time server. [snip] What do I need to do to ensure that time is synchronised on XP client when non-admin user logs into the machine. Why don't you just set up an NTP server on your Samba server and then point all the WinXP boxes at it. I think it's under Time in the control panel, or if you right-click on the time in the system tray. By default it syncs off time.windows.com or something like that. I am not a Windows person, so I don't know if you can do this via group policies or whatever. Hope that helps :) -- Michael Wood [EMAIL PROTECTED] -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] samba as a time server (newby question): time not updated
Sorry I haven't followed the thread, but if you use netlogon script, you can put in it net time \\server /set /yes -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] samba as a time server (newby question): time not updated
At 06:14 AM Tuesday, 6/20/2006, Michael Wood wrote -= Hi On Tue, Jun 20, 2006 at 07:17:53PM +1000, Ivan Teliatnikov wrote: Colleagues, I am trying to use my PDC as a time server. [snip] What do I need to do to ensure that time is synchronised on XP client when non-admin user logs into the machine. Why don't you just set up an NTP server on your Samba server and then point all the WinXP boxes at it. I think it's under Time in the control panel, or if you right-click on the time in the system tray. By default it syncs off time.windows.com or something like that. I am not a Windows person, so I don't know if you can do this via group policies or whatever. I use logon scripts for windows clients and add the following: NET TIME \\pdc_server_name /SET /YES I use ntpdate from a cron job to poll a stratum 2 time server which keeps the pdc up to date. Works well here Ed . . . . . . . . . . . . . . . . . . Randomly Generated Quote (1022 of 1055): Why do grandparents and grandchildren get along so well? They have the same enemy--the mother. -Claudette Colbert -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Password expires in 14 days
Hi all, I ran a Samba/LDAP setup for 750 users a while back and the whole plot worked brilliantly until one day, users received a message along the lines of Your password will expire in 14 days. No matter how often people changed their passwords, they still got the message. 14 days later everyone's account expired and I ended up spending some time rolling back to tdbsam. Has anyone had this happen before? The scripts from Idealx were used, I can't remeber the LDAP version (2.2.?) but the Samba version was 3.0.20a. I'm planning to convert back to LDAP due to the size of the network bit in the event didn't have time to diagnose the source of the problem. Funnily enough, when the Windows clients stopped signing on Linux clients could still authenticate fine via LDAP. Cheers, Julian PB -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Printing from Windows over samba
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 malcolm wrote: When I print from windows, which I can from various situations --- i.e. Firefox, Excel, etc, printing is very slow (up to 2 minutes). But I cannot print at all from WinWord. Did you initialize the printer data as outlined in the docs? cheers, jerry = Samba--- http://www.samba.org Centeris --- http://www.centeris.com What man is a man who does not make the world better? --Balian -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFEmAs7IR7qMdg1EfYRApnnAJ0TyQ3FM28fyaowE/D3KGWobKpbcgCeMUoa GBHslkGGt5VlMABlVQXzhaM= =etRw -END PGP SIGNATURE- -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Stange printer driver problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Nicki Messerschmidt, Linksystem Muenchen GmbH wrote: I have a strange problem with samba (3.0.23), cups (1.2.1), windows 2k (all patches up2date) and the printer drivers (cups 5, cups 6). I setup samba to share the printers configured in cups and added the printer admin privilege to some users. Now I can upload the printer drivers using cupsaddsmb. This works without any problems. Even my Windows 2k clients connect without any problems. But... But when I try to access the settings panel of any of my printers windows asks me to install new drivers. The error message is (translated from the german message): The device settings cannot be displayed. The driver for this driver is not installed. Only spooling preferences are displayed. Do you want to install the driver now? Try upload the driver from a Windows client and see if things work better cheers, jerry = Samba--- http://www.samba.org Centeris --- http://www.centeris.com What man is a man who does not make the world better? --Balian -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFEmAuZIR7qMdg1EfYRAghrAJ0YCtTwNg7+tZEj6XEp2DBaD97mGgCguzKU gkhQKMSVfeb5EKCffwGnTkA= =YGOn -END PGP SIGNATURE- -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] svn and samba - make file writable problems
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tom Haerens wrote: Hi, A couple of weeks ago, we moved from a Samba 2.2x to a 3.0.x server. Everything works fine, except our svn. What is the 'x' in 3.0.x? Out of curiousity, have you tested against 3.0.23rc2? The smb.conf looks like this for the milesweb share: [mweb] comment = Milesweb Folder path = /x/MILESWEB write list = @MILESWEB force user = pvcswi force group = MILESWEB create mask = 0775 writeable = yes Since unix group names are normally case sensitive, I have to ask is MILESWEB is really the group name. cheers, jerry = Samba--- http://www.samba.org Centeris --- http://www.centeris.com What man is a man who does not make the world better? --Balian -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFEmAzRIR7qMdg1EfYRAtz+AJ4hfiAdBeDH/aeKCEMQAbr+BaDcDACeL/ia TmjC7yxNNi11iLQ6sFCxbSE= =1fSi -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] Some questions about ./configure and smb.conf options
(sorry for my English, it's not s good...) I'm playing fair well with Samba, but I've always installed it via apt-get, and now I want to install it from source, which allows me to create optimized and updated binaries. Plus, I want to optimize my smb.conf for my scenario. As a result, I've got several questions about some ./configure and smb.conf options that I don't understand exactly what they do and when or how to use, so I'd like to get help. There are plenty of them, so please be patient :-) Here they go: == ./CONFIGURE QUESTIONS: - What's about the --with-fhs option? In raw words, does it configures Samba to install configuration files in /etc/, var files in /var, and so on? - What does the --with-smbwrapper option stands for? When I use it, I get `make` errors (Samba 3.0.23rc2 on Debian Sarge 3.1). - Is the --with-pam option useful only in setups with share level security? - What's the difference between --with-quotas and --with-sys-quotas? I want to enable User quotas on a XFS partition (no LVM, no RAID), so what option suits my need? - The --with-aio-support was claimed experimental on Samba 3.0.20. Now it's production-ready? And I couldn't find definitions on the aio read size, aio write size and aio write behind options in the smb.conf man page... == SMB.CONF QUESTIONS: - Is the ea support option in smb.conf useful for Windows clients, or only to OS/2 ones? - The inherit acls and inherit permissions seems very similar to me. I'm new to POSIX ACLs, so I'm stuck in this one... == That's all for now. Thanks in advance for help. []s Daniel Olops Tudo o que sei é que não sei de nada (Sócrates) ___ Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora! http://br.mobile.yahoo.com/mailalertas/ -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Re: authentication performance problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jérôme Warnier wrote: I finally found out the following logs in my log.winbind: [2006/06/18 06:26:38, 0] lib/fault.c:fault_report(36) === [2006/06/18 06:26:38, 0] lib/fault.c:fault_report(37) INTERNAL ERROR: Signal 11 in pid 3815 (3.0.14a-Debian) Please read the appendix Bugs of the Samba HOWTO collection [2006/06/18 06:26:38, 0] lib/fault.c:fault_report(39) === This seems to be the real problem. Any chance you could try the debs at http://download.samba.org/samba/ftp/Binary_Packages/Debian/ ? cheers, jerry = Samba--- http://www.samba.org Centeris --- http://www.centeris.com What man is a man who does not make the world better? --Balian -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFEmA45IR7qMdg1EfYRAstwAKDFimkbJK4RXdrV+rbo575odGNwRQCgnMxS b6imj8ueC9q8p4qkTJMZumI= =ZkVu -END PGP SIGNATURE- -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Some questions about ./configure and smb.conf options
Daniel Carmo Olops wrote: - What's about the --with-fhs option? In raw words, does it configures Samba to install configuration files in /etc/, var files in /var, and so on? Basically, but i would suggest looking at the RHEL spec file in packaging for an example of how to use it. - What does the --with-smbwrapper option stands for? When I use it, I get `make` errors (Samba 3.0.23rc2 on Debian Sarge 3.1). Doesn't work on Linux. Will probably be removed soon. - Is the --with-pam option useful only in setups with share level security? No. See 'obey pam restrictions' in smb.conf(5) for details. - What's the difference between --with-quotas and --with-sys-quotas? I want to enable User quotas on a XFS partition (no LVM, no RAID), so what option suits my need? I'd stick with --with-quotas since this will automatically test the sysquota internal interface as part of the configure checks. - The --with-aio-support was claimed experimental on Samba 3.0.20. Now it's production-ready? And I couldn't find definitions on the aio read size, aio write size and aio write behind options in the smb.conf man page... It's still experimental. - Is the ea support option in smb.conf useful for Windows clients, or only to OS/2 ones? Only OS/2. - The inherit acls and inherit permissions seems very similar to me. I'm new to POSIX ACLs, so I'm stuck in this one... Inherit acls is for inheriting default acls on directories. Inherit permissions works on systems without acls or directories without default acls. Inherit acls takes precedence over inherit permissions. cheers, jerry = Samba--- http://www.samba.org Centeris --- http://www.centeris.com What man is a man who does not make the world better? --Balian -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Stange printer driver problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gerald (Jerry) Carter said the following: Nicki Messerschmidt, Linksystem Muenchen GmbH wrote: I have a strange problem with samba (3.0.23), cups (1.2.1), windows 2k (all patches up2date) and the printer drivers (cups 5, cups 6). I setup samba to share the printers configured in cups and added the printer admin privilege to some users. Now I can upload the printer drivers using cupsaddsmb. This works without any problems. Even my Windows 2k clients connect without any problems. But... But when I try to access the settings panel of any of my printers windows asks me to install new drivers. The error message is (translated from the german message): The device settings cannot be displayed. The driver for this driver is not installed. Only spooling preferences are displayed. Do you want to install the driver now? Try upload the driver from a Windows client and see if things work better The problem is that I don't quite know how to upload the cups driver via the windows gui. It is not as easy as using the apw... Cheers Nicki - -- Linksystem Muenchen GmbH [EMAIL PROTECTED] Schloerstrasse 10 http://www.link-m.de 80634 Muenchen Tel. 089 / 890 518-0 We make the Net work. Fax 089 / 890 518-77 PGP Keys: https://www.link-m.de/pgp/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.0 (MingW32) Comment: Get keys at: https://www.link-m.de/pgp iD8DBQFEmBdr6zWc+bXuIEMRAp8YAKDeboIvVNsUgJupt6Fog5oG39KfhACgidfv 3Ql3kwt8ss40ihH6jBPYudo= =l4bW -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] Vista + Samba = true??
Hi all, I guess this might has been up before, but the archive don't seem to be available. Does anyone know the current status of Sambas compatibility with Microsoft Vista beta 2? Has anyone been able to connect to Vista using a recent version of samba? BR, Pontus -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Unable to join AD
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello everybody, I'm getting crazy trying to get my Linux box work with Active Directory. It's a Fedora Core 4, and these are the installed rpm's [EMAIL PROTECTED] ~]# cat /etc/redhat-release Fedora Core release 4 (Stentz) [EMAIL PROTECTED] ~]# rpm -qa|grep samba samba-3.0.14a-2 samba-common-3.0.14a-2 [EMAIL PROTECTED] ~]# rpm -qa|grep krb krb5-libs-1.4.1-5 krb5-workstation-1.4.1-5 krb5-devel-1.4.1-5 pam_krb5-2.1.15-2 krb5-server-1.4.1-5 [EMAIL PROTECTED] ~]# Kerberos auth seems to work ok. This is the kerberos config: [EMAIL PROTECTED] ~]# cat /etc/krb5.conf [logging] default = FILE:/var/log/krb5libs.log kdc = FILE:/var/log/krb5kdc.log admin_server = FILE:/var/log/kadmind.log [libdefaults] default_realm = OUR.DOMAIN.COM dns_lookup_realm = yes dns_lookup_kdc = yes ticket_lifetime = 24h forwardable = yes default_tkt_enctypes = des3-hmac-sha1 des-cbc-crc default_tgs_enctypes = des3-hmac-sha1 des-cbc-crc noaddresses = false [realms] OUR.DOMAIN.COM = { kdc = 192.168.0.206:88 admin_server = 192.168.0.206:749 default_domain = OUR.DOMAIN.COM } [domain_realm] .our.domain.com = OUR.DOMAIN.COM our.domain.com = OUR.DOMAIN.COM [kdc] profile = /var/kerberos/krb5kdc/kdc.conf [appdefaults] pam = { debug = false ticket_lifetime = 36000 renew_lifetime = 36000 forwardable = true krb4_convert = false } [EMAIL PROTECTED] ~]# cat /var/kerberos/krb5kdc/kdc.conf [kdcdefaults] acl_file = /var/kerberos/krb5kdc/kadm5.acl dict_file = /usr/share/dict/words admin_keytab = /var/kerberos/krb5kdc/kadm5.keytab v4_mode = nopreauth [realms] OUR.DOMAIN.COM = { master_key_type = des-cbc-crc supported_enctypes = des3-hmac-sha1:normal arcfour-hmac:normal des-hmac-sha1:normal des-cbc-md5:normal des-cbc-crc:normal des-cbc-crc:v4 des-cbc-crc:afs3 } And the output of kinit and klist: [EMAIL PROTECTED] ~]# kinit [EMAIL PROTECTED] Password for [EMAIL PROTECTED]: [EMAIL PROTECTED] ~]# [EMAIL PROTECTED] ~]# klist klist: You have no tickets cached Ticket cache: FILE:/tmp/krb5cc_0 Default principal: [EMAIL PROTECTED] Valid starting ExpiresService principal 06/20/06 17:50:10 06/21/06 03:50:07 krbtgt/[EMAIL PROTECTED] renew until 06/21/06 17:50:10 Kerberos 4 ticket cache: /tmp/tkt0 Also, we have tested kpasswd, and it changes the Administrador password as expected. This is our samba config: [EMAIL PROTECTED] ~]# cat /etc/samba/smb.conf [global] workgroup = OURWORKGROUP netbios name = DESARROLLO realm = OUR.DOMAIN.COM security = ADS template shell = /bin/bash idmap uid = 500-1000 idmap gid = 500-1000 winbind use default domain = Yes winbind nested groups = Yes And this is what happen when we try to test the domain joining: [EMAIL PROTECTED] ~]# net ads --debuglevel=2 testjoin [2006/06/20 17:56:57, 2] lib/interface.c:add_interface(81) added interface ip=192.168.0.32 bcast=192.168.0.255 nmask=255.255.255.0 [2006/06/20 17:56:57, 2] lib/interface.c:add_interface(81) added interface ip=86.109.160.35 bcast=86.109.160.255 nmask=255.255.255.0 [2006/06/20 17:56:57, 1] libads/ldap.c:ads_server_info(2454) ads_server_info: returned ldap server name (host/[EMAIL PROTECTED]) does not contain '$@' so was deemed invalid [2006/06/20 17:56:57, 1] libads/ldap.c:ads_connect(289) Failed to get ldap server info [2006/06/20 17:56:57, 1] libads/ldap.c:ads_server_info(2454) ads_server_info: returned ldap server name (host/[EMAIL PROTECTED]) does not contain '$@' so was deemed invalid [2006/06/20 17:56:57, 1] libads/ldap.c:ads_connect(289) Failed to get ldap server info [2006/06/20 17:56:57, 0] utils/net_ads.c:ads_startup(191) ads_connect: Decoding error Join to domain is not valid [2006/06/20 17:56:57, 2] utils/net.c:main(897) return code = -1 Thanks in advance for any kind of help __ Regards, Roberto Navarro SysAdmin - TusProfesionales, SL -BEGIN PGP SIGNATURE- Version: PGP 8.1 iQA/AwUBRJgcJMhDftHeZF7JEQJXrgCg0lWmMKuSJR9O2XSjnX249fLDOwoAniBM MjPupHyPVBRSnyEgUnhAqk9g =Exjg -END PGP SIGNATURE- -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Re: authentication performance problem
Le mardi 20 juin 2006 à 10:03 -0500, Gerald (Jerry) Carter a écrit : Jérôme Warnier wrote: I finally found out the following logs in my log.winbind: [2006/06/18 06:26:38, 0] lib/fault.c:fault_report(36) === [2006/06/18 06:26:38, 0] lib/fault.c:fault_report(37) INTERNAL ERROR: Signal 11 in pid 3815 (3.0.14a-Debian) Please read the appendix Bugs of the Samba HOWTO collection [2006/06/18 06:26:38, 0] lib/fault.c:fault_report(39) === This seems to be the real problem. Any chance you could try the debs at http://download.samba.org/samba/ftp/Binary_Packages/Debian/ ? Well, could you tell me what they change over the official packages? I already rebuilt mines (official Sarge version) with support for kernel oplocks (as it is normally disabled because Sarge still support Linux kernel 2.2). cheers, jerry -- Jérôme Warnier [EMAIL PROTECTED] BeezNest -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Stange printer driver problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Nicki Messerschmidt, Linksystem Muenchen GmbH wrote : The problem is that I don't quite know how to upload the cups driver via the windows gui. It is not as easy as using the apw... Why use the cups driver ? You can use a Win32 driver on a raw queue for Windows clients and a cups driver for cups clients. cheers, jerry = Samba--- http://www.samba.org Centeris --- http://www.centeris.com What man is a man who does not make the world better? --Balian -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFEmCVUIR7qMdg1EfYRAsT8AKCEefuXpmBV/PobJ/sRpto0mwCnVACaA7nS LkIKier0u3WyqayVnrRDuu0= =wtof -END PGP SIGNATURE- -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Re: authentication performance problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jérôme Warnier wrote: Any chance you could try the debs at http://download.samba.org/samba/ftp/Binary_Packages/Debian/ ? Well, could you tell me what they change over the official packages? There are newer :-) Check the WHATSNEW.txt for details on what has changed between 3.0.14a and 3.0.22. cheers, jerry = Samba--- http://www.samba.org Centeris --- http://www.centeris.com What man is a man who does not make the world better? --Balian -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFEmCX8IR7qMdg1EfYRAqD8AKCE+POm/lxAJfDScoCDuot9xe1GxACeOTL9 Xlr+ssJVUQcyZ615gPK6OVU= =4ISz -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] Linux Permissions for Samba Share
HELP!!! I can get my Windows network to see a Samba share as long as it is sharing the /TMP directory. Creating a directory anywhere else does not allow me to write to the directory. I've run chmod 777 /database and it changes permissions but I still can't write to it. Any ideas? John D. Wyatt, CMB | DpFunder Program | www.dpfunder.com *office: 301.869.2900 | *fax: 301.560.4980 | *mobile: 703.945.7302 | *email: [EMAIL PROTECTED] This e-mail message, including any attachments, may contain legally privileged and/or confidential information. If you are not the intended recipient(s), or the employee or agent responsible for delivery of this message to the intended recipient(s), you are hereby notified that any dissemination, distribution, or copying of this e-mail message is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete this e-mail message from your computer. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Printer comments and other weirdness
Am running Samba 3.0.20 on SuSE 10.0 and cups as my printer provider. I've used the cups gui to create a number of printers. They appeared correctly in my Printers and Faxes folder in Explorer and I uploaded my print drivers successfully. Now, a few days later, I'm looking at my printers and I notice that the comments that show up on the print shares themselves still reflect some old data I originally entered. The comments appear correct under Printers and Faxes, but not directoy under the server, nor in the view that my users will access using the Add a Printer Wizard. I've looked at my printers.conf and printcap files and the commens (Info blah blah blah) shows up correctly. It also looks correct in the cups web interface. If I use rpcclient, the information also looks correct and if I right click under Printers and Faxes as an admin, they also look correct. So where is this information coming from? Also, under Printers and Faxes, I have one printer showing up twice and another not appearing at all, although they appear correctly (less the comments) as the share itself. I just can't figure out where all of the little bits are stored for printer information - I'm assuming they exist in multiple areas. Here's my config: smb.conf: [global] unix charset = LOCALE workgroup = MYDOMAIN realm = MYDOMAIN.INT server string = Samba File Server security = ADS allow trusted domains = No enable privileges = Yes username map = /etc/samba/smbusers log level = 1 syslog = 1 log file = /var/log/samba/%m max log size = 50 deadtime = 15 socket options = IPTOS_LOWDELAY TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 printcap name = cups wins server = 10.0.0.2 ldap ssl = no idmap backend = idmap_rid:MYDOMAIN=1-5 idmap uid = 1-5 idmap gid = 1-5 template shell = /bin/bash winbind separator = + cups options = raw [Printers] comment = All Printers path = /var/tmp create mask = 0600 printable = Yes browseable = No [print$] comment = Printer Drivers path = /var/lib/samba/drivers write list = root, @MYDOMAIN+Domain Admins printers.conf: # Printer configuration file for CUPS v1.1.23 # Written by cupsd on Tue Jun 20 15:05:58 2006 Printer HP1300_10205 Info HP1300 in OPS Front Room (BW) Location Operations Room - Front DeviceURI socket://10.0.0.205:9100 State Idle Accepting Yes JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 /Printer Printer HP1320_10213 Info HP1320 in OPS Back Room (BW) Location Operations Room - Back DeviceURI socket://10.0.0.213:9100 State Idle Accepting Yes JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 /Printer Printer HP2300_10208 Info HP2300 Near Analytics (BW) Location 5th Floor Analytics DeviceURI socket://10.0.0.208:9100 State Idle Accepting Yes JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 /Printer Printer HP2430_10211 Info HP2430 at Reception Desk (BW) Location 5th Floor Reception Area DeviceURI socket://10.0.0.211:9100 State Idle Accepting Yes JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 /Printer Printer HP4000_10203 Info HP4000 in 4th Floor Mail Area (BW) Location 4th Floor in Mail Area DeviceURI socket://10.0.0.203:9100 State Idle Accepting Yes JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 /Printer DefaultPrinter HP4050_10204 Info HP4050 in IT Dept (BW) Location 5th Floor IT Department DeviceURI socket://10.0.0.204:9100 State Idle Accepting Yes JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 /Printer Printer HP4050TN_10206 Info HP4050TN in 5th Floor Mail Room (BW) Location 5th Floor Mail Room DeviceURI socket://10.0.0.206:9100 State Idle Accepting Yes JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 /Printer Printer HP5100_10201 Info HP 5100 Near Account Managers (BW) Location 4th Floor Account Managers DeviceURI socket://10.0.0.201:9100 State Idle Accepting Yes JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 /Printer Printer HP5100DTN_10210 Info HP5100DTN Near Bullpen (BW, Duplex) Location 5th Floor Near Bullpen DeviceURI socket://10.0.0.210:9100 State Idle Accepting Yes JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 /Printer Printer HP5550C_10212 Info HP5550 Near Dan and Mike (Color) Location 5th Floor Executive Hallway near Dan and Mike DeviceURI socket://10.0.0.212:9100 State Idle Accepting Yes JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 /Printer Printer MCF2002_10202 Info Minolta CF2002 in 4th Floor Mail Area (Color, Duplex) Location 4th Floor Mail Area DeviceURI socket://10.0.0.202:9100 State Idle Accepting Yes JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 /Printer Printer XRXN4525_10207 Info Xerox N4525 Near Desktop Publishing (BW, Duplex) Location 5th Floor Near Desktop DeviceURI socket://10.0.0.207:9100 State Idle Accepting Yes JobSheets none none QuotaPeriod 0
[Samba] LDAP GID-SID without winbind?
Hello everyone, In my new Samba environment, I have a few servers that use LDAP for Unix accounts (via PADL's NSS stuff). This is working fine for Unix accounts, and everything is in LDAP. These servers are also going to run Samba, with the ldapsam backend. I've noticed that ldapsam allows me to maintain a UID-SID mapping by simply putting the SID in the sambaSID attribute for a (domain) user. That is, I can manually assign the SID when I create the account. Is there any simple equivalent thing for GID-SID mappings for groups? I'd really like to just choose a SID when I choose a GID at the same time I'm adding the group. And I'd like it to be a SID that matches the domain SID; that would help keep things uniform across servers. I've looked at the documentation quite a lot, and the only thing I've seen allusions to so far that allows GID-SID mapping to be stored in LDAP is using idmap with winbind. It seems very strange to me that there's an easy way to do this (without winbind) for users but there isn't for groups. For what it's worth, I'm trying to avoid winbind (at least, using NSS going through winbind) because the new PDC is also to be a Samba file server, smtp/pop3/imap mail server, etc. Basically, I just want all Unix UIDs and GIDs and all SIDs to be specified manually in LDAP. I notice in the figures in Chapter 11 of the official HOWTO that it shows winbind querying ldapsam to do GID-SID mapping. Is it possible that winbind (one d) refers to winbindd (two ds -- the daemon) and this implies that I can have LDAP-based GID-SID mapping by running the winbindd daemon but not setting up winbind anywhere in /etc/nsswitch.conf? Thanks for any insight -- I've spent hours today looking through the documentation and I've learned a lot, but I haven't learned the one thing I need to know... :-) - Logan -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Some questions about ./configure and smb.conf options
Hm, I've got the idea now. But the aio parameters are still pending... Are they defined in kilobytes? Someone has suggestions on which values should I use? Again, thanks for the answers! []s Daniel Olops Tudo o que sei é que não sei de nada (Sócrates) ___ Yahoo! doce lar. Faça do Yahoo! sua homepage. http://br.yahoo.com/homepageset.html -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] samba as a time server (newby question): time not updated
On Tue, 2006-06-20 at 11:52 +0200, David Landgren wrote: On 6/20/06, Ivan Teliatnikov [EMAIL PROTECTED] wrote: Colleagues, I am trying to use my PDC as a time server. time server = yes upon login a group based scripts are executed. Scripts include line: net time \\samba.server /set /yes Time changes only if a user who logs was added Power Users Group on the local machine. My users belong to either staff, pgrads, ugrads, vis UNIX groups. What do I need to do to ensure that time is synchronised on XP client when non-admin user logs into the machine. You don't already have an NTP server cluster in your organisation? Windows machines do NTP quite nicely, with no admin rights issues, since it runs as a system service on the client. Thank you for the hint. I will do it in the future. However I am still left with a large number not knowing right time. This is very irritating largely due to human factor. net time \\samba.server /set /yes is in the netlogon scripts but it does not work. I know this only sidesteps the issue, but if you have NTP running already, I think you'll find the results are better. This was my experience, in any case. David -- Ivan Teliatnikov F09 Madsen Bld. School of Geosciences, University of Sydney phone: +612 9351 2031 mobile: +614 02 173 179 fax:+612 9351 3644 e-mail:[EMAIL PROTECTED] -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Re: authentication performance problem
Le mardi 20 juin 2006 à 11:44 -0500, Gerald (Jerry) Carter a écrit : Jérôme Warnier wrote: Any chance you could try the debs at http://download.samba.org/samba/ftp/Binary_Packages/Debian/ ? Well, could you tell me what they change over the official packages? There are newer :-) Check the WHATSNEW.txt for details on what has changed between 3.0.14a and 3.0.22. So the kernel oplocks are not activated by default? If not, may I request you do it? There are little chances someone willing to use the latest Samba packages for his Sarge is still running a 2.2 kernel. See here to actually do it: http://glasnost.beeznest.org/articles/327 Thanks cheers, jerry -- Jérôme Warnier [EMAIL PROTECTED] BeezNest -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Re: authentication performance problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 21 Jun 2006, Jér Warnier wrote: So the kernel oplocks are not activated by default? If not, may I request you do it? There are little chances someone willing to use the latest Samba packages for his Sarge is still running a 2.2 kernel. See here to actually do it: http://glasnost.beeznest.org/articles/327 I can't answer that. You'll need to talk ti Simo Sorce who maintains the packages. In general, kernel oplocks are always enabled by default unless it is a known broken kernel. Kernel oplocks weren't introduced until the 2.4 kernel so a package compiled on a 2.4 kernel system would be broken on a 2.2 system. cheers, jerry = Samba--- http://www.samba.org Centeris --- http://www.centeris.com What man is a man who does not make the world better? --Balian -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (GNU/Linux) Comment: For info see http://quantumlab.net/pine_privacy_guard/ iD8DBQFEmKkrIR7qMdg1EfYRAlX1AJ95pXvaDmOOToIkfknRxVrifY3n+wCePmbn tj1WoaRXIJ4lZakztwn9mK4= =jlom -END PGP SIGNATURE--- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Printer comments and other weirdness
Now, a few days later, I'm looking at my printers and I notice that the comments that show up on the print shares themselves still reflect some old data I originally entered. The comments appear correct under Printers and Faxes, but not directoy under the server, nor in the view that my users will access using the Add a Printer Wizard. I've got the same problem with the server comments. I added a comment to the Samba server (server string = blah) which appeared straight away, but when I saw how it appeared on the client machines I removed it. That was eight months ago, and the client PCs are still showing the old server string - so I've given up now and decided to live with it, as it's being cached somewhere but I haven't the faintest idea where. Cheers, Adam. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
svn commit: samba r16401 - in branches/SAMBA_4_0/source/smb_server/smb: .
Author: metze Date: 2006-06-20 06:05:10 + (Tue, 20 Jun 2006) New Revision: 16401 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16401 Log: keep the old pointer when realloc fails, this is needed for the search callback metze Modified: branches/SAMBA_4_0/source/smb_server/smb/trans2.c Changeset: Modified: branches/SAMBA_4_0/source/smb_server/smb/trans2.c === --- branches/SAMBA_4_0/source/smb_server/smb/trans2.c 2006-06-20 05:06:10 UTC (rev 16400) +++ branches/SAMBA_4_0/source/smb_server/smb/trans2.c 2006-06-20 06:05:10 UTC (rev 16401) @@ -67,8 +67,10 @@ uint32_t new_size) { if (new_size blob-length) { - blob-data = talloc_realloc(mem_ctx, blob-data, uint8_t, new_size); - NT_STATUS_HAVE_NO_MEMORY(blob-data); + uint8_t *p; + p = talloc_realloc(mem_ctx, blob-data, uint8_t, new_size); + NT_STATUS_HAVE_NO_MEMORY(p); + blob-data = p; } blob-length = new_size; return NT_STATUS_OK;
svn commit: samba r16402 - in branches/SAMBA_4_0/source/smb_server/smb: .
Author: metze Date: 2006-06-20 06:20:05 + (Tue, 20 Jun 2006) New Revision: 16402 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16402 Log: start to remove the dependecy to smbsrv_request from the parsing functions metze Modified: branches/SAMBA_4_0/source/smb_server/smb/trans2.c Changeset: Modified: branches/SAMBA_4_0/source/smb_server/smb/trans2.c === --- branches/SAMBA_4_0/source/smb_server/smb/trans2.c 2006-06-20 06:05:10 UTC (rev 16401) +++ branches/SAMBA_4_0/source/smb_server/smb/trans2.c 2006-06-20 06:20:05 UTC (rev 16402) @@ -133,17 +133,19 @@ STR_NO_RANGE_CHECK | flags); } +#define TRANS2_REQ_DEFAULT_STR_FLAGS(req) (((req)-flags2 FLAGS2_UNICODE_STRINGS) ? STR_UNICODE : STR_ASCII) + /* push a string into the data section of a trans2 request return the number of bytes consumed in the output */ -static size_t trans2_push_data_string(struct smbsrv_request *req, - TALLOC_CTX *mem_ctx, +static size_t trans2_push_data_string(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, uint32_t len_offset, uint32_t offset, - const struct smb_wire_string *str, + const char *str, int dest_len, + int default_flags, int flags) { int alignment = 0, ret = 0, pkt_len; @@ -151,7 +153,7 @@ /* we use STR_NO_RANGE_CHECK because the params are allocated separately in a DATA_BLOB, so we need to do our own range checking */ - if (!str-s || offset = blob-length) { + if (!str || offset = blob-length) { if (flags STR_LEN8BIT) { SCVAL(blob-data, len_offset, 0); } else { @@ -167,17 +169,17 @@ } if (!(flags (STR_ASCII|STR_UNICODE))) { - flags |= (req-flags2 FLAGS2_UNICODE_STRINGS) ? STR_UNICODE : STR_ASCII; + flags |= default_flags; } if ((offset1) (flags STR_UNICODE) !(flags STR_NOALIGN)) { alignment = 1; if (dest_len 0) { SCVAL(blob-data + offset, 0, 0); - ret = push_string(blob-data + offset + 1, str-s, dest_len-1, flags); + ret = push_string(blob-data + offset + 1, str, dest_len-1, flags); } } else { - ret = push_string(blob-data + offset, str-s, dest_len, flags); + ret = push_string(blob-data + offset, str, dest_len, flags); } /* sometimes the string needs to be terminated, but the length @@ -207,11 +209,11 @@ len_offset points to the place in the packet where the length field should go */ -static NTSTATUS trans2_append_data_string(struct smbsrv_request *req, - TALLOC_CTX *mem_ctx, +static NTSTATUS trans2_append_data_string(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, - const struct smb_wire_string *str, + const char *str, uint_t len_offset, + int default_flags, int flags) { size_t ret; @@ -219,8 +221,8 @@ const int max_bytes_per_char = 3; offset = blob-length; - TRANS2_CHECK(trans2_grow_data(mem_ctx, blob, offset + (2+strlen_m(str-s))*max_bytes_per_char)); - ret = trans2_push_data_string(req, mem_ctx, blob, len_offset, offset, str, -1, flags); + TRANS2_CHECK(trans2_grow_data(mem_ctx, blob, offset + (2+strlen_m(str))*max_bytes_per_char)); + ret = trans2_push_data_string(mem_ctx, blob, len_offset, offset, str, -1, default_flags, flags); if (ret 0) { return NT_STATUS_FOOBAR; } @@ -265,9 +267,10 @@ SIVAL(blob-data, 0, fsinfo-volume.out.serial_number); /* w2k3 implements this incorrectly for unicode - it * leaves the last byte off the string */ - TRANS2_CHECK(trans2_append_data_string(req, mem_ctx, blob, - fsinfo-volume.out.volume_name, - 4, STR_LEN8BIT|STR_NOALIGN)); + TRANS2_CHECK(trans2_append_data_string(mem_ctx, blob, + fsinfo-volume.out.volume_name.s, + 4, TRANS2_REQ_DEFAULT_STR_FLAGS(req), +
svn commit: samba r16403 - in branches/SAMBA_4_0/source/smb_server/smb: .
Author: metze Date: 2006-06-20 06:32:29 + (Tue, 20 Jun 2006) New Revision: 16403 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16403 Log: remove dependency to smbsrv_request next part... metze Modified: branches/SAMBA_4_0/source/smb_server/smb/trans2.c Changeset: Modified: branches/SAMBA_4_0/source/smb_server/smb/trans2.c === --- branches/SAMBA_4_0/source/smb_server/smb/trans2.c 2006-06-20 06:20:05 UTC (rev 16402) +++ branches/SAMBA_4_0/source/smb_server/smb/trans2.c 2006-06-20 06:32:29 UTC (rev 16403) @@ -241,10 +241,11 @@ return NT_STATUS_OK; } -static NTSTATUS trans2_push_fsinfo(struct smbsrv_request *req, +static NTSTATUS trans2_push_fsinfo(struct smbsrv_connection *smb_conn, + TALLOC_CTX *mem_ctx, + DATA_BLOB *blob, union smb_fsinfo *fsinfo, - TALLOC_CTX *mem_ctx, - DATA_BLOB *blob) + int default_str_flags) { uint_t i; DATA_BLOB guid_blob; @@ -269,7 +270,7 @@ * leaves the last byte off the string */ TRANS2_CHECK(trans2_append_data_string(mem_ctx, blob, fsinfo-volume.out.volume_name.s, - 4, TRANS2_REQ_DEFAULT_STR_FLAGS(req), + 4, default_str_flags, STR_LEN8BIT|STR_NOALIGN)); return NT_STATUS_OK; @@ -283,7 +284,7 @@ SSVAL(blob-data, 16, 0); /* padding */ TRANS2_CHECK(trans2_append_data_string(mem_ctx, blob, fsinfo-volume_info.out.volume_name.s, - 12, TRANS2_REQ_DEFAULT_STR_FLAGS(req), + 12, default_str_flags, STR_UNICODE)); return NT_STATUS_OK; @@ -319,7 +320,7 @@ unicode even when ascii is negotiated */ TRANS2_CHECK(trans2_append_data_string(mem_ctx, blob, fsinfo-attribute_info.out.fs_type.s, - 8, TRANS2_REQ_DEFAULT_STR_FLAGS(req), + 8, default_str_flags, STR_UNICODE)); return NT_STATUS_OK; @@ -379,7 +380,9 @@ TRANS2_CHECK(trans2_setup_reply(trans, 0, 0, 0)); - TRANS2_CHECK(trans2_push_fsinfo(req, fsinfo, trans, trans-out.data)); + TRANS2_CHECK(trans2_push_fsinfo(req-smb_conn, trans, + trans-out.data, fsinfo, + TRANS2_REQ_DEFAULT_STR_FLAGS(req))); return NT_STATUS_OK; } @@ -573,10 +576,11 @@ return ntvfs_mkdir(req-ntvfs, io); } -static NTSTATUS trans2_push_fileinfo(struct smbsrv_request *req, +static NTSTATUS trans2_push_fileinfo(struct smbsrv_connection *smb_conn, +TALLOC_CTX *mem_ctx, +DATA_BLOB *blob, union smb_fileinfo *st, -TALLOC_CTX *mem_ctx, -DATA_BLOB *blob) +int default_str_flags) { uint_t i; uint32_t list_size; @@ -604,9 +608,9 @@ case RAW_FILEINFO_STANDARD: TRANS2_CHECK(trans2_grow_data(mem_ctx, blob, 22)); - srv_push_dos_date2(req-smb_conn, blob-data, 0, st-standard.out.create_time); - srv_push_dos_date2(req-smb_conn, blob-data, 4, st-standard.out.access_time); - srv_push_dos_date2(req-smb_conn, blob-data, 8, st-standard.out.write_time); + srv_push_dos_date2(smb_conn, blob-data, 0, st-standard.out.create_time); + srv_push_dos_date2(smb_conn, blob-data, 4, st-standard.out.access_time); + srv_push_dos_date2(smb_conn, blob-data, 8, st-standard.out.write_time); SIVAL(blob-data,12, st-standard.out.size); SIVAL(blob-data,16, st-standard.out.alloc_size); SSVAL(blob-data,20, st-standard.out.attrib); @@ -615,9 +619,9 @@ case RAW_FILEINFO_EA_SIZE: TRANS2_CHECK(trans2_grow_data(mem_ctx, blob, 26)); - srv_push_dos_date2(req-smb_conn, blob-data, 0, st-ea_size.out.create_time); - srv_push_dos_date2(req-smb_conn, blob-data, 4, st-ea_size.out.access_time); -
svn commit: samba r16404 - in branches/tmp/jpeach-xmetrics/source: . auth client include lib libads libsmb locking modules nmbd nsswitch pam_smbpass param passdb printing profile rpc_client rpc_parse
Author: jpeach Date: 2006-06-20 06:43:06 + (Tue, 20 Jun 2006) New Revision: 16404 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16404 Log: Merge in SAMBA_3_0 up to rev 16398. Added: branches/tmp/jpeach-xmetrics/source/lib/timegm.c branches/tmp/jpeach-xmetrics/source/script/tests/tests_smbclient_s3.sh Modified: branches/tmp/jpeach-xmetrics/source/Makefile.in branches/tmp/jpeach-xmetrics/source/VERSION branches/tmp/jpeach-xmetrics/source/aclocal.m4 branches/tmp/jpeach-xmetrics/source/auth/auth_domain.c branches/tmp/jpeach-xmetrics/source/auth/auth_sam.c branches/tmp/jpeach-xmetrics/source/auth/auth_util.c branches/tmp/jpeach-xmetrics/source/auth/pass_check.c branches/tmp/jpeach-xmetrics/source/client/client.c branches/tmp/jpeach-xmetrics/source/client/clitar.c branches/tmp/jpeach-xmetrics/source/client/mount.cifs.c branches/tmp/jpeach-xmetrics/source/client/smbctool.c branches/tmp/jpeach-xmetrics/source/configure.in branches/tmp/jpeach-xmetrics/source/dynconfig.c branches/tmp/jpeach-xmetrics/source/include/ads.h branches/tmp/jpeach-xmetrics/source/include/dynconfig.h branches/tmp/jpeach-xmetrics/source/include/includes.h branches/tmp/jpeach-xmetrics/source/include/popt_common.h branches/tmp/jpeach-xmetrics/source/include/rpc_samr.h branches/tmp/jpeach-xmetrics/source/include/smb.h branches/tmp/jpeach-xmetrics/source/include/smbldap.h branches/tmp/jpeach-xmetrics/source/include/talloc.h branches/tmp/jpeach-xmetrics/source/lib/debug.c branches/tmp/jpeach-xmetrics/source/lib/gencache.c branches/tmp/jpeach-xmetrics/source/lib/getsmbpass.c branches/tmp/jpeach-xmetrics/source/lib/ldap_escape.c branches/tmp/jpeach-xmetrics/source/lib/messages.c branches/tmp/jpeach-xmetrics/source/lib/popt_common.c branches/tmp/jpeach-xmetrics/source/lib/privileges.c branches/tmp/jpeach-xmetrics/source/lib/readline.c branches/tmp/jpeach-xmetrics/source/lib/replace.c branches/tmp/jpeach-xmetrics/source/lib/smbldap.c branches/tmp/jpeach-xmetrics/source/lib/talloc.c branches/tmp/jpeach-xmetrics/source/lib/time.c branches/tmp/jpeach-xmetrics/source/lib/util.c branches/tmp/jpeach-xmetrics/source/lib/util_sid.c branches/tmp/jpeach-xmetrics/source/lib/util_str.c branches/tmp/jpeach-xmetrics/source/lib/xfile.c branches/tmp/jpeach-xmetrics/source/libads/ads_struct.c branches/tmp/jpeach-xmetrics/source/libads/kerberos.c branches/tmp/jpeach-xmetrics/source/libads/krb5_setpw.c branches/tmp/jpeach-xmetrics/source/libads/ldap.c branches/tmp/jpeach-xmetrics/source/libads/ldap_printer.c branches/tmp/jpeach-xmetrics/source/libads/ldap_schema.c branches/tmp/jpeach-xmetrics/source/libads/util.c branches/tmp/jpeach-xmetrics/source/libsmb/asn1.c branches/tmp/jpeach-xmetrics/source/libsmb/clidfs.c branches/tmp/jpeach-xmetrics/source/libsmb/clientgen.c branches/tmp/jpeach-xmetrics/source/libsmb/clikrb5.c branches/tmp/jpeach-xmetrics/source/libsmb/clilist.c branches/tmp/jpeach-xmetrics/source/libsmb/clispnego.c branches/tmp/jpeach-xmetrics/source/libsmb/libsmb_compat.c branches/tmp/jpeach-xmetrics/source/libsmb/libsmbclient.c branches/tmp/jpeach-xmetrics/source/libsmb/trusts_util.c branches/tmp/jpeach-xmetrics/source/locking/locking.c branches/tmp/jpeach-xmetrics/source/locking/posix.c branches/tmp/jpeach-xmetrics/source/modules/vfs_full_audit.c branches/tmp/jpeach-xmetrics/source/modules/vfs_recycle.c branches/tmp/jpeach-xmetrics/source/nmbd/nmbd_become_dmb.c branches/tmp/jpeach-xmetrics/source/nmbd/nmbd_namelistdb.c branches/tmp/jpeach-xmetrics/source/nmbd/nmbd_responserecordsdb.c branches/tmp/jpeach-xmetrics/source/nmbd/nmbd_subnetdb.c branches/tmp/jpeach-xmetrics/source/nmbd/nmbd_winsserver.c branches/tmp/jpeach-xmetrics/source/nsswitch/pam_winbind.c branches/tmp/jpeach-xmetrics/source/nsswitch/wbinfo.c branches/tmp/jpeach-xmetrics/source/nsswitch/winbindd.c branches/tmp/jpeach-xmetrics/source/nsswitch/winbindd_ads.c branches/tmp/jpeach-xmetrics/source/nsswitch/winbindd_cache.c branches/tmp/jpeach-xmetrics/source/nsswitch/winbindd_cm.c branches/tmp/jpeach-xmetrics/source/nsswitch/winbindd_group.c branches/tmp/jpeach-xmetrics/source/nsswitch/winbindd_misc.c branches/tmp/jpeach-xmetrics/source/nsswitch/winbindd_nss.h branches/tmp/jpeach-xmetrics/source/nsswitch/winbindd_pam.c branches/tmp/jpeach-xmetrics/source/nsswitch/winbindd_passdb.c branches/tmp/jpeach-xmetrics/source/nsswitch/winbindd_rpc.c branches/tmp/jpeach-xmetrics/source/nsswitch/winbindd_util.c branches/tmp/jpeach-xmetrics/source/pam_smbpass/pam_smb_acct.c branches/tmp/jpeach-xmetrics/source/pam_smbpass/pam_smb_auth.c branches/tmp/jpeach-xmetrics/source/param/loadparm.c branches/tmp/jpeach-xmetrics/source/passdb/login_cache.c branches/tmp/jpeach-xmetrics/source/passdb/lookup_sid.c
svn commit: samba r16405 - in branches/SAMBA_4_0/source/torture/smb2: .
Author: metze Date: 2006-06-20 07:02:19 + (Tue, 20 Jun 2006) New Revision: 16405 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16405 Log: fix compiler warning of missing smb2_handle metze Modified: branches/SAMBA_4_0/source/torture/smb2/smb2.c Changeset: Modified: branches/SAMBA_4_0/source/torture/smb2/smb2.c === --- branches/SAMBA_4_0/source/torture/smb2/smb2.c 2006-06-20 06:43:06 UTC (rev 16404) +++ branches/SAMBA_4_0/source/torture/smb2/smb2.c 2006-06-20 07:02:19 UTC (rev 16405) @@ -19,8 +19,10 @@ */ #include includes.h +#include libcli/smb2/smb2.h +#include libcli/smb2/smb2_calls.h + #include torture/torture.h -#include libcli/smb2/smb2.h #include torture/smb2/proto.h NTSTATUS torture_smb2_init(void)
svn commit: samba r16406 - in branches/SAMBA_4_0/source: libcli/smb2 torture/smb2
Author: metze Date: 2006-06-20 07:03:53 + (Tue, 20 Jun 2006) New Revision: 16406 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16406 Log: use the generic smb_handle in smb2_getinfo/smb2_setinfo metze Modified: branches/SAMBA_4_0/source/libcli/smb2/getinfo.c branches/SAMBA_4_0/source/libcli/smb2/setinfo.c branches/SAMBA_4_0/source/libcli/smb2/smb2_calls.h branches/SAMBA_4_0/source/torture/smb2/scan.c Changeset: Modified: branches/SAMBA_4_0/source/libcli/smb2/getinfo.c === --- branches/SAMBA_4_0/source/libcli/smb2/getinfo.c 2006-06-20 07:02:19 UTC (rev 16405) +++ branches/SAMBA_4_0/source/libcli/smb2/getinfo.c 2006-06-20 07:03:53 UTC (rev 16406) @@ -44,7 +44,7 @@ SIVAL(req-out.body, 0x0C, io-in.unknown2); SIVAL(req-out.body, 0x10, io-in.flags); SIVAL(req-out.body, 0x14, io-in.flags2); - smb2_push_handle(req-out.body+0x18, io-in.handle); + smb2_push_handle(req-out.body+0x18, io-in.file.handle); smb2_transport_send(req); @@ -118,7 +118,7 @@ ZERO_STRUCT(b); b.in.max_response_size = 0x1; - b.in.handle= io-generic.in.file.handle; + b.in.file.handle = io-generic.in.file.handle; b.in.level = smb2_level; if (io-generic.level == RAW_FILEINFO_SEC_DESC) { @@ -174,7 +174,7 @@ ZERO_STRUCT(b); b.in.max_response_size = 0x1; - b.in.handle= io-generic.handle; + b.in.file.handle = io-generic.handle; b.in.level = smb2_level; return smb2_getinfo_send(tree, b); Modified: branches/SAMBA_4_0/source/libcli/smb2/setinfo.c === --- branches/SAMBA_4_0/source/libcli/smb2/setinfo.c 2006-06-20 07:02:19 UTC (rev 16405) +++ branches/SAMBA_4_0/source/libcli/smb2/setinfo.c 2006-06-20 07:03:53 UTC (rev 16406) @@ -45,7 +45,7 @@ } SIVAL(req-out.body, 0x0C, io-in.flags); - smb2_push_handle(req-out.body+0x10, io-in.handle); + smb2_push_handle(req-out.body+0x10, io-in.file.handle); smb2_transport_send(req); @@ -92,7 +92,7 @@ ZERO_STRUCT(b); b.in.level = smb2_level; - b.in.handle= io-generic.in.file.handle; + b.in.file.handle = io-generic.in.file.handle; if (!smb_raw_setfileinfo_passthru(tree, io-generic.level, io, b.in.blob)) { return NULL; } Modified: branches/SAMBA_4_0/source/libcli/smb2/smb2_calls.h === --- branches/SAMBA_4_0/source/libcli/smb2/smb2_calls.h 2006-06-20 07:02:19 UTC (rev 16405) +++ branches/SAMBA_4_0/source/libcli/smb2/smb2_calls.h 2006-06-20 07:03:53 UTC (rev 16406) @@ -75,7 +75,7 @@ uint32_t unknown2; uint32_t flags; /* level specific */ uint32_t flags2; /* used by all_eas level */ - struct smb2_handle handle; + union smb_handle file; } in; struct { @@ -93,7 +93,7 @@ struct { uint16_t level; uint32_t flags; - struct smb2_handle handle; + union smb_handle file; DATA_BLOB blob; } in; }; Modified: branches/SAMBA_4_0/source/torture/smb2/scan.c === --- branches/SAMBA_4_0/source/torture/smb2/scan.c 2006-06-20 07:02:19 UTC (rev 16405) +++ branches/SAMBA_4_0/source/torture/smb2/scan.c 2006-06-20 07:03:53 UTC (rev 16406) @@ -74,7 +74,7 @@ for (i=0;i0x100;i++) { io.in.level = (i8) | c; - io.in.handle = fhandle; + io.in.file.handle = fhandle; status = smb2_getinfo(tree, mem_ctx, io); if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS) !NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER) @@ -84,7 +84,7 @@ dump_data(1, io.out.blob.data, io.out.blob.length); } - io.in.handle = dhandle; + io.in.file.handle = dhandle; status = smb2_getinfo(tree, mem_ctx, io); if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS) !NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER) @@ -132,7 +132,7 @@ for (c=1;c5;c++) { for (i=0;i0x100;i++) { io.in.level = (i8) | c; - io.in.handle = handle; + io.in.file.handle = handle; status = smb2_setinfo(tree, io); if (!NT_STATUS_EQUAL(status,
svn commit: samba r16407 - in branches/SAMBA_4_0/source/smb_server/smb2: .
Author: metze Date: 2006-06-20 07:05:51 + (Tue, 20 Jun 2006) New Revision: 16407 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16407 Log: add parsing code the SMB2 GetInfo in the server metze Added: branches/SAMBA_4_0/source/smb_server/smb2/fileinfo.c Modified: branches/SAMBA_4_0/source/smb_server/smb2/config.mk branches/SAMBA_4_0/source/smb_server/smb2/fileio.c Changeset: Modified: branches/SAMBA_4_0/source/smb_server/smb2/config.mk === --- branches/SAMBA_4_0/source/smb_server/smb2/config.mk 2006-06-20 07:03:53 UTC (rev 16406) +++ branches/SAMBA_4_0/source/smb_server/smb2/config.mk 2006-06-20 07:05:51 UTC (rev 16407) @@ -8,6 +8,7 @@ sesssetup.o \ tcon.o \ fileio.o \ + fileinfo.o \ keepalive.o PUBLIC_DEPENDENCIES = \ ntvfs LIBPACKET LIBCLI_SMB2 Added: branches/SAMBA_4_0/source/smb_server/smb2/fileinfo.c === --- branches/SAMBA_4_0/source/smb_server/smb2/fileinfo.c2006-06-20 07:03:53 UTC (rev 16406) +++ branches/SAMBA_4_0/source/smb_server/smb2/fileinfo.c2006-06-20 07:05:51 UTC (rev 16407) @@ -0,0 +1,77 @@ +/* + Unix SMB2 implementation. + + Copyright (C) Stefan Metzmacher 2006 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include includes.h +#include libcli/smb2/smb2.h +#include libcli/smb2/smb2_calls.h +#include smb_server/smb_server.h +#include smb_server/service_smb_proto.h +#include smb_server/smb2/smb2_server.h +#include ntvfs/ntvfs.h + +static void smb2srv_getinfo_send(struct ntvfs_request *ntvfs) +{ + struct smb2srv_request *req; + struct smb2_getinfo *info; + + SMB2SRV_CHECK_ASYNC_STATUS(info, struct smb2_getinfo); + SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x08, True, 0)); + + /* TODO: this is maybe a o16s32_blob */ + SMB2SRV_CHECK(smb2_push_o16s16_blob(req-out, 0x02, info-out.blob)); + SSVAL(req-out.body,0x06, 0); + + smb2srv_send_reply(req); +} + +static NTSTATUS smb2srv_getinfo_backend(struct ntvfs_request *ntvfs, struct smb2_getinfo *info) +{ + return NT_STATUS_NOT_IMPLEMENTED; +} + +void smb2srv_getinfo_recv(struct smb2srv_request *req) +{ + struct smb2_getinfo *info; + + SMB2SRV_CHECK_BODY_SIZE(req, 0x30, True); + SMB2SRV_TALLOC_IO_PTR(info, struct smb2_getinfo); + SMB2SRV_SETUP_NTVFS_REQUEST(smb2srv_getinfo_send, NTVFS_ASYNC_STATE_MAY_ASYNC); + + info-in.level = SVAL(req-in.body, 0x02); + info-in.max_response_size = IVAL(req-in.body, 0x04); + info-in.unknown1 = IVAL(req-in.body, 0x08); + info-in.unknown2 = IVAL(req-in.body, 0x0C); + info-in.flags = IVAL(req-in.body, 0x10); + info-in.flags2 = IVAL(req-in.body, 0x14); + info-in.file.ntvfs = smb2srv_pull_handle(req, req-in.body, 0x18); + + SMB2SRV_CHECK_FILE_HANDLE(info-in.file.ntvfs); + SMB2SRV_CALL_NTVFS_BACKEND(smb2srv_getinfo_backend(req-ntvfs, info)); +} + +void smb2srv_setinfo_recv(struct smb2srv_request *req) +{ + smb2srv_send_error(req, NT_STATUS_NOT_IMPLEMENTED); +} + +void smb2srv_break_recv(struct smb2srv_request *req) +{ + smb2srv_send_error(req, NT_STATUS_NOT_IMPLEMENTED); +} Modified: branches/SAMBA_4_0/source/smb_server/smb2/fileio.c === --- branches/SAMBA_4_0/source/smb_server/smb2/fileio.c 2006-06-20 07:03:53 UTC (rev 16406) +++ branches/SAMBA_4_0/source/smb_server/smb2/fileio.c 2006-06-20 07:05:51 UTC (rev 16407) @@ -251,18 +251,3 @@ { smb2srv_send_error(req, NT_STATUS_NOT_IMPLEMENTED); } - -void smb2srv_getinfo_recv(struct smb2srv_request *req) -{ - smb2srv_send_error(req, NT_STATUS_NOT_IMPLEMENTED); -} - -void smb2srv_setinfo_recv(struct smb2srv_request *req) -{ - smb2srv_send_error(req, NT_STATUS_NOT_IMPLEMENTED); -} - -void smb2srv_break_recv(struct smb2srv_request *req) -{ - smb2srv_send_error(req, NT_STATUS_NOT_IMPLEMENTED); -}
svn commit: samba r16408 - in branches/tmp/jpeach-xmetrics/source: . include modules smbd
Author: jpeach Date: 2006-06-20 07:08:38 + (Tue, 20 Jun 2006) New Revision: 16408 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16408 Log: svn merge -r16213:16214 ../../trunk svn merge -r15928:15929 ../../trunk svn merge -r15973:15974 ../../trunk svn merge -r16054:16055 ../../trunk Added: branches/tmp/jpeach-xmetrics/source/modules/vfs_default.c Modified: branches/tmp/jpeach-xmetrics/source/Makefile.in branches/tmp/jpeach-xmetrics/source/aclocal.m4 branches/tmp/jpeach-xmetrics/source/configure.in branches/tmp/jpeach-xmetrics/source/include/smb.h branches/tmp/jpeach-xmetrics/source/include/vfs.h branches/tmp/jpeach-xmetrics/source/include/vfs_macros.h branches/tmp/jpeach-xmetrics/source/modules/vfs_afsacl.c branches/tmp/jpeach-xmetrics/source/modules/vfs_audit.c branches/tmp/jpeach-xmetrics/source/modules/vfs_cap.c branches/tmp/jpeach-xmetrics/source/modules/vfs_catia.c branches/tmp/jpeach-xmetrics/source/modules/vfs_default_quota.c branches/tmp/jpeach-xmetrics/source/modules/vfs_expand_msdfs.c branches/tmp/jpeach-xmetrics/source/modules/vfs_extd_audit.c branches/tmp/jpeach-xmetrics/source/modules/vfs_fake_perms.c branches/tmp/jpeach-xmetrics/source/modules/vfs_full_audit.c branches/tmp/jpeach-xmetrics/source/modules/vfs_netatalk.c branches/tmp/jpeach-xmetrics/source/modules/vfs_readonly.c branches/tmp/jpeach-xmetrics/source/modules/vfs_recycle.c branches/tmp/jpeach-xmetrics/source/modules/vfs_shadow_copy.c branches/tmp/jpeach-xmetrics/source/smbd/vfs-wrap.c branches/tmp/jpeach-xmetrics/source/smbd/vfs.c Changeset: Sorry, the patch is too large (4442 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16408
Re: svn commit: samba r16397 - in branches/SAMBA_3_0/source/smbd: .
On Tue, 2006-06-20 at 02:38 +, [EMAIL PROTECTED] wrote: Author: jra Date: 2006-06-20 02:38:28 + (Tue, 20 Jun 2006) New Revision: 16397 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16397 Log: Fix Klocwork #11767 and drasticly simplify the logic in smbd/process.c. All interested (Volker, Jerry, James etc). PLEASE REVIEW THIS CHANGE. The logic should be identical but *much* easier to follow and change (and shouldn't confuse Klockwork :-). You lost the AS_GUEST flag clearing on purpose? -- James Peach | [EMAIL PROTECTED]
svn commit: samba r16409 - branches/SAMBA_3_0/source/registry branches/SAMBA_3_0/source/rpc_server branches/SAMBA_3_0/source/utils trunk/source/registry trunk/source/rpc_server trunk/source/utils
Author: vlendec Date: 2006-06-20 09:16:53 + (Tue, 20 Jun 2006) New Revision: 16409 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16409 Log: Fix Klocwork ID's. 1177 In reg_perfcount.c: 1200 1202 1203 1204 In regfio.c: 1243 1245 1246 1247 1251 Jerry, the reg_perfcount and regfio.c ones, can you take a look please? This is really your code, and I'm not sure I did the right thing to return an error. smbcacls.c: 1377 srv_eventlog_nt.c: 1415 1416 1417 srv_lsa_nt.c: 1420 1421 srv_netlog_nt.c: 1429 srv_samr_nt: 1458 1459 1460 Volker Volker Modified: branches/SAMBA_3_0/source/registry/reg_perfcount.c branches/SAMBA_3_0/source/registry/regfio.c branches/SAMBA_3_0/source/rpc_server/srv_eventlog_nt.c branches/SAMBA_3_0/source/rpc_server/srv_lsa_nt.c branches/SAMBA_3_0/source/rpc_server/srv_netlog_nt.c branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c branches/SAMBA_3_0/source/utils/profiles.c branches/SAMBA_3_0/source/utils/smbcacls.c trunk/source/registry/reg_perfcount.c trunk/source/registry/regfio.c trunk/source/rpc_server/srv_eventlog_nt.c trunk/source/rpc_server/srv_lsa_nt.c trunk/source/rpc_server/srv_netlog_nt.c trunk/source/rpc_server/srv_samr_nt.c trunk/source/utils/profiles.c trunk/source/utils/smbcacls.c Changeset: Sorry, the patch is too large (607 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16409
svn commit: samba r16410 - in branches/SAMBA_4_0/source/smb_server: . smb2
Author: metze Date: 2006-06-20 09:57:00 + (Tue, 20 Jun 2006) New Revision: 16410 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16410 Log: remove some warnings of talloc_steal() usage without target I only commit this as this is used in a global macro tridge: we should try to get rid of this warning without using (void)talloc_steal(ctx, ptr); everywhere!!! metze Modified: branches/SAMBA_4_0/source/smb_server/smb2/smb2_server.h branches/SAMBA_4_0/source/smb_server/smb_server.h Changeset: Modified: branches/SAMBA_4_0/source/smb_server/smb2/smb2_server.h === --- branches/SAMBA_4_0/source/smb_server/smb2/smb2_server.h 2006-06-20 09:16:53 UTC (rev 16409) +++ branches/SAMBA_4_0/source/smb_server/smb2/smb2_server.h 2006-06-20 09:57:00 UTC (rev 16410) @@ -108,7 +108,7 @@ smb2srv_send_error(req, NT_STATUS_NO_MEMORY); \ return; \ } \ - talloc_steal(req-tcon-ntvfs, req); \ + (void)talloc_steal(req-tcon-ntvfs, req); \ req-ntvfs-frontend_data.private_data = req; \ } while (0) Modified: branches/SAMBA_4_0/source/smb_server/smb_server.h === --- branches/SAMBA_4_0/source/smb_server/smb_server.h 2006-06-20 09:16:53 UTC (rev 16409) +++ branches/SAMBA_4_0/source/smb_server/smb_server.h 2006-06-20 09:57:00 UTC (rev 16410) @@ -421,7 +421,7 @@ smbsrv_send_error(req, NT_STATUS_NO_MEMORY); \ return; \ } \ - talloc_steal(req-tcon-ntvfs, req); \ + (void)talloc_steal(req-tcon-ntvfs, req); \ req-ntvfs-frontend_data.private_data = req; \ } while (0)
Re: svn commit: samba r16410 - in branches/SAMBA_4_0/source/smb_server: . smb2
On Tue, 2006-06-20 at 09:57 +, [EMAIL PROTECTED] wrote: Author: metze Date: 2006-06-20 09:57:00 + (Tue, 20 Jun 2006) New Revision: 16410 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16410 Log: remove some warnings of talloc_steal() usage without target I only commit this as this is used in a global macro tridge: we should try to get rid of this warning without using (void)talloc_steal(ctx, ptr); everywhere!!! I think we should really ask whether that return value is ever going to be different from ptr. If it is, we should use the return value everywhere; if it isn't we should probably drop the return value imho. Cheers, Jelmer -- Jelmer Vernooij [EMAIL PROTECTED] - http://samba.org/~jelmer/ signature.asc Description: This is a digitally signed message part
svn commit: samba r16411 - branches/SAMBA_3_0/source/modules trunk/source/modules
Author: vlendec Date: 2006-06-20 11:06:09 + (Tue, 20 Jun 2006) New Revision: 16411 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16411 Log: Fix compilation of vfs_afsacl, thanks to Greszler Szilard for trying Modified: branches/SAMBA_3_0/source/modules/vfs_afsacl.c trunk/source/modules/vfs_afsacl.c Changeset: Modified: branches/SAMBA_3_0/source/modules/vfs_afsacl.c === --- branches/SAMBA_3_0/source/modules/vfs_afsacl.c 2006-06-20 09:57:00 UTC (rev 16410) +++ branches/SAMBA_3_0/source/modules/vfs_afsacl.c 2006-06-20 11:06:09 UTC (rev 16411) @@ -140,23 +140,24 @@ type = SID_NAME_UNKNOWN; if (string_to_sid(sid, name)) { - fstring user, domain; + const char *user, *domain; /* We have to find the type, look up the SID */ - lookup_sid(sid, domain, user, type); + lookup_sid(tmp_talloc_ctx(), sid, + domain, user, type); } } else { - fstring domain, uname; + const char *domain, *uname; char *p; - p = strchr_m(name, lp_winbind_separator()); + p = strchr_m(name, *lp_winbind_separator()); if (p != NULL) { *p = '\\'; } - if (!lookup_name(name, LOOKUP_NAME_FULL, -domain, uname, sid, type)) { + if (!lookup_name(tmp_talloc_ctx(), name, LOOKUP_NAME_ALL, +domain, uname, sid, type)) { DEBUG(10, (Could not find AFS user %s\n, name)); sid_copy(sid, global_sid_NULL); @@ -711,8 +712,7 @@ for (i = 0; i dacl-num_aces; i++) { SEC_ACE *ace = (dacl-ace[i]); - fstring dom_name; - fstring name; + const char *dom_name, *name; enum SID_NAME_USE name_type; char *p; @@ -730,28 +730,28 @@ if (sid_compare(ace-trustee, global_sid_Builtin_Administrators) == 0) { - fstrcpy(name, system:administrators); + name = system:administrators; } else if (sid_compare(ace-trustee, global_sid_World) == 0) { - fstrcpy(name, system:anyuser); + name = system:anyuser; } else if (sid_compare(ace-trustee, global_sid_Authenticated_Users) == 0) { - fstrcpy(name, system:authuser); + name = system:authuser; } else if (sid_compare(ace-trustee, global_sid_Builtin_Backup_Operators) == 0) { - fstrcpy(name, system:backup); + name = system:backup; } else { - if (!lookup_sid(ace-trustee, - dom_name, name, name_type)) { + if (!lookup_sid(tmp_talloc_ctx(), ace-trustee, + dom_name, name, name_type)) { DEBUG(1, (AFSACL: Could not lookup SID %s on file %s\n, sid_string_static(ace-trustee), filename)); continue; @@ -759,18 +759,26 @@ if ( (name_type == SID_NAME_USER) || (name_type == SID_NAME_DOM_GRP) || -(name_type == SID_NAME_ALIAS) ) { - fstring only_username; - fstrcpy(only_username, name); - fstr_sprintf(name, %s%s%s, -dom_name, lp_winbind_separator(), -only_username); - strlower_m(name); +(name_type == SID_NAME_ALIAS) ) { + char *tmp; + tmp = talloc_asprintf(tmp_talloc_ctx(), %s%s%s, + dom_name, lp_winbind_separator(), + name); + if (tmp == NULL) { + return False; + } + strlower_m(tmp); + name = tmp; } if (sidpts) { /* Expect all users/groups in pts as SIDs */ -
svn commit: samba r16412 - in branches/tmp/vl-messaging/source: . auth client include lib libads libsmb locking modules nmbd nsswitch pam_smbpass param passdb printing registry rpc_client rpc_parse rp
Author: ab Date: 2006-06-20 11:13:32 + (Tue, 20 Jun 2006) New Revision: 16412 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16412 Log: Merge with trunk -r 16225:16363 Added: branches/tmp/vl-messaging/source/script/tests/tests_smbclient_s3.sh Modified: branches/tmp/vl-messaging/source/aclocal.m4 branches/tmp/vl-messaging/source/auth/auth_sam.c branches/tmp/vl-messaging/source/auth/auth_server.c branches/tmp/vl-messaging/source/auth/auth_util.c branches/tmp/vl-messaging/source/auth/pass_check.c branches/tmp/vl-messaging/source/client/client.c branches/tmp/vl-messaging/source/client/clitar.c branches/tmp/vl-messaging/source/client/mount.cifs.c branches/tmp/vl-messaging/source/client/smbctool.c branches/tmp/vl-messaging/source/configure.in branches/tmp/vl-messaging/source/include/ads.h branches/tmp/vl-messaging/source/include/includes.h branches/tmp/vl-messaging/source/lib/afs.c branches/tmp/vl-messaging/source/lib/debug.c branches/tmp/vl-messaging/source/lib/gencache.c branches/tmp/vl-messaging/source/lib/getsmbpass.c branches/tmp/vl-messaging/source/lib/messages_tdb.c branches/tmp/vl-messaging/source/lib/privileges.c branches/tmp/vl-messaging/source/lib/readline.c branches/tmp/vl-messaging/source/lib/replace.c branches/tmp/vl-messaging/source/lib/substitute.c branches/tmp/vl-messaging/source/lib/time.c branches/tmp/vl-messaging/source/lib/util.c branches/tmp/vl-messaging/source/lib/util_sid.c branches/tmp/vl-messaging/source/lib/util_str.c branches/tmp/vl-messaging/source/lib/xfile.c branches/tmp/vl-messaging/source/libads/kerberos.c branches/tmp/vl-messaging/source/libads/krb5_setpw.c branches/tmp/vl-messaging/source/libads/ldap.c branches/tmp/vl-messaging/source/libads/ldap_printer.c branches/tmp/vl-messaging/source/libsmb/asn1.c branches/tmp/vl-messaging/source/libsmb/clidfs.c branches/tmp/vl-messaging/source/libsmb/clientgen.c branches/tmp/vl-messaging/source/libsmb/clikrb5.c branches/tmp/vl-messaging/source/libsmb/clispnego.c branches/tmp/vl-messaging/source/libsmb/libsmb_compat.c branches/tmp/vl-messaging/source/libsmb/libsmbclient.c branches/tmp/vl-messaging/source/libsmb/trusts_util.c branches/tmp/vl-messaging/source/locking/locking.c branches/tmp/vl-messaging/source/locking/posix.c branches/tmp/vl-messaging/source/modules/vfs_default.c branches/tmp/vl-messaging/source/modules/vfs_expand_msdfs.c branches/tmp/vl-messaging/source/modules/vfs_full_audit.c branches/tmp/vl-messaging/source/modules/vfs_recycle.c branches/tmp/vl-messaging/source/nmbd/nmbd_namelistdb.c branches/tmp/vl-messaging/source/nmbd/nmbd_subnetdb.c branches/tmp/vl-messaging/source/nmbd/nmbd_winsserver.c branches/tmp/vl-messaging/source/nsswitch/winbindd_ads.c branches/tmp/vl-messaging/source/nsswitch/winbindd_cache.c branches/tmp/vl-messaging/source/nsswitch/winbindd_cm.c branches/tmp/vl-messaging/source/nsswitch/winbindd_group.c branches/tmp/vl-messaging/source/nsswitch/winbindd_misc.c branches/tmp/vl-messaging/source/nsswitch/winbindd_rpc.c branches/tmp/vl-messaging/source/nsswitch/winbindd_user.c branches/tmp/vl-messaging/source/pam_smbpass/pam_smb_acct.c branches/tmp/vl-messaging/source/pam_smbpass/pam_smb_auth.c branches/tmp/vl-messaging/source/param/loadparm.c branches/tmp/vl-messaging/source/passdb/login_cache.c branches/tmp/vl-messaging/source/passdb/passdb.c branches/tmp/vl-messaging/source/passdb/pdb_get_set.c branches/tmp/vl-messaging/source/passdb/pdb_interface.c branches/tmp/vl-messaging/source/passdb/pdb_ldap.c branches/tmp/vl-messaging/source/passdb/pdb_tdb.c branches/tmp/vl-messaging/source/printing/lpq_parse.c branches/tmp/vl-messaging/source/printing/nt_printing.c branches/tmp/vl-messaging/source/printing/print_generic.c branches/tmp/vl-messaging/source/printing/printing.c branches/tmp/vl-messaging/source/printing/printing_db.c branches/tmp/vl-messaging/source/registry/reg_perfcount.c branches/tmp/vl-messaging/source/registry/regfio.c branches/tmp/vl-messaging/source/rpc_client/cli_ds.c branches/tmp/vl-messaging/source/rpc_client/cli_lsarpc.c branches/tmp/vl-messaging/source/rpc_client/cli_pipe.c branches/tmp/vl-messaging/source/rpc_client/cli_samr.c branches/tmp/vl-messaging/source/rpc_client/cli_srvsvc.c branches/tmp/vl-messaging/source/rpc_parse/parse_lsa.c branches/tmp/vl-messaging/source/rpc_parse/parse_misc.c branches/tmp/vl-messaging/source/rpc_parse/parse_ntsvcs.c branches/tmp/vl-messaging/source/rpc_parse/parse_prs.c branches/tmp/vl-messaging/source/rpc_parse/parse_samr.c branches/tmp/vl-messaging/source/rpc_parse/parse_spoolss.c branches/tmp/vl-messaging/source/rpc_server/srv_eventlog_nt.c branches/tmp/vl-messaging/source/rpc_server/srv_lsa_nt.c branches/tmp/vl-messaging/source/rpc_server/srv_netlog_nt.c
svn commit: samba r16413 - in branches/tmp/vl-messaging/source/modules: .
Author: ab Date: 2006-06-20 11:24:31 + (Tue, 20 Jun 2006) New Revision: 16413 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16413 Log: Merge with trunk -r 16410:16412. In fact, my previous commit message was bogus -- I had merged up to 16410, not 16363. Modified: branches/tmp/vl-messaging/source/modules/vfs_afsacl.c Changeset: Modified: branches/tmp/vl-messaging/source/modules/vfs_afsacl.c === --- branches/tmp/vl-messaging/source/modules/vfs_afsacl.c 2006-06-20 11:13:32 UTC (rev 16412) +++ branches/tmp/vl-messaging/source/modules/vfs_afsacl.c 2006-06-20 11:24:31 UTC (rev 16413) @@ -140,23 +140,24 @@ type = SID_NAME_UNKNOWN; if (string_to_sid(sid, name)) { - fstring user, domain; + const char *user, *domain; /* We have to find the type, look up the SID */ - lookup_sid(sid, domain, user, type); + lookup_sid(tmp_talloc_ctx(), sid, + domain, user, type); } } else { - fstring domain, uname; + const char *domain, *uname; char *p; - p = strchr_m(name, lp_winbind_separator()); + p = strchr_m(name, *lp_winbind_separator()); if (p != NULL) { *p = '\\'; } - if (!lookup_name(name, LOOKUP_NAME_FULL, -domain, uname, sid, type)) { + if (!lookup_name(tmp_talloc_ctx(), name, LOOKUP_NAME_ALL, +domain, uname, sid, type)) { DEBUG(10, (Could not find AFS user %s\n, name)); sid_copy(sid, global_sid_NULL); @@ -711,8 +712,7 @@ for (i = 0; i dacl-num_aces; i++) { SEC_ACE *ace = (dacl-ace[i]); - fstring dom_name; - fstring name; + const char *dom_name, *name; enum SID_NAME_USE name_type; char *p; @@ -730,28 +730,28 @@ if (sid_compare(ace-trustee, global_sid_Builtin_Administrators) == 0) { - fstrcpy(name, system:administrators); + name = system:administrators; } else if (sid_compare(ace-trustee, global_sid_World) == 0) { - fstrcpy(name, system:anyuser); + name = system:anyuser; } else if (sid_compare(ace-trustee, global_sid_Authenticated_Users) == 0) { - fstrcpy(name, system:authuser); + name = system:authuser; } else if (sid_compare(ace-trustee, global_sid_Builtin_Backup_Operators) == 0) { - fstrcpy(name, system:backup); + name = system:backup; } else { - if (!lookup_sid(ace-trustee, - dom_name, name, name_type)) { + if (!lookup_sid(tmp_talloc_ctx(), ace-trustee, + dom_name, name, name_type)) { DEBUG(1, (AFSACL: Could not lookup SID %s on file %s\n, sid_string_static(ace-trustee), filename)); continue; @@ -759,18 +759,26 @@ if ( (name_type == SID_NAME_USER) || (name_type == SID_NAME_DOM_GRP) || -(name_type == SID_NAME_ALIAS) ) { - fstring only_username; - fstrcpy(only_username, name); - fstr_sprintf(name, %s%s%s, -dom_name, lp_winbind_separator(), -only_username); - strlower_m(name); +(name_type == SID_NAME_ALIAS) ) { + char *tmp; + tmp = talloc_asprintf(tmp_talloc_ctx(), %s%s%s, + dom_name, lp_winbind_separator(), + name); + if (tmp == NULL) { + return False; + } + strlower_m(tmp); + name = tmp; } if (sidpts) { /* Expect all users/groups in pts as SIDs */ -
svn commit: samba r16414 - in branches/tmp/vl-messaging/source/lib: .
Author: ab Date: 2006-06-20 12:02:09 + (Tue, 20 Jun 2006) New Revision: 16414 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16414 Log: Remove copypaste error Modified: branches/tmp/vl-messaging/source/lib/messages_tdb.c Changeset: Modified: branches/tmp/vl-messaging/source/lib/messages_tdb.c === --- branches/tmp/vl-messaging/source/lib/messages_tdb.c 2006-06-20 11:24:31 UTC (rev 16413) +++ branches/tmp/vl-messaging/source/lib/messages_tdb.c 2006-06-20 12:02:09 UTC (rev 16414) @@ -364,11 +364,6 @@ return True; } -/* NULL pointer means implicit length zero. */ -if (!buf) { -SMB_ASSERT(len == 0); -} - /* * Block and unblock receiving of messages. Allows removal of race conditions * when doing a fork and changing message disposition.
svn commit: samba r16415 - branches/SAMBA_3_0/source trunk/source
Author: gd Date: 2006-06-20 12:20:11 + (Tue, 20 Jun 2006) New Revision: 16415 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16415 Log: Also delete object files from iniparser. Guenther Modified: branches/SAMBA_3_0/source/Makefile.in trunk/source/Makefile.in Changeset: Modified: branches/SAMBA_3_0/source/Makefile.in === --- branches/SAMBA_3_0/source/Makefile.in 2006-06-20 12:02:09 UTC (rev 16414) +++ branches/SAMBA_3_0/source/Makefile.in 2006-06-20 12:20:11 UTC (rev 16415) @@ -1600,7 +1600,7 @@ $(TOPFILES) $(BIN_PROGS) $(SBIN_PROGS) $(ROOT_SBIN_PROGS) \ $(MODULES) $(TORTURE_PROGS) $(LIBSMBCLIENT) \ $(LIBSMBSHAREMODES) $(EVERYTHING_PROGS) $(LIBMSRPC) \ - .headers.stamp + .headers.stamp */src/*.o */src/[EMAIL PROTECTED]@ -rm -rf t_dir # Making this target will just make sure that the prototype files Modified: trunk/source/Makefile.in === --- trunk/source/Makefile.in2006-06-20 12:02:09 UTC (rev 16414) +++ trunk/source/Makefile.in2006-06-20 12:20:11 UTC (rev 16415) @@ -1648,7 +1648,7 @@ $(TOPFILES) $(BIN_PROGS) $(SBIN_PROGS) $(ROOT_SBIN_PROGS) \ $(MODULES) $(TORTURE_PROGS) $(LIBSMBCLIENT) \ $(LIBSMBSHAREMODES) $(EVERYTHING_PROGS) $(LIBMSRPC) \ - .headers.stamp + .headers.stamp */src/*.o */src/[EMAIL PROTECTED]@ -rm -rf t_dir # Making this target will just make sure that the prototype files
svn commit: samba r16416 - in branches/tmp/vl-messaging/source: . include lib param
Author: ab Date: 2006-06-20 12:30:50 + (Tue, 20 Jun 2006) New Revision: 16416 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16416 Log: TCP-based messaging backend based on Aleksey Fedoseev [EMAIL PROTECTED] work. It adds new TCP stream backend which allows smbds to communicate across network. Next step is to use it to share locking and other information across processes. The idea explored in this code is based on vl-cluster branch which Volker started some time ago. Also remove wrong copyrights from messages_stream.c as they were copied by cutpaste from messages.c with GPL header. The code in messages_stream.c is really new and not copied over from messages.c. Modified: branches/tmp/vl-messaging/source/configure.in branches/tmp/vl-messaging/source/include/messages.h branches/tmp/vl-messaging/source/include/smb.h branches/tmp/vl-messaging/source/lib/messages.c branches/tmp/vl-messaging/source/lib/messages_dgram.c branches/tmp/vl-messaging/source/lib/messages_socket.c branches/tmp/vl-messaging/source/lib/messages_stream.c branches/tmp/vl-messaging/source/lib/util.c branches/tmp/vl-messaging/source/param/loadparm.c Changeset: Sorry, the patch is too large (1387 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16416
svn commit: samba r16417 - in branches/tmp/vl-messaging/source/lib: .
Author: ab Date: 2006-06-20 14:18:51 + (Tue, 20 Jun 2006) New Revision: 16417 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16417 Log: Fix ping/pong responses as wrong destination was specified in the message. Patch from Aleksey Fedoseev. Modified: branches/tmp/vl-messaging/source/lib/messages_socket.c branches/tmp/vl-messaging/source/lib/messages_stream.c Changeset: Modified: branches/tmp/vl-messaging/source/lib/messages_socket.c === --- branches/tmp/vl-messaging/source/lib/messages_socket.c 2006-06-20 12:30:50 UTC (rev 16416) +++ branches/tmp/vl-messaging/source/lib/messages_socket.c 2006-06-20 14:18:51 UTC (rev 16417) @@ -191,8 +191,9 @@ unsigned int timeout) { if ((enum messaging_type)lp_messaging_type() == MESSAGING_TYPE_STREAM) { - return message_send_pid_stream(pid, msg_type, buf, len, - duplicates_allowed, timeout); + return message_send_pid_stream(procid_self(), pid, + msg_type, buf, len, + duplicates_allowed, timeout); } else { struct message_list *li, *tmp; uint8_t* buffer; Modified: branches/tmp/vl-messaging/source/lib/messages_stream.c === --- branches/tmp/vl-messaging/source/lib/messages_stream.c 2006-06-20 12:30:50 UTC (rev 16416) +++ branches/tmp/vl-messaging/source/lib/messages_stream.c 2006-06-20 14:18:51 UTC (rev 16417) @@ -291,6 +291,7 @@ / static BOOL message_send_pid_stream_internal(struct messaging_client *client, + struct process_id from, int msg_type, const void *buf, size_t len, BOOL duplicates_allowed, @@ -315,7 +316,7 @@ li-msg-len = len + sizeof(struct message_rec); li-msg-msg_version = MESSAGE_VERSION; li-msg-msg_type = msg_type; - li-msg-src = procid_self(); + li-msg-src = from; li-msg-dest = client-pid; if (len 0) { memcpy(buffer + sizeof(struct message_rec), buf, len); @@ -432,7 +433,8 @@ if(mtype == MESSAGING_TYPE_STREAM) { /* Send HELLO message to the new client (local clients only) */ - message_send_pid_stream_internal(result, MSG_HELLO, NULL, 0, False, 0); + message_send_pid_stream_internal(result, procid_self(), + MSG_HELLO, NULL, 0, False, 0); } DEBUG(10, (Connecting to client %s\n, @@ -642,26 +644,27 @@ Send a message to a particular pid. / -BOOL message_send_pid_stream(struct process_id pid, int msg_type, +BOOL message_send_pid_stream(struct process_id from, struct process_id to, +int msg_type, const void *buf, size_t len, BOOL duplicates_allowed, unsigned int timeout) { struct messaging_client *client; - client = find_client(pid); + client = find_client(to); if(client == NULL) { /* Try to connect */ - client = connect_client(pid); + client = connect_client(to); if(client == NULL) { DEBUG(5, (Can't connect to client %s\n, - procid_str_static(pid))); + procid_str_static(to))); return False; } } - return message_send_pid_stream_internal(client, msg_type, + return message_send_pid_stream_internal(client, from, msg_type, buf, len, duplicates_allowed, timeout); } @@ -901,7 +904,7 @@ SAFE_FREE(sname); /* one more copy - from main context to client's context */ - message_send_pid_stream(msg-dest, msg-msg_type, + message_send_pid_stream(msg-src, msg-dest, msg-msg_type,
Re: svn commit: samba r16397 - in branches/SAMBA_3_0/source/smbd: .
On Tue, Jun 20, 2006 at 05:21:24PM +1000, James Peach wrote: On Tue, 2006-06-20 at 02:38 +, [EMAIL PROTECTED] wrote: Author: jra Date: 2006-06-20 02:38:28 + (Tue, 20 Jun 2006) New Revision: 16397 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16397 Log: Fix Klocwork #11767 and drasticly simplify the logic in smbd/process.c. All interested (Volker, Jerry, James etc). PLEASE REVIEW THIS CHANGE. The logic should be identical but *much* easier to follow and change (and shouldn't confuse Klockwork :-). You lost the AS_GUEST flag clearing on purpose? Yes. If you look at the SMB definition table (function mapper) you will see that if AS_USER is set then AS_GUEST is *never* set. This makes that clause impossible to be executed. It probably was needed at an earlier point in the table but it's dead code now. Please check and make sure, but that was my analysis. Jeremy.
svn commit: samba r16418 - in branches/SAMBA_3_0_RELEASE: . source source/client source/lib source/libsmb source/modules source/nsswitch source/passdb source/printing source/registry source/rpc_parse
Author: jerry Date: 2006-06-20 16:59:48 + (Tue, 20 Jun 2006) New Revision: 16418 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16418 Log: Pull in more Klocwork fixes (up to r16415) Modified: branches/SAMBA_3_0_RELEASE/ branches/SAMBA_3_0_RELEASE/WHATSNEW.txt branches/SAMBA_3_0_RELEASE/source/Makefile.in branches/SAMBA_3_0_RELEASE/source/client/mount.cifs.c branches/SAMBA_3_0_RELEASE/source/lib/debug.c branches/SAMBA_3_0_RELEASE/source/lib/messages.c branches/SAMBA_3_0_RELEASE/source/lib/privileges.c branches/SAMBA_3_0_RELEASE/source/lib/util.c branches/SAMBA_3_0_RELEASE/source/lib/util_sid.c branches/SAMBA_3_0_RELEASE/source/lib/util_str.c branches/SAMBA_3_0_RELEASE/source/libsmb/clidfs.c branches/SAMBA_3_0_RELEASE/source/libsmb/clientgen.c branches/SAMBA_3_0_RELEASE/source/libsmb/libsmb_compat.c branches/SAMBA_3_0_RELEASE/source/libsmb/libsmbclient.c branches/SAMBA_3_0_RELEASE/source/libsmb/trusts_util.c branches/SAMBA_3_0_RELEASE/source/modules/vfs_afsacl.c branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_ads.c branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_cache.c branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_cm.c branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_misc.c branches/SAMBA_3_0_RELEASE/source/nsswitch/winbindd_rpc.c branches/SAMBA_3_0_RELEASE/source/passdb/login_cache.c branches/SAMBA_3_0_RELEASE/source/passdb/pdb_get_set.c branches/SAMBA_3_0_RELEASE/source/passdb/pdb_interface.c branches/SAMBA_3_0_RELEASE/source/passdb/pdb_ldap.c branches/SAMBA_3_0_RELEASE/source/printing/nt_printing.c branches/SAMBA_3_0_RELEASE/source/printing/print_generic.c branches/SAMBA_3_0_RELEASE/source/printing/printing_db.c branches/SAMBA_3_0_RELEASE/source/registry/reg_perfcount.c branches/SAMBA_3_0_RELEASE/source/registry/regfio.c branches/SAMBA_3_0_RELEASE/source/rpc_parse/parse_lsa.c branches/SAMBA_3_0_RELEASE/source/rpc_parse/parse_misc.c branches/SAMBA_3_0_RELEASE/source/rpc_parse/parse_ntsvcs.c branches/SAMBA_3_0_RELEASE/source/rpc_parse/parse_prs.c branches/SAMBA_3_0_RELEASE/source/rpc_parse/parse_samr.c branches/SAMBA_3_0_RELEASE/source/rpc_parse/parse_spoolss.c branches/SAMBA_3_0_RELEASE/source/rpc_server/srv_eventlog_nt.c branches/SAMBA_3_0_RELEASE/source/rpc_server/srv_lsa_nt.c branches/SAMBA_3_0_RELEASE/source/rpc_server/srv_netlog_nt.c branches/SAMBA_3_0_RELEASE/source/rpc_server/srv_samr_nt.c branches/SAMBA_3_0_RELEASE/source/smbd/message.c branches/SAMBA_3_0_RELEASE/source/smbd/negprot.c branches/SAMBA_3_0_RELEASE/source/smbd/nttrans.c branches/SAMBA_3_0_RELEASE/source/smbd/process.c branches/SAMBA_3_0_RELEASE/source/smbd/reply.c branches/SAMBA_3_0_RELEASE/source/smbd/sesssetup.c branches/SAMBA_3_0_RELEASE/source/utils/net_rpc.c branches/SAMBA_3_0_RELEASE/source/utils/net_rpc_audit.c branches/SAMBA_3_0_RELEASE/source/utils/net_rpc_join.c branches/SAMBA_3_0_RELEASE/source/utils/net_rpc_registry.c branches/SAMBA_3_0_RELEASE/source/utils/net_rpc_samsync.c branches/SAMBA_3_0_RELEASE/source/utils/net_sam.c branches/SAMBA_3_0_RELEASE/source/utils/net_usershare.c branches/SAMBA_3_0_RELEASE/source/utils/ntlm_auth_diagnostics.c branches/SAMBA_3_0_RELEASE/source/utils/profiles.c branches/SAMBA_3_0_RELEASE/source/utils/smbcacls.c Changeset: Sorry, the patch is too large (3070 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16418
svn commit: samba r16419 - in trunk/source/lib: .
Author: jra Date: 2006-06-20 18:14:19 + (Tue, 20 Jun 2006) New Revision: 16419 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16419 Log: Fix Klocwork #1674. Null deref. Jeremy. Modified: trunk/source/lib/util_unistr.c Changeset: Modified: trunk/source/lib/util_unistr.c === --- trunk/source/lib/util_unistr.c 2006-06-20 16:59:48 UTC (rev 16418) +++ trunk/source/lib/util_unistr.c 2006-06-20 18:14:19 UTC (rev 16419) @@ -98,8 +98,10 @@ /* Get the name of the current locale. */ old_locale = setlocale(LC_ALL, NULL); - /* Save it as it is in static storage. */ - saved_locale = SMB_STRDUP(old_locale); + if (old_locale) { + /* Save it as it is in static storage. */ + saved_locale = SMB_STRDUP(old_locale); + } /* We set back the locale to C to get ASCII-compatible toupper/lower functions. */ setlocale(LC_ALL, C); @@ -139,8 +141,10 @@ #ifdef HAVE_SETLOCALE /* Restore the old locale. */ - setlocale (LC_ALL, saved_locale); - SAFE_FREE(saved_locale); + if (saved_locale) { + setlocale (LC_ALL, saved_locale); + SAFE_FREE(saved_locale); + } #endif }
svn commit: samba r16420 - in branches/SAMBA_3_0/source/lib: .
Author: jra Date: 2006-06-20 18:14:33 + (Tue, 20 Jun 2006) New Revision: 16420 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16420 Log: Fix Klocwork #1674. Null deref. Jeremy. Modified: branches/SAMBA_3_0/source/lib/util_unistr.c Changeset: Modified: branches/SAMBA_3_0/source/lib/util_unistr.c === --- branches/SAMBA_3_0/source/lib/util_unistr.c 2006-06-20 18:14:19 UTC (rev 16419) +++ branches/SAMBA_3_0/source/lib/util_unistr.c 2006-06-20 18:14:33 UTC (rev 16420) @@ -98,8 +98,10 @@ /* Get the name of the current locale. */ old_locale = setlocale(LC_ALL, NULL); - /* Save it as it is in static storage. */ - saved_locale = SMB_STRDUP(old_locale); + if (old_locale) { + /* Save it as it is in static storage. */ + saved_locale = SMB_STRDUP(old_locale); + } /* We set back the locale to C to get ASCII-compatible toupper/lower functions. */ setlocale(LC_ALL, C); @@ -139,8 +141,10 @@ #ifdef HAVE_SETLOCALE /* Restore the old locale. */ - setlocale (LC_ALL, saved_locale); - SAFE_FREE(saved_locale); + if (saved_locale) { + setlocale (LC_ALL, saved_locale); + SAFE_FREE(saved_locale); + } #endif }
svn commit: samba r16421 - in trunk/source/nsswitch: .
Author: jra Date: 2006-06-20 18:30:18 + (Tue, 20 Jun 2006) New Revision: 16421 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16421 Log: winbindd_demote_client isn't used and generates a Klocwork issue (#1844). Remove it Jeremy. Modified: trunk/source/nsswitch/winbindd_util.c Changeset: Modified: trunk/source/nsswitch/winbindd_util.c === --- trunk/source/nsswitch/winbindd_util.c 2006-06-20 18:14:33 UTC (rev 16420) +++ trunk/source/nsswitch/winbindd_util.c 2006-06-20 18:30:18 UTC (rev 16421) @@ -976,14 +976,6 @@ _num_clients--; } -/* Demote a client to be the last in the list */ - -void winbindd_demote_client(struct winbindd_cli_state *cli) -{ - struct winbindd_cli_state *tmp; - DLIST_DEMOTE(_client_list, cli, tmp); -} - /* Close all open clients */ void winbindd_kill_all_clients(void)
svn commit: samba r16422 - in branches/SAMBA_3_0/source/nsswitch: .
Author: jra Date: 2006-06-20 18:30:24 + (Tue, 20 Jun 2006) New Revision: 16422 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16422 Log: winbindd_demote_client isn't used and generates a Klocwork issue (#1844). Remove it Jeremy. Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_util.c Changeset: Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_util.c === --- branches/SAMBA_3_0/source/nsswitch/winbindd_util.c 2006-06-20 18:30:18 UTC (rev 16421) +++ branches/SAMBA_3_0/source/nsswitch/winbindd_util.c 2006-06-20 18:30:24 UTC (rev 16422) @@ -976,14 +976,6 @@ _num_clients--; } -/* Demote a client to be the last in the list */ - -void winbindd_demote_client(struct winbindd_cli_state *cli) -{ - struct winbindd_cli_state *tmp; - DLIST_DEMOTE(_client_list, cli, tmp); -} - /* Close all open clients */ void winbindd_kill_all_clients(void)
svn commit: samba r16423 - in trunk/source: printing registry
Author: jra Date: 2006-06-20 19:06:50 + (Tue, 20 Jun 2006) New Revision: 16423 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16423 Log: Fix possible null deref and a memory leak found by examining Klockwork #1519. get_printer_subkeys() could return zero without initializing it's return pointer arg. Fixed this. Added free of subkey pointer return in registry/reg_printing.c (interesting that neithe Coverity or Klocwork found this one). Jeremy. Modified: trunk/source/printing/nt_printing.c trunk/source/registry/reg_printing.c Changeset: Modified: trunk/source/printing/nt_printing.c === --- trunk/source/printing/nt_printing.c 2006-06-20 18:30:24 UTC (rev 16422) +++ trunk/source/printing/nt_printing.c 2006-06-20 19:06:50 UTC (rev 16423) @@ -2770,6 +2770,8 @@ fstring *subkeys_ptr = NULL; fstring subkeyname; + *subkeys = NULL; + if ( !data ) return 0; Modified: trunk/source/registry/reg_printing.c === --- trunk/source/registry/reg_printing.c2006-06-20 18:30:24 UTC (rev 16422) +++ trunk/source/registry/reg_printing.c2006-06-20 19:06:50 UTC (rev 16423) @@ -346,8 +346,10 @@ if ( lookup_printerkey(printer-info_2-data, subkeyname) == -1 ) { DEBUG(5,(key_printers_store_keys: adding key %s\n, existing_subkeys[i])); - if ( add_new_printer_key( printer-info_2-data, subkeyname ) == -1 ) + if ( add_new_printer_key( printer-info_2-data, subkeyname ) == -1 ) { + SAFE_FREE( existing_subkeys ); return False; + } } } @@ -360,6 +362,8 @@ if ( printer ) free_a_printer( printer, 2 ); + SAFE_FREE( existing_subkeys ); + return True; }
svn commit: samba r16424 - in branches/SAMBA_3_0/source: printing registry
Author: jra Date: 2006-06-20 19:06:57 + (Tue, 20 Jun 2006) New Revision: 16424 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16424 Log: Fix possible null deref and a memory leak found by examining Klockwork #1519. get_printer_subkeys() could return zero without initializing it's return pointer arg. Fixed this. Added free of subkey pointer return in registry/reg_printing.c (interesting that neithe Coverity or Klocwork found this one). Jeremy. Modified: branches/SAMBA_3_0/source/printing/nt_printing.c branches/SAMBA_3_0/source/registry/reg_printing.c Changeset: Modified: branches/SAMBA_3_0/source/printing/nt_printing.c === --- branches/SAMBA_3_0/source/printing/nt_printing.c2006-06-20 19:06:50 UTC (rev 16423) +++ branches/SAMBA_3_0/source/printing/nt_printing.c2006-06-20 19:06:57 UTC (rev 16424) @@ -2767,6 +2767,8 @@ fstring *subkeys_ptr = NULL; fstring subkeyname; + *subkeys = NULL; + if ( !data ) return 0; Modified: branches/SAMBA_3_0/source/registry/reg_printing.c === --- branches/SAMBA_3_0/source/registry/reg_printing.c 2006-06-20 19:06:50 UTC (rev 16423) +++ branches/SAMBA_3_0/source/registry/reg_printing.c 2006-06-20 19:06:57 UTC (rev 16424) @@ -346,8 +346,10 @@ if ( lookup_printerkey(printer-info_2-data, subkeyname) == -1 ) { DEBUG(5,(key_printers_store_keys: adding key %s\n, existing_subkeys[i])); - if ( add_new_printer_key( printer-info_2-data, subkeyname ) == -1 ) + if ( add_new_printer_key( printer-info_2-data, subkeyname ) == -1 ) { + SAFE_FREE( existing_subkeys ); return False; + } } } @@ -360,6 +362,8 @@ if ( printer ) free_a_printer( printer, 2 ); + SAFE_FREE( existing_subkeys ); + return True; }
svn commit: samba r16425 - in trunk/source/web: .
Author: jra Date: 2006-06-20 19:21:07 + (Tue, 20 Jun 2006) New Revision: 16425 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16425 Log: Klocwork #1544, #1545, #1546, #1549, #1550, #1552, #1553, #1554 Jeremy. Modified: trunk/source/web/cgi.c trunk/source/web/swat.c Changeset: Modified: trunk/source/web/cgi.c === --- trunk/source/web/cgi.c 2006-06-20 19:06:57 UTC (rev 16424) +++ trunk/source/web/cgi.c 2006-06-20 19:21:07 UTC (rev 16425) @@ -223,6 +223,7 @@ browser. Also doesn't allow for variables[] containing multiple variables with the same name and the same or different values. ***/ + const char *cgi_variable(const char *name) { int i; @@ -234,6 +235,20 @@ } /*** + Version of the above that can't return a NULL pointer. +***/ + +const char *cgi_variable_nonull(const char *name) +{ + const char *var = cgi_variable(name); + if (var) { + return var; + } else { + return ; + } +} + +/*** tell a browser about a fatal error in the http processing ***/ static void cgi_setup_error(const char *err, const char *header, const char *info) Modified: trunk/source/web/swat.c === --- trunk/source/web/swat.c 2006-06-20 19:06:57 UTC (rev 16424) +++ trunk/source/web/swat.c 2006-06-20 19:21:07 UTC (rev 16425) @@ -515,7 +515,7 @@ while ((parm = lp_next_parameter(snum, i, 1))) { slprintf(label, sizeof(label)-1, parm_%s, make_parm_name(parm-label)); - if ((v = cgi_variable(label))) { + if ((v = cgi_variable(label)) != NULL) { if (parm-flags FLAG_HIDE) continue; commit_parameter(snum, parm, v); } @@ -678,10 +678,10 @@ } if (cgi_variable(Commit)){ - SerType = atoi(cgi_variable(ServerType)); - winstype = atoi(cgi_variable(WINSType)); + SerType = atoi(cgi_variable_nonull(ServerType)); + winstype = atoi(cgi_variable_nonull(WINSType)); have_home = lp_servicenumber(HOMES_NAME); - HomeExpo = atoi(cgi_variable(HomeExpo)); + HomeExpo = atoi(cgi_variable_nonull(HomeExpo)); /* Plain text passwords are too badly broken - use encrypted passwords only */ lp_do_parameter( GLOBAL_SECTION_SNUM, encrypt passwords, Yes); @@ -714,7 +714,7 @@ break; case 2: lp_do_parameter( GLOBAL_SECTION_SNUM, wins support, No ); - lp_do_parameter( GLOBAL_SECTION_SNUM, wins server, cgi_variable(WINSAddr)); + lp_do_parameter( GLOBAL_SECTION_SNUM, wins server, cgi_variable_nonull(WINSAddr)); break; } @@ -839,7 +839,7 @@ } if ( cgi_variable(ViewMode) ) - mode = atoi(cgi_variable(ViewMode)); + mode = atoi(cgi_variable_nonull(ViewMode)); if ( cgi_variable(BasicMode)) mode = 0; if ( cgi_variable(AdvMode)) @@ -915,7 +915,7 @@ printf(table\n); if ( cgi_variable(ViewMode) ) - mode = atoi(cgi_variable(ViewMode)); + mode = atoi(cgi_variable_nonull(ViewMode)); if ( cgi_variable(BasicMode)) mode = 0; if ( cgi_variable(AdvMode)) @@ -1029,7 +1029,7 @@ int local_flags = 0; /* Make sure users name has been specified */ - if (strlen(cgi_variable(SWAT_USER)) == 0) { + if (strlen(cgi_variable_nonull(SWAT_USER)) == 0) { printf(p%s\n, _( Must specify \User Name\ )); return; } @@ -1044,27 +1044,27 @@ * If current user is not root, make sure old password has been specified * If REMOTE change, even root must provide old password */ - if (((!am_root()) (strlen( cgi_variable(OLD_PSWD)) = 0)) || - ((cgi_variable(CHG_R_PASSWD_FLAG)) (strlen( cgi_variable(OLD_PSWD)) = 0))) { + if (((!am_root()) (strlen( cgi_variable_nonull(OLD_PSWD)) = 0)) || + ((cgi_variable(CHG_R_PASSWD_FLAG)) (strlen( cgi_variable_nonull(OLD_PSWD)) = 0))) { printf(p%s\n, _( Must specify \Old Password\ )); return; }
svn commit: samba r16426 - in branches/SAMBA_3_0/source/web: .
Author: jra Date: 2006-06-20 19:21:14 + (Tue, 20 Jun 2006) New Revision: 16426 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16426 Log: Klocwork #1544, #1545, #1546, #1549, #1550, #1552, #1553, #1554 Jeremy. Modified: branches/SAMBA_3_0/source/web/cgi.c branches/SAMBA_3_0/source/web/swat.c Changeset: Modified: branches/SAMBA_3_0/source/web/cgi.c === --- branches/SAMBA_3_0/source/web/cgi.c 2006-06-20 19:21:07 UTC (rev 16425) +++ branches/SAMBA_3_0/source/web/cgi.c 2006-06-20 19:21:14 UTC (rev 16426) @@ -223,6 +223,7 @@ browser. Also doesn't allow for variables[] containing multiple variables with the same name and the same or different values. ***/ + const char *cgi_variable(const char *name) { int i; @@ -234,6 +235,20 @@ } /*** + Version of the above that can't return a NULL pointer. +***/ + +const char *cgi_variable_nonull(const char *name) +{ + const char *var = cgi_variable(name); + if (var) { + return var; + } else { + return ; + } +} + +/*** tell a browser about a fatal error in the http processing ***/ static void cgi_setup_error(const char *err, const char *header, const char *info) Modified: branches/SAMBA_3_0/source/web/swat.c === --- branches/SAMBA_3_0/source/web/swat.c2006-06-20 19:21:07 UTC (rev 16425) +++ branches/SAMBA_3_0/source/web/swat.c2006-06-20 19:21:14 UTC (rev 16426) @@ -515,7 +515,7 @@ while ((parm = lp_next_parameter(snum, i, 1))) { slprintf(label, sizeof(label)-1, parm_%s, make_parm_name(parm-label)); - if ((v = cgi_variable(label))) { + if ((v = cgi_variable(label)) != NULL) { if (parm-flags FLAG_HIDE) continue; commit_parameter(snum, parm, v); } @@ -678,10 +678,10 @@ } if (cgi_variable(Commit)){ - SerType = atoi(cgi_variable(ServerType)); - winstype = atoi(cgi_variable(WINSType)); + SerType = atoi(cgi_variable_nonull(ServerType)); + winstype = atoi(cgi_variable_nonull(WINSType)); have_home = lp_servicenumber(HOMES_NAME); - HomeExpo = atoi(cgi_variable(HomeExpo)); + HomeExpo = atoi(cgi_variable_nonull(HomeExpo)); /* Plain text passwords are too badly broken - use encrypted passwords only */ lp_do_parameter( GLOBAL_SECTION_SNUM, encrypt passwords, Yes); @@ -714,7 +714,7 @@ break; case 2: lp_do_parameter( GLOBAL_SECTION_SNUM, wins support, No ); - lp_do_parameter( GLOBAL_SECTION_SNUM, wins server, cgi_variable(WINSAddr)); + lp_do_parameter( GLOBAL_SECTION_SNUM, wins server, cgi_variable_nonull(WINSAddr)); break; } @@ -839,7 +839,7 @@ } if ( cgi_variable(ViewMode) ) - mode = atoi(cgi_variable(ViewMode)); + mode = atoi(cgi_variable_nonull(ViewMode)); if ( cgi_variable(BasicMode)) mode = 0; if ( cgi_variable(AdvMode)) @@ -915,7 +915,7 @@ printf(table\n); if ( cgi_variable(ViewMode) ) - mode = atoi(cgi_variable(ViewMode)); + mode = atoi(cgi_variable_nonull(ViewMode)); if ( cgi_variable(BasicMode)) mode = 0; if ( cgi_variable(AdvMode)) @@ -1029,7 +1029,7 @@ int local_flags = 0; /* Make sure users name has been specified */ - if (strlen(cgi_variable(SWAT_USER)) == 0) { + if (strlen(cgi_variable_nonull(SWAT_USER)) == 0) { printf(p%s\n, _( Must specify \User Name\ )); return; } @@ -1044,27 +1044,27 @@ * If current user is not root, make sure old password has been specified * If REMOTE change, even root must provide old password */ - if (((!am_root()) (strlen( cgi_variable(OLD_PSWD)) = 0)) || - ((cgi_variable(CHG_R_PASSWD_FLAG)) (strlen( cgi_variable(OLD_PSWD)) = 0))) { + if (((!am_root()) (strlen( cgi_variable_nonull(OLD_PSWD)) = 0)) || + ((cgi_variable(CHG_R_PASSWD_FLAG)) (strlen( cgi_variable_nonull(OLD_PSWD)) = 0))) {
svn commit: samba r16427 - branches/SAMBA_3_0/source/passdb trunk/source/passdb
Author: vlendec Date: 2006-06-20 20:05:39 + (Tue, 20 Jun 2006) New Revision: 16427 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16427 Log: Fix bug # 3848. Thanks to Wilco Baan Hofman for testing the release candidate! Volker Modified: branches/SAMBA_3_0/source/passdb/pdb_ldap.c trunk/source/passdb/pdb_ldap.c Changeset: Modified: branches/SAMBA_3_0/source/passdb/pdb_ldap.c === --- branches/SAMBA_3_0/source/passdb/pdb_ldap.c 2006-06-20 19:21:14 UTC (rev 16426) +++ branches/SAMBA_3_0/source/passdb/pdb_ldap.c 2006-06-20 20:05:39 UTC (rev 16427) @@ -1796,6 +1796,19 @@ ldap_mods_free(mods,True); SAFE_FREE(dn); + /* +* We need to set the backend private data to NULL here. For example +* setuserinfo level 25 does a pdb_update_sam_account twice on the +* same one, and with the explicit delete / add logic for attribute +* values the second time we would use the wrong old value which +* does not exist in LDAP anymore. Thus the LDAP server would refuse +* the update. +* The existing LDAPMessage is still being auto-freed by the +* destructor. +*/ + pdb_set_backend_private_data(newpwd, NULL, NULL, my_methods, +PDB_CHANGED); + if (!NT_STATUS_IS_OK(ret)) { return ret; } Modified: trunk/source/passdb/pdb_ldap.c === --- trunk/source/passdb/pdb_ldap.c 2006-06-20 19:21:14 UTC (rev 16426) +++ trunk/source/passdb/pdb_ldap.c 2006-06-20 20:05:39 UTC (rev 16427) @@ -1797,6 +1797,19 @@ ldap_mods_free(mods,True); SAFE_FREE(dn); + /* +* We need to set the backend private data to NULL here. For example +* setuserinfo level 25 does a pdb_update_sam_account twice on the +* same one, and with the explicit delete / add logic for attribute +* values the second time we would use the wrong old value which +* does not exist in LDAP anymore. Thus the LDAP server would refuse +* the update. +* The existing LDAPMessage is still being auto-freed by the +* destructor. +*/ + pdb_set_backend_private_data(newpwd, NULL, NULL, my_methods, +PDB_CHANGED); + if (!NT_STATUS_IS_OK(ret)) { return ret; }
svn commit: samba r16428 - in trunk/source: param utils
Author: jra Date: 2006-06-20 20:42:59 + (Tue, 20 Jun 2006) New Revision: 16428 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16428 Log: Fix final 4 Klocwork bugs we're going to fix before release - #785, #786, #787, #788. Jeremy. Modified: trunk/source/param/loadparm.c trunk/source/utils/net_rpc_samsync.c Changeset: Modified: trunk/source/param/loadparm.c === --- trunk/source/param/loadparm.c 2006-06-20 20:05:39 UTC (rev 16427) +++ trunk/source/param/loadparm.c 2006-06-20 20:42:59 UTC (rev 16428) @@ -3251,9 +3251,9 @@ Handle ldap suffixes - default to ldapsuffix if sub-suffixes are not defined. ***/ -static char* append_ldap_suffix( const char *str ) +static const char *append_ldap_suffix( const char *str ) { - char *suffix_string; + const char *suffix_string; if (!lp_talloc) @@ -3262,13 +3262,13 @@ suffix_string = talloc_asprintf( lp_talloc, %s,%s, str, Globals.szLdapSuffix ); if ( !suffix_string ) { DEBUG(0,(append_ldap_suffix: talloc_asprintf() failed!\n)); - return NULL; + return ; } return suffix_string; } -char *lp_ldap_machine_suffix(void) +const char *lp_ldap_machine_suffix(void) { if (Globals.szLdapMachineSuffix[0]) return append_ldap_suffix(Globals.szLdapMachineSuffix); @@ -3276,7 +3276,7 @@ return lp_string(Globals.szLdapSuffix); } -char *lp_ldap_user_suffix(void) +const char *lp_ldap_user_suffix(void) { if (Globals.szLdapUserSuffix[0]) return append_ldap_suffix(Globals.szLdapUserSuffix); @@ -3284,7 +3284,7 @@ return lp_string(Globals.szLdapSuffix); } -char *lp_ldap_group_suffix(void) +const char *lp_ldap_group_suffix(void) { if (Globals.szLdapGroupSuffix[0]) return append_ldap_suffix(Globals.szLdapGroupSuffix); @@ -3292,7 +3292,7 @@ return lp_string(Globals.szLdapSuffix); } -char *lp_ldap_idmap_suffix(void) +const char *lp_ldap_idmap_suffix(void) { if (Globals.szLdapIdmapSuffix[0]) return append_ldap_suffix(Globals.szLdapIdmapSuffix); Modified: trunk/source/utils/net_rpc_samsync.c === --- trunk/source/utils/net_rpc_samsync.c2006-06-20 20:05:39 UTC (rev 16427) +++ trunk/source/utils/net_rpc_samsync.c2006-06-20 20:42:59 UTC (rev 16428) @@ -1025,7 +1025,7 @@ static NTSTATUS populate_ldap_for_ldif(fstring sid, const char *suffix, const char *builtin_sid, FILE *add_fd) { - char *user_suffix, *group_suffix, *machine_suffix, *idmap_suffix; + const char *user_suffix, *group_suffix, *machine_suffix, *idmap_suffix; char *user_attr=NULL, *group_attr=NULL; char *suffix_attr; int len;
svn commit: samba r16429 - in branches/SAMBA_3_0/source: param utils
Author: jra Date: 2006-06-20 20:43:05 + (Tue, 20 Jun 2006) New Revision: 16429 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16429 Log: Fix final 4 Klocwork bugs we're going to fix before release - #785, #786, #787, #788. Jeremy. Modified: branches/SAMBA_3_0/source/param/loadparm.c branches/SAMBA_3_0/source/utils/net_rpc_samsync.c Changeset: Modified: branches/SAMBA_3_0/source/param/loadparm.c === --- branches/SAMBA_3_0/source/param/loadparm.c 2006-06-20 20:42:59 UTC (rev 16428) +++ branches/SAMBA_3_0/source/param/loadparm.c 2006-06-20 20:43:05 UTC (rev 16429) @@ -3244,9 +3244,9 @@ Handle ldap suffixes - default to ldapsuffix if sub-suffixes are not defined. ***/ -static char* append_ldap_suffix( const char *str ) +static const char *append_ldap_suffix( const char *str ) { - char *suffix_string; + const char *suffix_string; if (!lp_talloc) @@ -3255,13 +3255,13 @@ suffix_string = talloc_asprintf( lp_talloc, %s,%s, str, Globals.szLdapSuffix ); if ( !suffix_string ) { DEBUG(0,(append_ldap_suffix: talloc_asprintf() failed!\n)); - return NULL; + return ; } return suffix_string; } -char *lp_ldap_machine_suffix(void) +const char *lp_ldap_machine_suffix(void) { if (Globals.szLdapMachineSuffix[0]) return append_ldap_suffix(Globals.szLdapMachineSuffix); @@ -3269,7 +3269,7 @@ return lp_string(Globals.szLdapSuffix); } -char *lp_ldap_user_suffix(void) +const char *lp_ldap_user_suffix(void) { if (Globals.szLdapUserSuffix[0]) return append_ldap_suffix(Globals.szLdapUserSuffix); @@ -3277,7 +3277,7 @@ return lp_string(Globals.szLdapSuffix); } -char *lp_ldap_group_suffix(void) +const char *lp_ldap_group_suffix(void) { if (Globals.szLdapGroupSuffix[0]) return append_ldap_suffix(Globals.szLdapGroupSuffix); @@ -3285,7 +3285,7 @@ return lp_string(Globals.szLdapSuffix); } -char *lp_ldap_idmap_suffix(void) +const char *lp_ldap_idmap_suffix(void) { if (Globals.szLdapIdmapSuffix[0]) return append_ldap_suffix(Globals.szLdapIdmapSuffix); Modified: branches/SAMBA_3_0/source/utils/net_rpc_samsync.c === --- branches/SAMBA_3_0/source/utils/net_rpc_samsync.c 2006-06-20 20:42:59 UTC (rev 16428) +++ branches/SAMBA_3_0/source/utils/net_rpc_samsync.c 2006-06-20 20:43:05 UTC (rev 16429) @@ -1025,7 +1025,7 @@ static NTSTATUS populate_ldap_for_ldif(fstring sid, const char *suffix, const char *builtin_sid, FILE *add_fd) { - char *user_suffix, *group_suffix, *machine_suffix, *idmap_suffix; + const char *user_suffix, *group_suffix, *machine_suffix, *idmap_suffix; char *user_attr=NULL, *group_attr=NULL; char *suffix_attr; int len;
svn commit: samba r16430 - in branches/SOC: . sree
Author: sree Date: 2006-06-20 20:46:39 + (Tue, 20 Jun 2006) New Revision: 16430 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16430 Log: Testing with proposal Added: branches/SOC/sree/ branches/SOC/sree/samba-soc.txt Changeset: Added: branches/SOC/sree/samba-soc.txt === --- branches/SOC/sree/samba-soc.txt 2006-06-20 20:43:05 UTC (rev 16429) +++ branches/SOC/sree/samba-soc.txt 2006-06-20 20:46:39 UTC (rev 16430) @@ -0,0 +1,210 @@ + +Name: K. Sreepathi Pai +Email: [EMAIL PROTECTED] +IM: kspb46 on Yahoo! (but I'm on dialup! Please send me mail+time if + you wish to chat with me) + +Samba! This is the only open-source project that strikes a personal +chord with me for Google SoC 2006. No other project would get me so +motivated. + +My experience with Samba has been largely on the user/administrator +side (but with a compiling+debugging experience as well). I've been +heavily involved in converting our college's infrastructure from +Windows to (only) Linux+Samba3 (800+ users). It's been a wonderful +experience with great software! + +The project I'm applying for is (now) on your project ideas page +entitled 'User Manager for SWAT (Samba 4)'. Here are my key +motivations for this project: + + * Samba+Linux is a surefire Windows (server-side) killer + + * Windows Administrators _need_ graphical tools for user management + (this isn't that they aren't willing to learn command line tools, + but graphical tools are simply more convenient for repetitive + tasks -- I learnt this the hard way) + + * Samba 4 AD infrastructure _will_ require a graphical tool to + allow administrators to fully appreciate and use its complete + feature set + + * I was planning to do it anyway ;-) [Linux-based Samba3 + administration, a NT4 Server Tools replacement using a native + toolkit] + +Currently I have written a number of shell (Windows and Linux) and +web-based programs (PHP) to interact with the LDAP+Samba3 deployment +in college for rudimentary user management. The Google SoC project +while not reusing any of it, will help bring all of it together. + + + +HOW much time do you expect to have for this project? + +Following commitments during the SoC period: + +May 18 -- June 6, Final Engineering Exams +July 20ish -- Possible move to new university (admissions still in progress) + +No other commitments. This is my free-est time in 4 years of +engineering school! + + + +PLEASE describe any experience you have: + +[restricting to project-relevant experience] + +PHP-based developer for past 5 years. Can write secure programs +:-). Good understanding of Cryptography and its proper usage. Have +written tools for Samba/LDAP user management in PHP. + +Very comfortable with Javascript, have written large libraries for use +in web applications. No AJAX experience (yet). + +Worked with LDAP using variety of tools and libraries and programming +languages. Setup and maintained OpenLDAP based server for Samba3 with +custom schema for college. + +appwebserver, ejs and qooxdoo are new to me, but embedded servers and +languages are not. I've played around with SpiderMonkey (Mozilla's C +implementation of JavaScript) a bit (very little!), and poked around +GAIM's Tcl loader. Both of these experiences were before SoC. Also +worked with AD scripting. + + + +PLEASE describe your usage experience/familiarity with the project you +are applying for: + +Started with Samba 2.2 on Debian Woody for a fileserver. Moved upto +Samba3 on Debian Sarge as a PDC for the entire college. Implemented an +OpenLDAP-based Samba3 setup, writing all migration scripts and +management tools. Please visit +http://www.geocities.com/kspb46/soc2006/ for source code and +screenshots of these tools. + +Time-scale: 2 years. Was daily administrator for atleast 6 months, +troubleshooting Samba3 migration problems with users, software and +computers. Nothing the Samba docs couldn't solve :-). + + + +PLEASE describe any open source development experience: + +Have submitted bugfixes to Moodle, maintain local patches to +SquirrelMail. + +Written Newsy, a no-frills web-based RSS/Atom site publisher. +http://ducs.dbit.in/projects/2005/newsy/ + +Co-author of VL2, a web-based search engine for Electoral Rolls. +http://www.indictrans.org/vl2/English/download.html + + + +HAVE you applied (or plan to apply) for any other 2006 Summer of Code +projects? If so, which ones? + +No. + + + +WHAT school do you attend? How many years have you attended there? +What is your specialty/major at the school? + +Studying Computer Engineering for the last 4 years at Don Bosco +Institute of Technology, Mumbai. Affiliated to the University of +Mumbai (Bombay), India. Electives chosen were 'Advanced Computer +Networks' and 'Neural Networks'. Enjoy Operating Systems, Networks and +Compilers. + + + +PLEASE describe your proposed project in
svn commit: samba r16431 - in branches/SOC/sree: . docs
Author: sree Date: 2006-06-20 22:37:56 + (Tue, 20 Jun 2006) New Revision: 16431 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16431 Log: First code and some documentation. Functions to add and delete users. Added: branches/SOC/sree/docs/ branches/SOC/sree/docs/usermgmt.txt branches/SOC/sree/usermgmt.js Changeset: Added: branches/SOC/sree/docs/usermgmt.txt === --- branches/SOC/sree/docs/usermgmt.txt 2006-06-20 20:46:39 UTC (rev 16430) +++ branches/SOC/sree/docs/usermgmt.txt 2006-06-20 22:37:56 UTC (rev 16431) @@ -0,0 +1,39 @@ +The functions in usermgmt.js are aimed to be a bridge between a +user-level application (mainly the UI), and Samba internals. + +The function prototypes are designed by looking at the UI, like for +example: + +New User UI (from MMC/Local Users and Groups) + +The UI asks for: +Username +Fullname +Description +Password + +and some flags, basically: +user must change password at next logon +account is disabled +user cannot change password +password never expires + +And Samba requires: + +unixName + +So, we have the user_add function that does this: + +function user_add(sam, username, fullname, description, + password, flags, unixname) + +Other functions: + +user_delete(sam, username) +user_rename(sam, username, newname) + +TODO: + add/remove users to groups + user enumeration functions + + Added: branches/SOC/sree/usermgmt.js === --- branches/SOC/sree/usermgmt.js 2006-06-20 20:46:39 UTC (rev 16430) +++ branches/SOC/sree/usermgmt.js 2006-06-20 22:37:56 UTC (rev 16431) @@ -0,0 +1,153 @@ +#!/usr/local/samba/bin/smbscript + +libinclude(base.js); + +// initialize user functions, and return opaque value to be used by +// other functions +function user_init(session_info, credentials) +{ +var lp = loadparm_init(); + +var samdb = lp.get(sam database); +var ldb = ldb_init(); + +//? +random_init(local); + +ldb.session_info = session_info; +ldb.credentials = credentials; + +/* connect to the sam */ +var ok = ldb.connect(samdb); +assert(ok); + +var sam = new Object(); + +// from provision's newuser +var tmp = ldb.search(objectClass=domainDNS, new Array(dn)); +sam.domain_dn = tmp[0][dn]; + +tmp = ldb.search(name=Domain Users, new Array(dn)); +sam.domain_users_dn = tmp[0][dn]; + +assert(sam.domain_dn != undefined + sam.domain_users_dn != undefined); + +sam.ldb = ldb; +return sam; +} + +// deinitialize +function user_deinit(sam) +{ +sam.ldb.close(); +} + +// delete user +function user_delete(sam, username) +{ + +var user_dn = sprintf(CN=%s,CN=Users,%s, + username, sam.domain_dn); + +var ldifmod = sprintf( +dn: %s +delete: member +member: %s +, + sam.domain_users_dn, user_dn); + +sam.ldb.transaction_start(); + +//TODO: Remove the user from all groups +if(sam.ldb.modify(ldifmod) != true) + { + print(Failed to remove user from group!\n); + sam.ldb.transaction_cancel(); + return false; + } + +if(sam.ldb.del(user_dn) != true) + { + print(Could not delete user!\n); + sam.ldb.transaction_cancel(); + return false; + } + +return(sam.ldb.transaction_commit()); +} + +// add a user +function user_add(sam, username, fullname, description, password, flags, unixname) +{ +var aldif = new Array(); + +var user_dn = sprintf(CN=%s,CN=Users,%s, + username, sam.domain_dn); + +aldif[0] = dn: + user_dn; +aldif[1] = sAMAccountName: + username; +aldif[2] = memberOf: + sam.domain_users_dn; +aldif[3] = unixName: + unixname; +aldif[4] = sambaPassword: + password; +aldif[5] = objectClass: user; +aldif[6] = displayName: + fullname; +aldif[7] = description: + description; + +var ldif = join(\n, aldif); + +sam.ldb.transaction_start(); + +//TODO: Check if user already exists? +if(sam.ldb.add(ldif) != true) + { + print(Failed to add user!\n); + sam.ldb.transaction_cancel(); + return false; + } + +var ldifmod = sprintf( +dn: %s +changetype: modify +add: member +member: %s +, + sam.domain_users_dn, user_dn); + +if(sam.ldb.modify(ldifmod) != true) + { + print(Failed to add user to group!\n); + sam.ldb.transaction_cancel(); + return false; + } + +//TODO: Handle flags + +return(sam.ldb.transaction_commit()); +} + +// --- MAIN --- + +var options = GetOptions(ARGV, POPT_COMMON_CREDENTIALS); + +var system_session = system_session(); +var creds = options.get_credentials(); + +sam = user_init(system_session, creds); + +
Build status as of Wed Jun 21 00:00:01 2006
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2006-06-20 00:00:19.0 + +++ /home/build/master/cache/broken_results.txt 2006-06-21 00:00:05.0 + @@ -1,18 +1,18 @@ -Build status as of Tue Jun 20 00:00:02 2006 +Build status as of Wed Jun 21 00:00:01 2006 Build counts: Tree Total Broken Panic SOC 0 0 0 ccache 35 4 0 -distcc 39 4 0 +distcc 38 4 0 lorikeet-heimdal 2 0 0 ppp 20 0 0 rsync38 2 0 -samba31 8 0 +samba30 10 1 samba-docs 0 0 0 -samba4 43 30 7 -samba_3_042 20 4 +samba4 43 31 7 +samba_3_042 19 5 smb-build29 1 0 -talloc 30 14 0 -tdb 27 4 0 +talloc 28 15 0 +tdb 26 4 0
svn commit: samba r16432 - in trunk/source/rpc_server: .
Author: jra Date: 2006-06-21 00:17:08 + (Wed, 21 Jun 2006) New Revision: 16432 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16432 Log: Fix Coverity #300 (triggered by a Klockwork bugfix I think). If a alloc fails just return NT_STATUS_NO_MEMORY, don't go to done label and deref pointers. Jeremy. Modified: trunk/source/rpc_server/srv_lsa_nt.c Changeset: Modified: trunk/source/rpc_server/srv_lsa_nt.c === --- trunk/source/rpc_server/srv_lsa_nt.c2006-06-20 22:37:56 UTC (rev 16431) +++ trunk/source/rpc_server/srv_lsa_nt.c2006-06-21 00:17:08 UTC (rev 16432) @@ -1135,7 +1135,7 @@ if ((ref == NULL) || (rids == NULL) || (rids2 == NULL)) { r_u-status = NT_STATUS_NO_MEMORY; - goto done; + return NT_STATUS_NO_MEMORY; } if (!find_policy_by_hnd(p, q_u-pol, (void **)(void *)handle)) { @@ -1149,10 +1149,6 @@ goto done; } - if (!ref || !rids || !rids2) { - return NT_STATUS_NO_MEMORY; - } - /* set up the LSA Lookup RIDs response */ become_root(); /* lookup_name can require root privs */ r_u-status = lookup_lsa_rids(p-mem_ctx, ref, rids, num_entries,
svn commit: samba r16433 - in branches/SAMBA_3_0/source/rpc_server: .
Author: jra Date: 2006-06-21 00:17:14 + (Wed, 21 Jun 2006) New Revision: 16433 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16433 Log: Fix Coverity #300 (triggered by a Klockwork bugfix I think). If a alloc fails just return NT_STATUS_NO_MEMORY, don't go to done label and deref pointers. Jeremy. Modified: branches/SAMBA_3_0/source/rpc_server/srv_lsa_nt.c Changeset: Modified: branches/SAMBA_3_0/source/rpc_server/srv_lsa_nt.c === --- branches/SAMBA_3_0/source/rpc_server/srv_lsa_nt.c 2006-06-21 00:17:08 UTC (rev 16432) +++ branches/SAMBA_3_0/source/rpc_server/srv_lsa_nt.c 2006-06-21 00:17:14 UTC (rev 16433) @@ -1135,7 +1135,7 @@ if ((ref == NULL) || (rids == NULL) || (rids2 == NULL)) { r_u-status = NT_STATUS_NO_MEMORY; - goto done; + return NT_STATUS_NO_MEMORY; } if (!find_policy_by_hnd(p, q_u-pol, (void **)(void *)handle)) { @@ -1149,10 +1149,6 @@ goto done; } - if (!ref || !rids || !rids2) { - return NT_STATUS_NO_MEMORY; - } - /* set up the LSA Lookup RIDs response */ become_root(); /* lookup_name can require root privs */ r_u-status = lookup_lsa_rids(p-mem_ctx, ref, rids, num_entries,
svn commit: samba r16434 - in branches/SOC/mkhl: .
Author: mkhl Date: 2006-06-21 00:31:40 + (Wed, 21 Jun 2006) New Revision: 16434 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16434 Log: Add a few chunks of async trampolining for delete and rename requests. Those won't be necessary for add, but the modify trampolining will get a lot more complex. Martin Modified: branches/SOC/mkhl/,,ldb_map-async.patch Changeset: Sorry, the patch is too large (2089 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16434
svn commit: samba r16435 - in branches/SAMBA_3_0/source: include libsmb locking smbd utils web
Author: jra Date: 2006-06-21 02:31:12 + (Wed, 21 Jun 2006) New Revision: 16435 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16435 Log: Add in the uid info that Jerry needs into the share_mode struct. Allows us to know the unix uid of the opener of the file/directory. Needed for info level queries on open files. Jeremy. Modified: branches/SAMBA_3_0/source/include/smb.h branches/SAMBA_3_0/source/libsmb/smb_share_modes.c branches/SAMBA_3_0/source/locking/locking.c branches/SAMBA_3_0/source/smbd/open.c branches/SAMBA_3_0/source/smbd/oplock.c branches/SAMBA_3_0/source/utils/status.c branches/SAMBA_3_0/source/web/statuspage.c Changeset: Modified: branches/SAMBA_3_0/source/include/smb.h === --- branches/SAMBA_3_0/source/include/smb.h 2006-06-21 00:31:40 UTC (rev 16434) +++ branches/SAMBA_3_0/source/include/smb.h 2006-06-21 02:31:12 UTC (rev 16435) @@ -671,6 +671,7 @@ SMB_DEV_T dev; SMB_INO_T inode; unsigned long share_file_id; + uint32 uid; /* uid of file opener. */ }; /* oplock break message definition - linearization of share_mode_entry. @@ -687,10 +688,11 @@ 28 SMB_DEV_T dev 8 bytes. 36 SMB_INO_T inode 8 bytes 44 unsigned long file_id 4 bytes -48 +48 uint32 uid 4 bytes +52 */ -#define MSG_SMB_SHARE_MODE_ENTRY_SIZE 48 +#define MSG_SMB_SHARE_MODE_ENTRY_SIZE 52 struct share_mode_lock { const char *servicepath; /* canonicalized. */ Modified: branches/SAMBA_3_0/source/libsmb/smb_share_modes.c === --- branches/SAMBA_3_0/source/libsmb/smb_share_modes.c 2006-06-21 00:31:40 UTC (rev 16434) +++ branches/SAMBA_3_0/source/libsmb/smb_share_modes.c 2006-06-21 02:31:12 UTC (rev 16435) @@ -149,6 +149,7 @@ out-access_mask = in-access_mask; out-dev = (SMB_DEV_T)in-dev; out-inode = (SMB_INO_T)in-ino; + out-uid = (uint32)geteuid(); } /* Modified: branches/SAMBA_3_0/source/locking/locking.c === --- branches/SAMBA_3_0/source/locking/locking.c 2006-06-21 00:31:40 UTC (rev 16434) +++ branches/SAMBA_3_0/source/locking/locking.c 2006-06-21 02:31:12 UTC (rev 16435) @@ -443,13 +443,13 @@ slprintf(share_str, sizeof(share_str)-1, share_mode_entry[%d]: %s pid = %s, share_access = 0x%x, private_options = 0x%x, access_mask = 0x%x, mid = 0x%x, type= 0x%x, file_id = %lu, -dev = 0x%x, inode = %.0f, +uid = %u, dev = 0x%x, inode = %.0f, num, e-op_type == UNUSED_SHARE_MODE_ENTRY ? UNUSED : , procid_str_static(e-pid), e-share_access, e-private_options, e-access_mask, e-op_mid, e-op_type, e-share_file_id, -(unsigned int)e-dev, (double)e-inode ); +(unsigned int)e-uid, (unsigned int)e-dev, (double)e-inode ); return share_str; } @@ -917,7 +917,7 @@ static void fill_share_mode_entry(struct share_mode_entry *e, files_struct *fsp, - uint16 mid, uint16 op_type) + uid_t uid, uint16 mid, uint16 op_type) { ZERO_STRUCTP(e); e-pid = procid_self(); @@ -928,9 +928,10 @@ e-op_type = op_type; e-time.tv_sec = fsp-open_time.tv_sec; e-time.tv_usec = fsp-open_time.tv_usec; - e-share_file_id = fsp-fh-file_id; e-dev = fsp-dev; e-inode = fsp-inode; + e-share_file_id = fsp-fh-file_id; + e-uid = (uint32)uid; } static void fill_deferred_open_entry(struct share_mode_entry *e, @@ -945,6 +946,7 @@ e-time.tv_usec = request_time.tv_usec; e-dev = dev; e-inode = ino; + e-uid = (uint32)-1; } static void add_share_mode_entry(struct share_mode_lock *lck, @@ -969,10 +971,10 @@ } void set_share_mode(struct share_mode_lock *lck, files_struct *fsp, - uint16 mid, uint16 op_type) + uid_t uid, uint16 mid, uint16 op_type) { struct share_mode_entry entry; - fill_share_mode_entry(entry, fsp, mid, op_type); + fill_share_mode_entry(entry, fsp, uid, mid, op_type); add_share_mode_entry(lck, entry); } @@ -1044,7 +1046,8 @@ { struct share_mode_entry entry, *e; - fill_share_mode_entry(entry, fsp, 0, NO_OPLOCK); + /* Don't care about the pid owner being correct here - just a search. */ + fill_share_mode_entry(entry, fsp, (uid_t)-1, 0, NO_OPLOCK); e = find_share_mode_entry(lck, entry); if (e == NULL) { @@ -1080,7 +1083,8 @@ { struct share_mode_entry entry, *e; - fill_share_mode_entry(entry, fsp, 0, NO_OPLOCK); + /* Don't care about the pid
svn commit: samba r16436 - in trunk/source: include libsmb locking smbd utils web
Author: jra Date: 2006-06-21 02:31:17 + (Wed, 21 Jun 2006) New Revision: 16436 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16436 Log: Add in the uid info that Jerry needs into the share_mode struct. Allows us to know the unix uid of the opener of the file/directory. Needed for info level queries on open files. Jeremy. Modified: trunk/source/include/smb.h trunk/source/libsmb/smb_share_modes.c trunk/source/locking/locking.c trunk/source/smbd/open.c trunk/source/smbd/oplock.c trunk/source/utils/status.c trunk/source/web/statuspage.c Changeset: Modified: trunk/source/include/smb.h === --- trunk/source/include/smb.h 2006-06-21 02:31:12 UTC (rev 16435) +++ trunk/source/include/smb.h 2006-06-21 02:31:17 UTC (rev 16436) @@ -678,6 +678,7 @@ SMB_DEV_T dev; SMB_INO_T inode; unsigned long share_file_id; + uint32 uid; /* uid of file opener. */ }; /* oplock break message definition - linearization of share_mode_entry. @@ -694,10 +695,11 @@ 28 SMB_DEV_T dev 8 bytes. 36 SMB_INO_T inode 8 bytes 44 unsigned long file_id 4 bytes -48 +48 uint32 uid 4 bytes +52 */ -#define MSG_SMB_SHARE_MODE_ENTRY_SIZE 48 +#define MSG_SMB_SHARE_MODE_ENTRY_SIZE 52 struct share_mode_lock { const char *servicepath; /* canonicalized. */ Modified: trunk/source/libsmb/smb_share_modes.c === --- trunk/source/libsmb/smb_share_modes.c 2006-06-21 02:31:12 UTC (rev 16435) +++ trunk/source/libsmb/smb_share_modes.c 2006-06-21 02:31:17 UTC (rev 16436) @@ -149,6 +149,7 @@ out-access_mask = in-access_mask; out-dev = (SMB_DEV_T)in-dev; out-inode = (SMB_INO_T)in-ino; + out-uid = (uint32)geteuid(); } /* Modified: trunk/source/locking/locking.c === --- trunk/source/locking/locking.c 2006-06-21 02:31:12 UTC (rev 16435) +++ trunk/source/locking/locking.c 2006-06-21 02:31:17 UTC (rev 16436) @@ -443,13 +443,13 @@ slprintf(share_str, sizeof(share_str)-1, share_mode_entry[%d]: %s pid = %s, share_access = 0x%x, private_options = 0x%x, access_mask = 0x%x, mid = 0x%x, type= 0x%x, file_id = %lu, -dev = 0x%x, inode = %.0f, +uid = %u, dev = 0x%x, inode = %.0f, num, e-op_type == UNUSED_SHARE_MODE_ENTRY ? UNUSED : , procid_str_static(e-pid), e-share_access, e-private_options, e-access_mask, e-op_mid, e-op_type, e-share_file_id, -(unsigned int)e-dev, (double)e-inode ); +(unsigned int)e-uid, (unsigned int)e-dev, (double)e-inode ); return share_str; } @@ -917,7 +917,7 @@ static void fill_share_mode_entry(struct share_mode_entry *e, files_struct *fsp, - uint16 mid, uint16 op_type) + uid_t uid, uint16 mid, uint16 op_type) { ZERO_STRUCTP(e); e-pid = procid_self(); @@ -928,9 +928,10 @@ e-op_type = op_type; e-time.tv_sec = fsp-open_time.tv_sec; e-time.tv_usec = fsp-open_time.tv_usec; - e-share_file_id = fsp-fh-file_id; e-dev = fsp-dev; e-inode = fsp-inode; + e-share_file_id = fsp-fh-file_id; + e-uid = (uint32)uid; } static void fill_deferred_open_entry(struct share_mode_entry *e, @@ -945,6 +946,7 @@ e-time.tv_usec = request_time.tv_usec; e-dev = dev; e-inode = ino; + e-uid = (uint32)-1; } static void add_share_mode_entry(struct share_mode_lock *lck, @@ -969,10 +971,10 @@ } void set_share_mode(struct share_mode_lock *lck, files_struct *fsp, - uint16 mid, uint16 op_type) + uid_t uid, uint16 mid, uint16 op_type) { struct share_mode_entry entry; - fill_share_mode_entry(entry, fsp, mid, op_type); + fill_share_mode_entry(entry, fsp, uid, mid, op_type); add_share_mode_entry(lck, entry); } @@ -1044,7 +1046,8 @@ { struct share_mode_entry entry, *e; - fill_share_mode_entry(entry, fsp, 0, NO_OPLOCK); + /* Don't care about the pid owner being correct here - just a search. */ + fill_share_mode_entry(entry, fsp, (uid_t)-1, 0, NO_OPLOCK); e = find_share_mode_entry(lck, entry); if (e == NULL) { @@ -1080,7 +1083,8 @@ { struct share_mode_entry entry, *e; - fill_share_mode_entry(entry, fsp, 0, NO_OPLOCK); + /* Don't care about the pid owner being correct here - just a search. */ + fill_share_mode_entry(entry, fsp, (uid_t)-1, 0, NO_OPLOCK); e = find_share_mode_entry(lck, entry); if (e == NULL) { @@ -1101,7
Re: svn commit: samba r16397 - in branches/SAMBA_3_0/source/smbd: .
On Tue, 2006-06-20 at 08:52 -0700, Jeremy Allison wrote: On Tue, Jun 20, 2006 at 05:21:24PM +1000, James Peach wrote: On Tue, 2006-06-20 at 02:38 +, [EMAIL PROTECTED] wrote: Author: jra Date: 2006-06-20 02:38:28 + (Tue, 20 Jun 2006) New Revision: 16397 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16397 Log: Fix Klocwork #11767 and drasticly simplify the logic in smbd/process.c. All interested (Volker, Jerry, James etc). PLEASE REVIEW THIS CHANGE. The logic should be identical but *much* easier to follow and change (and shouldn't confuse Klockwork :-). You lost the AS_GUEST flag clearing on purpose? Yes. If you look at the SMB definition table (function mapper) you will see that if AS_USER is set then AS_GUEST is *never* set. Could you add an SMB_ASSERT to that effect? if (flags) { SMB_ASSERT((flags AS_USER) ? !(flags AS_GUEST) : (flags AS_GUEST) ) } This makes that clause impossible to be executed. Agreed (provided no-one ever adds AS_USER | AS_GUEST to smb_messages). -- James Peach | [EMAIL PROTECTED]
svn commit: samba r16437 - in branches/tmp/jpeach-xmetrics/source: . modules
Author: jpeach Date: 2006-06-21 04:59:52 + (Wed, 21 Jun 2006) New Revision: 16437 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16437 Log: Build vfs_xmetrics by default if we are profiling. Modified: branches/tmp/jpeach-xmetrics/source/configure.in branches/tmp/jpeach-xmetrics/source/modules/vfs_xmetrics.c Changeset: Modified: branches/tmp/jpeach-xmetrics/source/configure.in === --- branches/tmp/jpeach-xmetrics/source/configure.in2006-06-21 02:31:17 UTC (rev 16436) +++ branches/tmp/jpeach-xmetrics/source/configure.in2006-06-21 04:59:52 UTC (rev 16437) @@ -5557,6 +5557,20 @@ samba_cv_WITH_XMETRICS=yes ifXMETRICS= AC_DEFINE(WITH_XMETRICS, 1, [Whether to build xmetrics profiling]) + # Since we have decided to build xmetrics, add it as a static + # module, unless the user has already chosen otherwise. + case $default_shared_modules in + *xmetric*) + ;; + *) + case $default_static_modules in + *xmetric*) ;; + *) + default_static_modules=${default_static_modules},vfs_xmetrics + ;; + esac + ;; + esac fi # The Samba PMDA depends on the pmdaCache* routines that were Modified: branches/tmp/jpeach-xmetrics/source/modules/vfs_xmetrics.c === --- branches/tmp/jpeach-xmetrics/source/modules/vfs_xmetrics.c 2006-06-21 02:31:17 UTC (rev 16436) +++ branches/tmp/jpeach-xmetrics/source/modules/vfs_xmetrics.c 2006-06-21 04:59:52 UTC (rev 16437) @@ -1575,7 +1575,7 @@ * - */ -NTSTATUS init_module(void) +NTSTATUS vfs_xmetrics_init(void) { NTSTATUS ret;