Re: [Samba]Permission issue
and you can solve this with the sticky bit http://docsrv.sco.com:507/en/OSAdminG/ssC.stickydirs.html you could also try to play with map read only (S) parameter. greez Jeremy Allison wrote: On Sat, Jul 01, 2006 at 12:20:42AM +0200, TSZ wrote: Hello, I am beginner of Samba, but today I have made update of Samba to RC3. I have two users:root and tomek. tomek is in linux groups: smbadmins, smbusers and nothing more. There is a folder for everyone and file made by the root in it: total 4 -rw--- 1 root root 1195 Jul 1 00:11 group.txt User tomek is not able to read the file, but is able to delete it, why? I have no entries in group map. Because in UNIX, permission to delete a file is granted by the permissions on the directory containing it, not on the file itself. Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] multiple domains/ ldap /smbldap_search function/pdbedit/
i guess an easy way to fix this w/out changing your structure is to use slapd ACLs, that prohibit access to other domains for the first samba manager instance (e.g. uid=manager,ou=People,dc=univ,dc=fr). greez Didier Roques wrote: the organization is: 1)ou=People,dc=univ,dc=fr (the first domain) And your answer is here! dc=univ,dc=fr includes EVERYTHING - domain2 and domain3 and of course People,Groups from the top of LDAP tree. 2)ou=People,ou=domain2,dc=univ,dc=fr This for example consists ONLY with EVERYTHING in subtree: ou=domain2,dc=univ,dc=fr - that's why if you try and change samba ldap suffix = ou=domain2,dc=univ,dc=fr - it will work OK. You will ONLY see people,groups and whatever you have but from this particular subtree. 3)ou=People,ou=domain3,dc=univ,dc=fr Sorry i've made a mistake: the three domains: 1)ou=People,dc=univ,dc=fr 2)ou=People,dc=domain2,dc=univ,dc=fr (dc and not ou) 2)ou=People,dc=domain3,dc=univ,dc=fr (dc and not ou) and i thought samba search only into the People branch under the suffix ldap mentioned into the smb.conf dc=univ,dc=fr and not under the other one . -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] prefered configuration for a homes share server
I'm using FreeBSD 6.1 DCs with samba-3.0.22 and openldap-2.3.24. I have two DCs. The first one runs the master ldap server and the other runs a replica. They both hold only the [netlogon] share. I have a third machine which holds the [homes] and [profiles] share. This machine is simply joined to the domain and is an LDAP client only at the OS level (i.e. with nss_ldap). Here is its smb.conf (ALDAP1 and ALDAP2 are netbios aliases for the 2 DCs): [global] workgroup = MIAGE netbios name = CAPELLA security = DOMAIN name resolve order = wins bcast wins server = castor netbios aliases = AHOMES APROFILES password server = ALDAP1 ALDAP2 [homes] comment = Home Directories valid users = %S read only = No browseable = No [Profiles] comment = Roaming Profile Share path = /export/profiles read only = No profile acls = Yes From a security and/or performance perpective, is it better to make my smb.conf ldap-aware (with passdb backend = ldapsam, etc...)? Regards, Thierry. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba]Permission issue
Michael Gasch napisał(a): and you can solve this with the sticky bit http://docsrv.sco.com:507/en/OSAdminG/ssC.stickydirs.html you could also try to play with map read only (S) parameter. Thank you for your help and link. I know the sticky bit, but I don't know how to implement it for new files created in folder for everyone. I've tried with the sticky bit for this folder and create mask = 4555, but it doesn't work. Jeremy Allison wrote: On Sat, Jul 01, 2006 at 12:20:42AM +0200, TSZ wrote: Hello, I am beginner of Samba, but today I have made update of Samba to RC3. I have two users:root and tomek. tomek is in linux groups: smbadmins, smbusers and nothing more. There is a folder for everyone and file made by the root in it: total 4 -rw--- 1 root root 1195 Jul 1 00:11 group.txt User tomek is not able to read the file, but is able to delete it, why? I have no entries in group map. Because in UNIX, permission to delete a file is granted by the permissions on the directory containing it, not on the file itself. Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Adding domain user on linux to a unix group
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I've currently login through ssh enabled to work over winbind. I can use domain logins successfully on the linux machine. Upon first login their home directory gets create and everything is fine. But the user is only a member of all windows groups, e.g. uid=1(markus) gid=1(Domänen-Benutzer) groups=1(Domänen-Benutzer),10001(Projects),10002(WebDevelopment),10003(lokale Administratoren) and thus has no special rights on the machine itself. I'm having a samba share on this machine, for web development, where multiple users can read/write everything. The share is only available for the above group WebDevelopment. Through samba, I'm mapping all individual users to www-data.www-data, so a file created by my user 'markus' is not created as user 'markus' on the filesystem but as user 'www-data'. There are two main reasons for this: * apache needs write permissions in certain directories on this share * subversion, used on the samba-clients (windows machines), require it's control files .svn user-writable which clashes often because on one checkout multiple users are commiting (I know this is a gray area even on subversion side, but complex web setups don't make things easy). My first take was to map a windows group to a unix group. I tried net groupmap add ntgroup=WebDevelopment unixgroup=www-data but it didn't really changed anything. I could see my mapping with groupmap list but permission-wise there was no difference. My second try was to add a unix group to the windows users, which also wasn't possible because the user didn't contain any /etc/passwd entry ... Are there any advices how I can solve this group problems? I'm also open to other suggestion regarding the issue. thanks, - - Markus -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.3 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEppzd1nS0RcInK9ARAp8HAJsE55DbesmuLzt83qSH71qG5WcH2QCgxER1 SbyxBYt/7UczrZQSA2kPGp4= =Bypx -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] Adding domain user on linux to a unix group
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Markus Fischer wrote: My first take was to map a windows group to a unix group. I tried net groupmap add ntgroup=WebDevelopment unixgroup=www-data but it didn't really changed anything. I could see my mapping with groupmap list but permission-wise there was no difference. See 'winbind nested groups' in smb.conf(5). 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 iD8DBQFEpro2IR7qMdg1EfYRAm2aAKCHN36KwwsbPE/V87bP+A44muaVcwCgqT72 Z/advsbpLMi+prsU4jvlhl0= =9mBz -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] Query about security mode
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rajesh Prabhu wrote: Hi Is there a way to have the security level in smb.conf as user and supress the authentication? or is there a way to read the authentication automatically from some file so that, my security mode remains at user level and the functionality will be of share level. ie. when i open a samba share, i should directly go to the share page without authentication. See the map to guest option in smb.conf (5). 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 iD8DBQFEprroIR7qMdg1EfYRAoaQAKDpUCSd+lmRiAUvu2t0DedsJq9E2wCg0vmZ /pGWqboFoylYeP/ZhfbHx4U= =Z+BR -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]Permission issue
TSZ wrote: Michael Gasch napisał(a): and you can solve this with the sticky bit http://docsrv.sco.com:507/en/OSAdminG/ssC.stickydirs.html you could also try to play with map read only (S) parameter. Thank you for your help and link. I know the sticky bit, but I don't know how to implement it for new files created in folder for everyone. I've tried with the sticky bit for this folder and create mask = 4555, but it doesn't work. Jeremy Allison wrote: On Sat, Jul 01, 2006 at 12:20:42AM +0200, TSZ wrote: Hello, I am beginner of Samba, but today I have made update of Samba to RC3. I have two users:root and tomek. tomek is in linux groups: smbadmins, smbusers and nothing more. There is a folder for everyone and file made by the root in it: total 4 -rw--- 1 root root 1195 Jul 1 00:11 group.txt User tomek is not able to read the file, but is able to delete it, why? I have no entries in group map. Because in UNIX, permission to delete a file is granted by the permissions on the directory containing it, not on the file itself. From man chmod: STICKY DIRECTORIES When the sticky bit is set on a directory, files in that directory may be unlinked or renamed only by root or their owner. Without the sticky bit, anyone able to write to the directory can delete or rename files. The sticky bit is commonly found on directories, such as /tmp, that are world-writable. What this means is the sticky bit has to be set on the parent directory, which in your case is the directory being shared. Regards, Doug -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba]Permission issue
Doug VanLeuven napisał(a): [cut] From man chmod: STICKY DIRECTORIES When the sticky bit is set on a directory, files in that directory may be unlinked or renamed only by root or their owner. Without the sticky bit, anyone able to write to the directory can delete or rename files. The sticky bit is commonly found on directories, such as /tmp, that are world-writable. What this means is the sticky bit has to be set on the parent directory, which in your case is the directory being shared. Regards, Doug Thank you, now I understand the rules. All the time I have been thinking, that sticky bit should be inherited by the files created in folder with sticky bit. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Administrator doesn't have admin rights on workstation
Hello, I'm running FreeBSD-6.1, and Samba 3.0.22 with a Windows XP (SP2) client. As per subject line, administrator doesn't have administrator rights on the workstation. --- 'net groupmap list' gives, Domain Admins (S-1-5-21-3323006203-4037909810-1162086780-3003) - ntadmins --- 'pdbedit -Lv' includes, Unix username:administrator NT username: Account Flags:[U ] User SID: S-1-5-21-3323006203-4037909810-1162086780-3006 Primary Group SID:S-1-5-21-3323006203-4037909810-1162086780-3003 --- '/etc/passwd' includes, administrator:*:1003:1001:Windows Domain Administrator:/home/administrator:/usr/sbin/nologin --- '/etc/group' includes, ntadmins:*:1001: From the above, I see that the Primary Group SID for the smb Administrator account is the same as the one listed for Domain Admins using pdbedit. The 'administrator' password is the same for both smb and system accounts, and I can log in to the workstation successfully. I even tried mapping Domain Admins to wheel, setting an smb password for root, and logging on to the client as root instead of administrator. I can write over the network to root's home, but I am sitll not an administrator of the Domain so I can't install software on the client. Which step have I missed or what have I done wrong? Many thanks, Steve :) -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Administrator is root - I don't like it
The Samba-3 by Example instructs you to make a mapping, root = Administrator. Is this absolutely necessary? What if someone hacks a Windows machine and is able to supply Administrator credentials to Samba? Is there a way around this? I can live with having to supply root credentials in Windows when joining a Samba domain (but if there were another way I would love to know how!), but I wouldn't want any network admin to be able to screw with root's account. Many thanks, Steve : ) -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Administrator doesn't have admin rights on workstation
Hello, I'm running FreeBSD-6.1, and Samba 3.0.22 with a Windows XP (SP2) client. As per subject line, administrator doesn't have administrator rights on the workstation. --- 'net groupmap list' gives, Domain Admins (S-1-5-21-3323006203-4037909810-1162086780-3003) - ntadmins AFAIK, the Domain Admins group has a fixed RID of 512. Thus, your SID should look like S-1-5-21-3323006203-4037909810-1162086780-512 instead. The same happens with the Domain Users (RID 513), Domain Computers (RID 515) and Domain Guests (RID 514). -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Re: Administrator doesn't have admin rights on workstation
Felipe Alfaro Solana wrote: AFAIK, the Domain Admins group has a fixed RID of 512. Thus, your SID should look like S-1-5-21-3323006203-4037909810-1162086780-512 That's strange, because the RID was auto-created when I used: net groupmap add ntgroup=Domain Admins unixgroup=ntadmins Steve :) -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
[Samba] Re: Administrator doesn't have admin rights on workstation
Felipe Alfaro Solana wrote: AFAIK, the Domain Admins group has a fixed RID of 512. Thus, your SID should look like S-1-5-21-3323006203-4037909810-1162086780-512 instead. The same happens with the Domain Users (RID 513), Domain Computers (RID 515) and Domain Guests (RID 514). Thanks Felipe, you pointed me in the right direction. When I did 'net groupmap list', I saw 2 each of Domain Admins, Domain Users and Domain Guests. When I first configured them, I did 'net groupmap add ...' instead of 'net groupmap modify ...'. When I deleted the incorrect groups and re-configured - it works ok now. One more question though, I logged on as the Domain Admin, but HKCU\Users\SID does not end in 5xx, it is set to: S-1-5-21-3323006203-4037909810-1162086780-3006 Is that ok? Thanks, Steve :) -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
svn commit: samba r16723 - in branches/tmp/vl-messaging/source/lib: .
Author: ab Date: 2006-07-01 07:38:26 + (Sat, 01 Jul 2006) New Revision: 16723 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16723 Log: Remove talloc_steal() usage from vl-messaging code before merging with the trunk. Patch from Aleksey Fedoseev Modified: branches/tmp/vl-messaging/source/lib/dbwrap_file.c branches/tmp/vl-messaging/source/lib/dbwrap_msg.c Changeset: Modified: branches/tmp/vl-messaging/source/lib/dbwrap_file.c === --- branches/tmp/vl-messaging/source/lib/dbwrap_file.c 2006-07-01 02:15:52 UTC (rev 16722) +++ branches/tmp/vl-messaging/source/lib/dbwrap_file.c 2006-07-01 07:38:26 UTC (rev 16723) @@ -314,7 +314,13 @@ } data.dsize = rec-value.dsize; - data.dptr = talloc_steal(mem_ctx, rec-value.dptr); + data.dptr = talloc_memdup(mem_ctx, rec-value.dptr, rec-value.dsize); + if(data.dptr == NULL) { + DEBUG(0, (talloc failed\n)); + TALLOC_FREE(rec); + TALLOC_FREE(mem_ctx); + return -1; + } TALLOC_FREE(rec); count += 1; Modified: branches/tmp/vl-messaging/source/lib/dbwrap_msg.c === --- branches/tmp/vl-messaging/source/lib/dbwrap_msg.c 2006-07-01 02:15:52 UTC (rev 16722) +++ branches/tmp/vl-messaging/source/lib/dbwrap_msg.c 2006-07-01 07:38:26 UTC (rev 16723) @@ -310,27 +310,42 @@ wait_for_return(ctx); - if(ctx-record) { - ctx-record-key.dsize = key.dsize; - ctx-record-key.dptr = talloc_memdup(ctx-record, key.dptr, key.dsize); - if(ctx-record-key.dptr == NULL) { - DEBUG(0, (talloc failed\n)); - TALLOC_FREE(ctx-record); - return NULL; - } - } else { + if(!ctx-record) { DEBUG(0, (db record is NULL\n)); return NULL; } - - result = talloc_steal(mem_ctx, ctx-record); + + result = TALLOC_P(mem_ctx, struct db_record); if(result == NULL) { - DEBUG(0, (talloc_steal failed\n)); + DEBUG(0, (talloc failed\n)); TALLOC_FREE(ctx-record); return NULL; } + + result-key.dsize = key.dsize; + result-key.dptr = talloc_memdup(result, key.dptr, key.dsize); + if(result-key.dptr == NULL) { + DEBUG(0, (talloc failed\n)); + TALLOC_FREE(ctx-record); + TALLOC_FREE(result); + return NULL; + } + + result-value.dsize = ctx-record-value.dsize; + result-value.dptr = talloc_memdup(result, ctx-record-value.dptr, + ctx-record-value.dsize); + if(result-value.dptr == NULL) { + DEBUG(0, (talloc failed\n)); + TALLOC_FREE(ctx-record); + TALLOC_FREE(result); + return NULL; + } + + result-store = db_msg_store; + result-delete_rec = db_msg_delete; + result-private_data = ctx; - ctx-record = NULL; + TALLOC_FREE(ctx-record); return result; } @@ -467,13 +482,14 @@ if(value.dsize 0) { result-value.dsize = value.dsize; - result-value.dptr = talloc_steal(result, value.dptr); + result-value.dptr = talloc_memdup(result, value.dptr, value.dsize); if (result-value.dptr == NULL) { - DEBUG(0, (talloc_steal failed\n)); + DEBUG(0, (talloc failed\n)); TALLOC_FREE(value.dptr); TALLOC_FREE(result); return ; } + TALLOC_FREE(value.dptr); } result-store = db_msg_store; result-delete_rec = db_msg_delete;
svn commit: samba r16725 - in branches/SAMBA_4_0/source/torture/smb2: .
Author: metze Date: 2006-07-01 07:49:02 + (Sat, 01 Jul 2006) New Revision: 16725 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16725 Log: don't ignore errors metze Modified: branches/SAMBA_4_0/source/torture/smb2/connect.c Changeset: Modified: branches/SAMBA_4_0/source/torture/smb2/connect.c === --- branches/SAMBA_4_0/source/torture/smb2/connect.c2006-07-01 07:47:49 UTC (rev 16724) +++ branches/SAMBA_4_0/source/torture/smb2/connect.c2006-07-01 07:49:02 UTC (rev 16725) @@ -203,9 +203,21 @@ h1 = torture_smb2_create(tree, test9.dat); h2 = torture_smb2_create(tree, test9.dat); - torture_smb2_write(tree, h1); - torture_smb2_close(tree, h1); - torture_smb2_close(tree, h2); + status = torture_smb2_write(tree, h1); + if (!NT_STATUS_IS_OK(status)) { + printf(Write failed - %s\n, nt_errstr(status)); + return False; + } + status = torture_smb2_close(tree, h1); + if (!NT_STATUS_IS_OK(status)) { + printf(Close failed - %s\n, nt_errstr(status)); + return False; + } + status = torture_smb2_close(tree, h2); + if (!NT_STATUS_IS_OK(status)) { + printf(Close failed - %s\n, nt_errstr(status)); + return False; + } status = smb2_util_close(tree, h1); if (!NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
svn commit: samba r16726 - in branches/tmp/vl-messaging: examples/misc source source/auth source/client source/include source/lib source/libads source/libmsrpc source/libndr source/libsmb source/locki
Author: ab Date: 2006-07-01 08:11:22 + (Sat, 01 Jul 2006) New Revision: 16726 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16726 Log: Merge with trunk -r 16558:16723 Modified: branches/tmp/vl-messaging/examples/misc/adssearch.pl branches/tmp/vl-messaging/source/Makefile.in branches/tmp/vl-messaging/source/auth/auth_ntlmssp.c branches/tmp/vl-messaging/source/auth/auth_util.c branches/tmp/vl-messaging/source/client/client.c branches/tmp/vl-messaging/source/client/smbctool.c branches/tmp/vl-messaging/source/client/smbspool.c branches/tmp/vl-messaging/source/configure.in branches/tmp/vl-messaging/source/include/passdb.h branches/tmp/vl-messaging/source/include/rpc_samr.h branches/tmp/vl-messaging/source/include/rpc_srvsvc.h branches/tmp/vl-messaging/source/include/session.h branches/tmp/vl-messaging/source/include/smb.h branches/tmp/vl-messaging/source/include/socket_wrapper.h branches/tmp/vl-messaging/source/include/talloc.h branches/tmp/vl-messaging/source/lib/interface.c branches/tmp/vl-messaging/source/lib/smbldap.c branches/tmp/vl-messaging/source/lib/talloc.c branches/tmp/vl-messaging/source/lib/talloctort.c branches/tmp/vl-messaging/source/lib/util_reg.c branches/tmp/vl-messaging/source/lib/util_str.c branches/tmp/vl-messaging/source/libads/ldap.c branches/tmp/vl-messaging/source/libads/ldap_schema.c branches/tmp/vl-messaging/source/libmsrpc/cac_lsarpc.c branches/tmp/vl-messaging/source/libmsrpc/cac_winreg.c branches/tmp/vl-messaging/source/libmsrpc/libmsrpc_internal.c branches/tmp/vl-messaging/source/libndr/ndr.c branches/tmp/vl-messaging/source/libsmb/clirap.c branches/tmp/vl-messaging/source/libsmb/clirap2.c branches/tmp/vl-messaging/source/libsmb/libsmbclient.c branches/tmp/vl-messaging/source/libsmb/smb_signing.c branches/tmp/vl-messaging/source/locking/locking.c branches/tmp/vl-messaging/source/nmbd/nmbd.c branches/tmp/vl-messaging/source/nmbd/nmbd_namelistdb.c branches/tmp/vl-messaging/source/nmbd/nmbd_serverlistdb.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/wb_client.c branches/tmp/vl-messaging/source/nsswitch/winbindd_misc.c branches/tmp/vl-messaging/source/nsswitch/winbindd_pam.c branches/tmp/vl-messaging/source/nsswitch/winbindd_passdb.c branches/tmp/vl-messaging/source/nsswitch/winbindd_rpc.c branches/tmp/vl-messaging/source/nsswitch/winbindd_user.c branches/tmp/vl-messaging/source/param/params.c branches/tmp/vl-messaging/source/passdb/lookup_sid.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/passdb/secrets.c branches/tmp/vl-messaging/source/popt/popt.c branches/tmp/vl-messaging/source/printing/nt_printing.c branches/tmp/vl-messaging/source/printing/printing.c branches/tmp/vl-messaging/source/python/py_lsa.c branches/tmp/vl-messaging/source/registry/reg_eventlog.c branches/tmp/vl-messaging/source/registry/reg_perfcount.c branches/tmp/vl-messaging/source/registry/reg_printing.c branches/tmp/vl-messaging/source/rpc_client/cli_lsarpc.c branches/tmp/vl-messaging/source/rpc_client/cli_srvsvc.c branches/tmp/vl-messaging/source/rpc_parse/parse_eventlog.c branches/tmp/vl-messaging/source/rpc_parse/parse_samr.c branches/tmp/vl-messaging/source/rpc_parse/parse_srv.c branches/tmp/vl-messaging/source/rpc_server/srv_pipe.c branches/tmp/vl-messaging/source/rpc_server/srv_pipe_hnd.c branches/tmp/vl-messaging/source/rpc_server/srv_samr_nt.c branches/tmp/vl-messaging/source/rpc_server/srv_samr_util.c branches/tmp/vl-messaging/source/rpc_server/srv_srvsvc.c branches/tmp/vl-messaging/source/rpc_server/srv_srvsvc_nt.c branches/tmp/vl-messaging/source/rpcclient/cmd_lsarpc.c branches/tmp/vl-messaging/source/rpcclient/cmd_samr.c branches/tmp/vl-messaging/source/rpcclient/cmd_spoolss.c branches/tmp/vl-messaging/source/smbd/connection.c branches/tmp/vl-messaging/source/smbd/map_username.c branches/tmp/vl-messaging/source/smbd/nttrans.c branches/tmp/vl-messaging/source/smbd/pipes.c branches/tmp/vl-messaging/source/smbd/posix_acls.c branches/tmp/vl-messaging/source/smbd/sec_ctx.c branches/tmp/vl-messaging/source/smbd/service.c branches/tmp/vl-messaging/source/smbd/session.c branches/tmp/vl-messaging/source/utils/eventlogadm.c branches/tmp/vl-messaging/source/utils/net_rpc.c branches/tmp/vl-messaging/source/utils/net_rpc_registry.c branches/tmp/vl-messaging/source/utils/net_rpc_rights.c branches/tmp/vl-messaging/source/utils/net_usershare.c
svn commit: samba r16727 - in trunk/source/nsswitch: .
Author: vlendec Date: 2006-07-01 10:55:15 + (Sat, 01 Jul 2006) New Revision: 16727 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16727 Log: Get rid of some warnings of the AIX compiler. Volker Modified: trunk/source/nsswitch/winbindd_async.c Changeset: Modified: trunk/source/nsswitch/winbindd_async.c === --- trunk/source/nsswitch/winbindd_async.c 2006-07-01 08:11:22 UTC (rev 16726) +++ trunk/source/nsswitch/winbindd_async.c 2006-07-01 10:55:15 UTC (rev 16727) @@ -116,7 +116,7 @@ struct winbindd_response *response, void *c, void *private_data) { - void (*cont)(void *priv, BOOL succ) = c; + void (*cont)(void *priv, BOOL succ) = (void (*)(void *, BOOL))c; if (!success) { DEBUG(5, (Could not trigger idmap_set_mapping\n)); @@ -149,7 +149,7 @@ sid_to_string(request.data.dual_idmapset.sid, sid); do_async(mem_ctx, idmap_child(), request, idmap_set_mapping_recv, -cont, private_data); +(void *)cont, private_data); } enum winbindd_result winbindd_dual_idmapset(struct winbindd_domain *domain, @@ -188,7 +188,7 @@ sid_to_string(request.data.dual_sid2id.sid, sid); request.data.dual_sid2id.alloc = alloc; do_async(mem_ctx, idmap_child(), request, idmap_sid2uid_recv, -cont, private_data); +(void *)cont, private_data); } enum winbindd_result winbindd_dual_sid2uid(struct winbindd_domain *domain, @@ -220,7 +220,8 @@ struct winbindd_response *response, void *c, void *private_data) { - void (*cont)(void *priv, BOOL succ, uid_t uid) = c; + void (*cont)(void *priv, BOOL succ, uid_t uid) = + (void (*)(void *, BOOL, uid_t))c; if (!success) { DEBUG(5, (Could not trigger sid2uid\n)); @@ -251,7 +252,7 @@ request.cmd = WINBINDD_DUAL_UID2NAME; request.data.uid = uid; do_async(mem_ctx, idmap_child(), request, uid2name_recv, -cont, private_data); +(void *)cont, private_data); } enum winbindd_result winbindd_dual_uid2name(struct winbindd_domain *domain, @@ -277,7 +278,8 @@ struct winbindd_response *response, void *c, void *private_data) { - void (*cont)(void *priv, BOOL succ, const char *name) = c; + void (*cont)(void *priv, BOOL succ, const char *name) = + (void (*)(void *, BOOL, const char *))c; if (!success) { DEBUG(5, (Could not trigger uid2name\n)); @@ -336,7 +338,8 @@ struct winbindd_response *response, void *c, void *private_data) { - void (*cont)(void *priv, BOOL succ, uid_t uid) = c; + void (*cont)(void *priv, BOOL succ, uid_t uid) = + (void (*)(void *, BOOL, uid_t))c; if (!success) { DEBUG(5, (Could not trigger name2uid\n)); @@ -412,7 +415,8 @@ struct winbindd_response *response, void *c, void *private_data) { - void (*cont)(void *priv, BOOL succ, gid_t gid) = c; + void (*cont)(void *priv, BOOL succ, gid_t gid) = + (void (*)(void *, BOOL, gid_t))c; if (!success) { DEBUG(5, (Could not trigger sid2gid\n)); @@ -433,7 +437,8 @@ struct winbindd_response *response, void *c, void *private_data) { - void (*cont)(void *priv, BOOL succ, const char *name) = c; + void (*cont)(void *priv, BOOL succ, const char *name) = + (void (*)(void *, BOOL, const char *))c; if (!success) { DEBUG(5, (Could not trigger gid2name\n)); @@ -521,7 +526,8 @@ struct winbindd_response *response, void *c, void *private_data) { - void (*cont)(void *priv, BOOL succ, gid_t gid) = c; + void (*cont)(void *priv, BOOL succ, gid_t gid) = + (void (*)(void *, BOOL, gid_t))c; if (!success) { DEBUG(5, (Could not trigger name2gid\n)); @@ -544,7 +550,9 @@ void *c, void *private_data) { void (*cont)(void *priv, BOOL succ, const char *dom_name, -const char *name, enum SID_NAME_USE type) = c; +const char *name, enum SID_NAME_USE type) = + (void (*)(void *, BOOL, const char *, const char *, + enum SID_NAME_USE))c; if (!success) { DEBUG(5, (Could not trigger lookupsid\n)); @@ -628,7 +636,8 @@ void *c, void *private_data) { void (*cont)(void *priv, BOOL succ, const DOM_SID *sid, -
svn commit: samba r16729 - in trunk/source: lib rpc_parse rpc_server
Author: vlendec Date: 2006-07-01 12:14:45 + (Sat, 01 Jul 2006) New Revision: 16729 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16729 Log: Finally read about the type punned warnings http://lists.suse.com/archive/suse-programming/2003-Sep/0052.html starts a (German, I'm afraid) thread about that topic. One important finding: The GCC -fstrict-aliasing option that is activates warnings about non-standard-C assumptions we make in the code about pointer targets. One result is that we can't use void ** as function parameters, as this is not covered by the 'can point to anything' exception in the C standard. This fixes a ton of these warnings (according to the mailthread they are real bugs) by changing the function prototype of convert_string_allocate and prs_pointer. More to come. Volker Modified: trunk/source/lib/charcnv.c trunk/source/lib/util_reg.c trunk/source/rpc_parse/parse_eventlog.c trunk/source/rpc_parse/parse_lsa.c trunk/source/rpc_parse/parse_ntsvcs.c trunk/source/rpc_parse/parse_prs.c trunk/source/rpc_parse/parse_reg.c trunk/source/rpc_parse/parse_samr.c trunk/source/rpc_parse/parse_shutdown.c trunk/source/rpc_parse/parse_spoolss.c trunk/source/rpc_parse/parse_srv.c trunk/source/rpc_parse/parse_svcctl.c trunk/source/rpc_server/srv_samr_nt.c Changeset: Sorry, the patch is too large (520 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16729
svn commit: samba r16730 - in branches/SAMBA_4_0/source/ntvfs: .
Author: metze Date: 2006-07-01 14:04:28 + (Sat, 01 Jul 2006) New Revision: 16730 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16730 Log: that is correct... metze Modified: branches/SAMBA_4_0/source/ntvfs/ntvfs_generic.c Changeset: Modified: branches/SAMBA_4_0/source/ntvfs/ntvfs_generic.c === --- branches/SAMBA_4_0/source/ntvfs/ntvfs_generic.c 2006-07-01 12:14:45 UTC (rev 16729) +++ branches/SAMBA_4_0/source/ntvfs/ntvfs_generic.c 2006-07-01 14:04:28 UTC (rev 16730) @@ -215,8 +215,7 @@ io-smb2.out.change_time= io2-generic.out.change_time; io-smb2.out.alloc_size = io2-generic.out.alloc_size; io-smb2.out.size = io2-generic.out.size; - /*io-smb2.out.file_attr= io2-generic.out.attrib; would this be correct? */ - io-smb2.out.file_attr = 0; + io-smb2.out.file_attr = io2-generic.out.attrib; io-smb2.out._pad = 0; io-smb2.out.blob = data_blob(NULL, 0); break;
svn commit: samba r16731 - in branches/SAMBA_4_0/source/smb_server/smb2: .
Author: metze Date: 2006-07-01 14:10:07 + (Sat, 01 Jul 2006) New Revision: 16731 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16731 Log: send a better error code, required for vista-beta2 client metze Modified: branches/SAMBA_4_0/source/smb_server/smb2/fileio.c Changeset: Modified: branches/SAMBA_4_0/source/smb_server/smb2/fileio.c === --- branches/SAMBA_4_0/source/smb_server/smb2/fileio.c 2006-07-01 14:04:28 UTC (rev 16730) +++ branches/SAMBA_4_0/source/smb_server/smb2/fileio.c 2006-07-01 14:10:07 UTC (rev 16731) @@ -232,7 +232,7 @@ void smb2srv_ioctl_recv(struct smb2srv_request *req) { - smb2srv_send_error(req, NT_STATUS_NOT_IMPLEMENTED); + smb2srv_send_error(req, NT_STATUS_FS_DRIVER_REQUIRED); } void smb2srv_cancel_recv(struct smb2srv_request *req)
svn commit: samba r16732 - in branches/SAMBA_4_0/source/smb_server/smb2: .
Author: metze Date: 2006-07-01 14:11:00 + (Sat, 01 Jul 2006) New Revision: 16732 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16732 Log: use the given macros metze Modified: branches/SAMBA_4_0/source/smb_server/smb2/tcon.c Changeset: Modified: branches/SAMBA_4_0/source/smb_server/smb2/tcon.c === --- branches/SAMBA_4_0/source/smb_server/smb2/tcon.c2006-07-01 14:10:07 UTC (rev 16731) +++ branches/SAMBA_4_0/source/smb_server/smb2/tcon.c2006-07-01 14:11:00 UTC (rev 16732) @@ -262,19 +262,12 @@ static void smb2srv_tcon_send(struct smb2srv_request *req, union smb_tcon *io) { - NTSTATUS status; - if (NT_STATUS_IS_ERR(req-status)) { smb2srv_send_error(req, req-status); return; } - status = smb2srv_setup_reply(req, 0x10, False, 0); - if (!NT_STATUS_IS_OK(status)) { - smbsrv_terminate_connection(req-smb_conn, nt_errstr(status)); - talloc_free(req); - return; - } + SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x10, False, 0)); SBVAL(req-out.hdr, SMB2_HDR_TID, io-smb2.out.tid); @@ -289,28 +282,13 @@ void smb2srv_tcon_recv(struct smb2srv_request *req) { union smb_tcon *io; - NTSTATUS status; - if (req-in.body_size 0x08) { - smb2srv_send_error(req, NT_STATUS_FOOBAR); - return; - } + SMB2SRV_CHECK_BODY_SIZE(req, 0x08, True); + SMB2SRV_TALLOC_IO_PTR(io, union smb_tcon); - io = talloc(req, union smb_tcon); - if (!io) { - smbsrv_terminate_connection(req-smb_conn, nt_errstr(NT_STATUS_NO_MEMORY)); - talloc_free(req); - return; - } - io-smb2.level = RAW_TCON_SMB2; io-smb2.in.unknown1= SVAL(req-in.body, 0x02); - status = smb2_pull_o16s16_string(req-in, io, req-in.body+0x04, io-smb2.in.path); - if (!NT_STATUS_IS_OK(status)) { - smbsrv_terminate_connection(req-smb_conn, nt_errstr(status)); - talloc_free(req); - return; - } + SMB2SRV_CHECK(smb2_pull_o16s16_string(req-in, io, req-in.body+0x04, io-smb2.in.path)); req-status = smb2srv_tcon_backend(req, io); @@ -354,10 +332,7 @@ { uint16_t _pad; - if (req-in.body_size 0x04) { - smb2srv_send_error(req, NT_STATUS_FOOBAR); - return; - } + SMB2SRV_CHECK_BODY_SIZE(req, 0x04, False); _pad= SVAL(req-in.body, 0x02);
svn commit: samba r16733 - in branches/SAMBA_4_0/source/smb_server/smb2: .
Author: metze Date: 2006-07-01 14:12:13 + (Sat, 01 Jul 2006) New Revision: 16733 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16733 Log: implement SMB2 SetInfo metze Modified: branches/SAMBA_4_0/source/smb_server/smb2/fileinfo.c Changeset: Modified: branches/SAMBA_4_0/source/smb_server/smb2/fileinfo.c === --- branches/SAMBA_4_0/source/smb_server/smb2/fileinfo.c2006-07-01 14:11:00 UTC (rev 16732) +++ branches/SAMBA_4_0/source/smb_server/smb2/fileinfo.c2006-07-01 14:12:13 UTC (rev 16733) @@ -255,7 +255,22 @@ static NTSTATUS smb2srv_setinfo_file(struct smb2srv_setinfo_op *op, uint8_t smb2_level) { - return NT_STATUS_FOOBAR; + union smb_setfileinfo *io; + NTSTATUS status; + + io = talloc(op, union smb_setfileinfo); + NT_STATUS_HAVE_NO_MEMORY(io); + + /* the levels directly map to the passthru levels */ + io-generic.level = smb2_level + 1000; + io-generic.in.file.ntvfs = op-info-in.file.ntvfs; + + status = smbsrv_pull_passthru_sfileinfo(io, io-generic.level, io, + op-info-in.blob, + STR_UNICODE, NULL); + NT_STATUS_NOT_OK_RETURN(status); + + return ntvfs_setfileinfo(op-req-ntvfs, io); } static NTSTATUS smb2srv_setinfo_fs(struct smb2srv_setinfo_op *op, uint8_t smb2_level)
svn commit: samba r16734 - in branches/SAMBA_4_0/source: libcli/smb2 smb_server/smb2
Author: metze Date: 2006-07-01 14:14:11 + (Sat, 01 Jul 2006) New Revision: 16734 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16734 Log: the 2 bytes after the opcode and before the flags, is no padding... the following patch is needed for vista beta2 to connect to samba4 metze Modified: branches/SAMBA_4_0/source/libcli/smb2/request.c branches/SAMBA_4_0/source/libcli/smb2/smb2.h branches/SAMBA_4_0/source/smb_server/smb2/negprot.c branches/SAMBA_4_0/source/smb_server/smb2/receive.c branches/SAMBA_4_0/source/smb_server/smb2/sesssetup.c Changeset: Modified: branches/SAMBA_4_0/source/libcli/smb2/request.c === --- branches/SAMBA_4_0/source/libcli/smb2/request.c 2006-07-01 14:12:13 UTC (rev 16733) +++ branches/SAMBA_4_0/source/libcli/smb2/request.c 2006-07-01 14:14:11 UTC (rev 16734) @@ -78,9 +78,9 @@ SSVAL(req-out.hdr, SMB2_HDR_PAD1,0); SIVAL(req-out.hdr, SMB2_HDR_STATUS, 0); SSVAL(req-out.hdr, SMB2_HDR_OPCODE, opcode); - SSVAL(req-out.hdr, SMB2_HDR_PAD2,0); + SSVAL(req-out.hdr, SMB2_HDR_UNKNOWN1,0); SIVAL(req-out.hdr, SMB2_HDR_FLAGS, 0); - SIVAL(req-out.hdr, SMB2_HDR_UNKNOWN, 0); + SIVAL(req-out.hdr, SMB2_HDR_UNKNOWN2,0); SBVAL(req-out.hdr, SMB2_HDR_SEQNUM, req-seqnum); SIVAL(req-out.hdr, SMB2_HDR_PID, 0); SIVAL(req-out.hdr, SMB2_HDR_TID, 0); Modified: branches/SAMBA_4_0/source/libcli/smb2/smb2.h === --- branches/SAMBA_4_0/source/libcli/smb2/smb2.h2006-07-01 14:12:13 UTC (rev 16733) +++ branches/SAMBA_4_0/source/libcli/smb2/smb2.h2006-07-01 14:14:11 UTC (rev 16734) @@ -143,19 +143,19 @@ #define SMB2_MIN_SIZE 0x42 /* offsets into header elements */ -#define SMB2_HDR_LENGTH 0x04 -#define SMB2_HDR_PAD10x06 -#define SMB2_HDR_STATUS 0x08 -#define SMB2_HDR_OPCODE 0x0c -#define SMB2_HDR_PAD20x0e -#define SMB2_HDR_FLAGS 0x10 -#define SMB2_HDR_UNKNOWN 0x14 -#define SMB2_HDR_SEQNUM 0x18 -#define SMB2_HDR_PID 0x20 -#define SMB2_HDR_TID 0x24 -#define SMB2_HDR_UID 0x28 /* 64 bit */ -#define SMB2_HDR_SIG 0x30 /* guess ... */ -#define SMB2_HDR_BODY0x40 +#define SMB2_HDR_LENGTH0x04 +#define SMB2_HDR_PAD1 0x06 +#define SMB2_HDR_STATUS0x08 +#define SMB2_HDR_OPCODE0x0c +#define SMB2_HDR_UNKNOWN1 0x0e +#define SMB2_HDR_FLAGS 0x10 +#define SMB2_HDR_UNKNOWN2 0x14 +#define SMB2_HDR_SEQNUM0x18 +#define SMB2_HDR_PID 0x20 +#define SMB2_HDR_TID 0x24 +#define SMB2_HDR_UID 0x28 /* 64 bit */ +#define SMB2_HDR_SIG 0x30 /* guess ... */ +#define SMB2_HDR_BODY 0x40 /* SMB2 opcodes */ #define SMB2_OP_NEGPROT 0x00 Modified: branches/SAMBA_4_0/source/smb_server/smb2/negprot.c === --- branches/SAMBA_4_0/source/smb_server/smb2/negprot.c 2006-07-01 14:12:13 UTC (rev 16733) +++ branches/SAMBA_4_0/source/smb_server/smb2/negprot.c 2006-07-01 14:14:11 UTC (rev 16734) @@ -204,9 +204,9 @@ SSVAL(req-in.hdr, SMB2_HDR_PAD1,0); SIVAL(req-in.hdr, SMB2_HDR_STATUS, 0); SSVAL(req-in.hdr, SMB2_HDR_OPCODE, SMB2_OP_NEGPROT); - SSVAL(req-in.hdr, SMB2_HDR_PAD2,0); + SSVAL(req-in.hdr, SMB2_HDR_UNKNOWN1,0); SIVAL(req-in.hdr, SMB2_HDR_FLAGS, 0); - SIVAL(req-in.hdr, SMB2_HDR_UNKNOWN, 0); + SIVAL(req-in.hdr, SMB2_HDR_UNKNOWN2,0); SBVAL(req-in.hdr, SMB2_HDR_SEQNUM, 0); SIVAL(req-in.hdr, SMB2_HDR_PID, 0); SIVAL(req-in.hdr, SMB2_HDR_TID, 0); Modified: branches/SAMBA_4_0/source/smb_server/smb2/receive.c === --- branches/SAMBA_4_0/source/smb_server/smb2/receive.c 2006-07-01 14:12:13 UTC (rev 16733) +++ branches/SAMBA_4_0/source/smb_server/smb2/receive.c 2006-07-01 14:14:11 UTC (rev 16734) @@ -69,9 +69,9 @@ SSVAL(req-out.hdr, SMB2_HDR_PAD1,0); SIVAL(req-out.hdr, SMB2_HDR_STATUS, NT_STATUS_V(req-status)); SSVAL(req-out.hdr, SMB2_HDR_OPCODE, SVAL(req-in.hdr, SMB2_HDR_OPCODE)); - SSVAL(req-out.hdr, SMB2_HDR_PAD2,0); + SSVAL(req-out.hdr, SMB2_HDR_UNKNOWN1,0x0001); SIVAL(req-out.hdr, SMB2_HDR_FLAGS, 0x0001); - SIVAL(req-out.hdr, SMB2_HDR_UNKNOWN, 0); + SIVAL(req-out.hdr, SMB2_HDR_UNKNOWN2,0); SBVAL(req-out.hdr, SMB2_HDR_SEQNUM, req-seqnum); SIVAL(req-out.hdr, SMB2_HDR_PID, IVAL(req-in.hdr, SMB2_HDR_PID)); SIVAL(req-out.hdr, SMB2_HDR_TID, IVAL(req-in.hdr, SMB2_HDR_TID)); Modified: branches/SAMBA_4_0/source/smb_server/smb2/sesssetup.c === --- branches/SAMBA_4_0/source/smb_server/smb2/sesssetup.c
svn commit: samba r16735 - in branches/SAMBA_4_0/source/smb_server/smb: .
Author: metze Date: 2006-07-01 14:18:20 + (Sat, 01 Jul 2006) New Revision: 16735 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16735 Log: vista beta2 reuses the tcp connect where it does the SMB negprot metze Modified: branches/SAMBA_4_0/source/smb_server/smb/negprot.c Changeset: Modified: branches/SAMBA_4_0/source/smb_server/smb/negprot.c === --- branches/SAMBA_4_0/source/smb_server/smb/negprot.c 2006-07-01 14:14:11 UTC (rev 16734) +++ branches/SAMBA_4_0/source/smb_server/smb/negprot.c 2006-07-01 14:18:20 UTC (rev 16735) @@ -421,18 +421,6 @@ smbsrv_send_reply_nosign(req); } -/* - after a SMB2 2.001 negprot reply to a SMB negprot request - no (SMB or SMB2) requests are allowed anymore, - vista resets the connection in this case -*/ -static NTSTATUS smbsrv_recv_disabled_request(void *private, DATA_BLOB blob) -{ - struct smbsrv_connection *smb_conn = talloc_get_type(private, struct smbsrv_connection); - smbsrv_terminate_connection(smb_conn, Receive Packet after SMB - SMB2 negprot); - return NT_STATUS_OK; -} - / Reply for the SMB2 2.001 protocol / @@ -441,11 +429,9 @@ struct smbsrv_connection *smb_conn = req-smb_conn; /* reply with a SMB2 packet */ + packet_set_callback(smb_conn-packet, smbsrv_recv_smb2_request); smb2srv_reply_smb_negprot(req); req = NULL; - - /* disallow requests */ - packet_set_callback(smb_conn-packet, smbsrv_recv_disabled_request); } /* List of supported protocols, most desired first */
svn commit: samba r16736 - in branches/SAMBA_4_0/source/torture/smb2: .
Author: metze Date: 2006-07-01 14:20:14 + (Sat, 01 Jul 2006) New Revision: 16736 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16736 Log: - convert unix times to nttime before sending it to the wire... - return an error code if an error happens metze Modified: branches/SAMBA_4_0/source/torture/smb2/util.c Changeset: Modified: branches/SAMBA_4_0/source/torture/smb2/util.c === --- branches/SAMBA_4_0/source/torture/smb2/util.c 2006-07-01 14:18:20 UTC (rev 16735) +++ branches/SAMBA_4_0/source/torture/smb2/util.c 2006-07-01 14:20:14 UTC (rev 16736) @@ -147,15 +147,16 @@ setfile.generic.level = RAW_SFILEINFO_BASIC_INFORMATION; setfile.generic.in.file.handle = *handle; - setfile.basic_info.in.create_time = t + 9*30*24*60*60; - setfile.basic_info.in.access_time = t + 6*30*24*60*60; - setfile.basic_info.in.write_time = t + 3*30*24*60*60; - setfile.basic_info.in.change_time = t + 1*30*24*60*60; + unix_to_nt_time(setfile.basic_info.in.create_time, t + 9*30*24*60*60); + unix_to_nt_time(setfile.basic_info.in.access_time, t + 6*30*24*60*60); + unix_to_nt_time(setfile.basic_info.in.write_time, t + 3*30*24*60*60); + unix_to_nt_time(setfile.basic_info.in.change_time, t + 1*30*24*60*60); setfile.basic_info.in.attrib = FILE_ATTRIBUTE_NORMAL; status = smb2_setinfo_file(tree, setfile); if (!NT_STATUS_IS_OK(status)) { printf(Failed to setup file times - %s\n, nt_errstr(status)); + return status; } /* make sure all the timestamps aren't the same */ @@ -165,19 +166,28 @@ status = smb2_getinfo_file(tree, tree, fileinfo); if (!NT_STATUS_IS_OK(status)) { printf(Failed to query file times - %s\n, nt_errstr(status)); + return status; + } - if (setfile.basic_info.in.create_time != fileinfo.basic_info.out.create_time) { - printf(create_time not setup correctly\n); - } - if (setfile.basic_info.in.access_time != fileinfo.basic_info.out.access_time) { - printf(access_time not setup correctly\n); - } - if (setfile.basic_info.in.write_time != fileinfo.basic_info.out.write_time) { - printf(write_time not setup correctly\n); - } - - return NT_STATUS_OK; +#define CHECK_TIME(field) do {\ + if (setfile.basic_info.in.field != fileinfo.basic_info.out.field) { \ + printf((%s) #field not setup correctly: %s(%llu) = %s(%llu)\n, \ + __location__, \ + nt_time_string(tree, setfile.basic_info.in.field), \ + setfile.basic_info.in.field, \ + nt_time_string(tree, fileinfo.basic_info.out.field), \ + fileinfo.basic_info.out.field); \ + status = NT_STATUS_INVALID_PARAMETER; \ + } \ +} while (0) + + CHECK_TIME(create_time); + CHECK_TIME(access_time); + CHECK_TIME(write_time); + CHECK_TIME(change_time); + + return status; } /*
svn commit: samba r16737 - in branches/SAMBA_4_0/source/torture/smb2: .
Author: metze Date: 2006-07-01 14:21:21 + (Sat, 01 Jul 2006) New Revision: 16737 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16737 Log: if an error happens report it metze Modified: branches/SAMBA_4_0/source/torture/smb2/getinfo.c branches/SAMBA_4_0/source/torture/smb2/setinfo.c Changeset: Modified: branches/SAMBA_4_0/source/torture/smb2/getinfo.c === --- branches/SAMBA_4_0/source/torture/smb2/getinfo.c2006-07-01 14:20:14 UTC (rev 16736) +++ branches/SAMBA_4_0/source/torture/smb2/getinfo.c2006-07-01 14:21:21 UTC (rev 16737) @@ -113,13 +113,17 @@ file_levels[i].finfo.generic.in.file.handle = hfile; file_levels[i].fstatus = smb2_getinfo_file(tree, tree, file_levels[i].finfo); if (!NT_STATUS_IS_OK(file_levels[i].fstatus)) { - printf(%s failed on file - %s\n, file_levels[i].name, nt_errstr(file_levels[i].fstatus)); + printf((%s) %s failed on file - %s\n, __location__, + file_levels[i].name, nt_errstr(file_levels[i].fstatus)); + goto failed; } file_levels[i].dinfo.generic.level = file_levels[i].level; file_levels[i].dinfo.generic.in.file.handle = hdir; file_levels[i].dstatus = smb2_getinfo_file(tree, tree, file_levels[i].dinfo); if (!NT_STATUS_IS_OK(file_levels[i].dstatus)) { - printf(%s failed on dir - %s\n, file_levels[i].name, nt_errstr(file_levels[i].dstatus)); + printf((%s) %s failed on dir - %s\n, __location__, + file_levels[i].name, nt_errstr(file_levels[i].dstatus)); + goto failed; } } @@ -152,6 +156,7 @@ fs_levels[i].status = smb2_getinfo_fs(tree, tree, fs_levels[i].info); if (!NT_STATUS_IS_OK(fs_levels[i].status)) { printf(%s failed - %s\n, fs_levels[i].name, nt_errstr(fs_levels[i].status)); + return False; } } Modified: branches/SAMBA_4_0/source/torture/smb2/setinfo.c === --- branches/SAMBA_4_0/source/torture/smb2/setinfo.c2006-07-01 14:20:14 UTC (rev 16736) +++ branches/SAMBA_4_0/source/torture/smb2/setinfo.c2006-07-01 14:21:21 UTC (rev 16737) @@ -89,6 +89,7 @@ printf((%s) %s - %s (should be %s)\n, __location__, #call, \ nt_errstr(status), nt_errstr(rightstatus)); \ ret = False; \ + goto done; \ } \ } while (0) @@ -99,6 +100,8 @@ status2 = smb2_getinfo_file(tree, mem_ctx, finfo2); \ if (!NT_STATUS_IS_OK(status2)) { \ printf((%s) %s - %s\n, __location__, #call, nt_errstr(status2)); \ + ret = False; \ + goto done; \ } \ }} while (0) @@ -109,6 +112,8 @@ call_name, #stype, #field, \ (uint_t)value, (uint_t)finfo2.stype.out.field); \ torture_smb2_all_info(tree, handle); \ + ret = False; \ + goto done; \ }} while (0) #define CHECK_TIME(call, stype, field, value) do { \ @@ -121,6 +126,8 @@ printf(\t%s, timestring(mem_ctx, value)); \ printf(\t%s\n, nt_time_string(mem_ctx, finfo2.stype.out.field)); \ torture_smb2_all_info(tree, handle); \ + ret = False; \ + goto done; \ }} while (0) #define CHECK_STR(call, stype, field, value) do { \ @@ -131,6 +138,8 @@ value, \ finfo2.stype.out.field); \ torture_smb2_all_info(tree, handle); \ + ret = False; \ + goto done; \ }} while (0) #define CHECK_STATUS(status, correct) do { \
svn commit: samba r16738 - in branches/SAMBA_4_0/source: smb_server/smb2 torture/smb2
Author: metze Date: 2006-07-01 14:27:49 + (Sat, 01 Jul 2006) New Revision: 16738 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16738 Log: vista beta2 use FILE_CLOSED as error for an invalid file handle metze Modified: branches/SAMBA_4_0/source/smb_server/smb2/smb2_server.h branches/SAMBA_4_0/source/torture/smb2/connect.c branches/SAMBA_4_0/source/torture/smb2/lock.c 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-07-01 14:21:21 UTC (rev 16737) +++ branches/SAMBA_4_0/source/smb_server/smb2/smb2_server.h 2006-07-01 14:27:49 UTC (rev 16738) @@ -116,7 +116,7 @@ #define SMB2SRV_CHECK_FILE_HANDLE(handle) do { \ if (!handle) { \ - smb2srv_send_error(req, NT_STATUS_NOT_FOUND); \ + smb2srv_send_error(req, NT_STATUS_FILE_CLOSED); \ return; \ } \ } while (0) Modified: branches/SAMBA_4_0/source/torture/smb2/connect.c === --- branches/SAMBA_4_0/source/torture/smb2/connect.c2006-07-01 14:21:21 UTC (rev 16737) +++ branches/SAMBA_4_0/source/torture/smb2/connect.c2006-07-01 14:27:49 UTC (rev 16738) @@ -220,7 +220,7 @@ } status = smb2_util_close(tree, h1); - if (!NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) { + if (!NT_STATUS_EQUAL(status, NT_STATUS_FILE_CLOSED)) { printf(close should have closed the handle - %s\n, nt_errstr(status)); return False; } Modified: branches/SAMBA_4_0/source/torture/smb2/lock.c === --- branches/SAMBA_4_0/source/torture/smb2/lock.c 2006-07-01 14:21:21 UTC (rev 16737) +++ branches/SAMBA_4_0/source/torture/smb2/lock.c 2006-07-01 14:27:49 UTC (rev 16738) @@ -82,7 +82,7 @@ lck.in.file.handle.data[0] +=1; status = smb2_lock(tree, lck); - CHECK_STATUS(status, NT_STATUS_NOT_FOUND); + CHECK_STATUS(status, NT_STATUS_FILE_CLOSED); lck.in.file.handle.data[0] -=1; lck.in.unknown1 = 0x0001;
svn commit: samba r16739 - in branches/SAMBA_4_0/source: script/tests torture/smb2
Author: metze Date: 2006-07-01 14:31:20 + (Sat, 01 Jul 2006) New Revision: 16739 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16739 Log: test SMB2-GETINFO SMB2-SETINFO by make test metze Modified: branches/SAMBA_4_0/source/script/tests/test_posix.sh branches/SAMBA_4_0/source/torture/smb2/getinfo.c Changeset: Modified: branches/SAMBA_4_0/source/script/tests/test_posix.sh === --- branches/SAMBA_4_0/source/script/tests/test_posix.sh2006-07-01 14:27:49 UTC (rev 16738) +++ branches/SAMBA_4_0/source/script/tests/test_posix.sh2006-07-01 14:31:20 UTC (rev 16739) @@ -43,7 +43,7 @@ raw=$raw RAW-QFILEINFO RAW-QFSINFO RAW-READ RAW-RENAME RAW-SEARCH RAW-SEEK raw=$raw RAW-SFILEINFO RAW-SFILEINFO-BUG RAW-STREAMS RAW-UNLINK RAW-WRITE -smb2=SMB2-CONNECT +smb2=SMB2-CONNECT SMB2-GETINFO SMB2-SETINFO tests=$base $raw $smb2 Modified: branches/SAMBA_4_0/source/torture/smb2/getinfo.c === --- branches/SAMBA_4_0/source/torture/smb2/getinfo.c2006-07-01 14:27:49 UTC (rev 16738) +++ branches/SAMBA_4_0/source/torture/smb2/getinfo.c2006-07-01 14:31:20 UTC (rev 16739) @@ -104,6 +104,9 @@ file_levels[i].dinfo.query_secdesc.in.secinfo_flags = 0x7; } if (file_levels[i].level == RAW_FILEINFO_SMB2_ALL_EAS) { + if (lp_parm_bool(-1, target, samba4, False)) { + continue; + } file_levels[i].finfo.all_eas.in.continue_flags = SMB2_CONTINUE_FLAG_RESTART; file_levels[i].dinfo.all_eas.in.continue_flags =
svn commit: samba r16740 - in branches/SAMBA_4_0/source/smb_server/smb2: .
Author: metze Date: 2006-07-01 14:36:04 + (Sat, 01 Jul 2006) New Revision: 16740 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16740 Log: just say the directory is empty metze Modified: branches/SAMBA_4_0/source/smb_server/smb2/fileio.c Changeset: Modified: branches/SAMBA_4_0/source/smb_server/smb2/fileio.c === --- branches/SAMBA_4_0/source/smb_server/smb2/fileio.c 2006-07-01 14:31:20 UTC (rev 16739) +++ branches/SAMBA_4_0/source/smb_server/smb2/fileio.c 2006-07-01 14:36:04 UTC (rev 16740) @@ -242,7 +242,7 @@ void smb2srv_find_recv(struct smb2srv_request *req) { - smb2srv_send_error(req, NT_STATUS_NOT_IMPLEMENTED); + smb2srv_send_error(req, STATUS_NO_MORE_FILES); } void smb2srv_notify_recv(struct smb2srv_request *req)
svn commit: samba r16741 - in branches/SAMBA_4_0/source/torture/rpc: .
Author: metze Date: 2006-07-01 14:41:01 + (Sat, 01 Jul 2006) New Revision: 16741 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16741 Log: add a RPC-LSA-GETUSER test, which is very useful for analysing a windows machine remotely with this I found that vista-beta2 doesn't have an 'administrator' account and mapps any not known user to MACHINENAME\Guest metze Modified: branches/SAMBA_4_0/source/torture/rpc/lsa.c branches/SAMBA_4_0/source/torture/rpc/rpc.c Changeset: Modified: branches/SAMBA_4_0/source/torture/rpc/lsa.c === --- branches/SAMBA_4_0/source/torture/rpc/lsa.c 2006-07-01 14:36:04 UTC (rev 16740) +++ branches/SAMBA_4_0/source/torture/rpc/lsa.c 2006-07-01 14:41:01 UTC (rev 16741) @@ -1755,9 +1755,7 @@ return ret; } -static BOOL test_GetUserName(struct dcerpc_pipe *p, - TALLOC_CTX *mem_ctx, - struct policy_handle *handle) +static BOOL test_GetUserName(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) { struct lsa_GetUserName r; NTSTATUS status; @@ -1766,8 +1764,8 @@ printf(\nTesting GetUserName\n); - r.in.system_name = \\; - r.in.account_name = NULL; + r.in.system_name = \\; + r.in.account_name = NULL; r.in.authority_name = authority_name_p; authority_name_p.string = NULL; @@ -1873,10 +1871,6 @@ ret = False; } - if (!test_GetUserName(p, mem_ctx, handle)) { - ret = False; - } - #if 0 if (!test_Delete(p, mem_ctx, handle)) { ret = False; @@ -1895,8 +1889,36 @@ ret = False; } } + + if (!test_GetUserName(p, mem_ctx)) { + ret = False; + } talloc_free(mem_ctx); return ret; } + +BOOL torture_rpc_lsa_get_user(struct torture_context *torture) +{ +NTSTATUS status; +struct dcerpc_pipe *p; + TALLOC_CTX *mem_ctx; + BOOL ret = True; + + mem_ctx = talloc_init(torture_rpc_lsa_get_user); + + status = torture_rpc_connection(mem_ctx, p, dcerpc_table_lsarpc); + if (!NT_STATUS_IS_OK(status)) { + talloc_free(mem_ctx); + return False; + } + + if (!test_GetUserName(p, mem_ctx)) { + ret = False; + } + + talloc_free(mem_ctx); + + return ret; +} Modified: branches/SAMBA_4_0/source/torture/rpc/rpc.c === --- branches/SAMBA_4_0/source/torture/rpc/rpc.c 2006-07-01 14:36:04 UTC (rev 16740) +++ branches/SAMBA_4_0/source/torture/rpc/rpc.c 2006-07-01 14:41:01 UTC (rev 16741) @@ -97,6 +97,7 @@ register_torture_op(RPC-LSA, torture_rpc_lsa); register_torture_op(RPC-LSALOOKUP, torture_rpc_lsa_lookup); + register_torture_op(RPC-LSA-GETUSER, torture_rpc_lsa_get_user); register_torture_op(RPC-SECRETS, torture_rpc_lsa_secrets); register_torture_op(RPC-ECHO, torture_rpc_echo); register_torture_op(RPC-DFS, torture_rpc_dfs);
svn commit: samba r16742 - in trunk/source/libndr: .
Author: vlendec Date: 2006-07-01 15:12:10 + (Sat, 01 Jul 2006) New Revision: 16742 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16742 Log: Fix an uninitialized variable warning Modified: trunk/source/libndr/ndr.c Changeset: Modified: trunk/source/libndr/ndr.c === --- trunk/source/libndr/ndr.c 2006-07-01 14:41:01 UTC (rev 16741) +++ trunk/source/libndr/ndr.c 2006-07-01 15:12:10 UTC (rev 16742) @@ -151,6 +151,7 @@ DATA_BLOB blob; blob.data = ndr-data; blob.length = ndr-offset; + blob.free = NULL; if (ndr-alloc_size ndr-offset) { ndr-data[ndr-offset] = 0; }
svn commit: samba r16743 - in trunk/source: libndr passdb torture utils
Author: vlendec Date: 2006-07-01 15:21:17 + (Sat, 01 Jul 2006) New Revision: 16743 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16743 Log: Fix some warnings Modified: trunk/source/libndr/ndr_basic.c trunk/source/passdb/pdb_interface.c trunk/source/torture/locktest2.c trunk/source/torture/scanner.c trunk/source/utils/debug2html.c Changeset: Modified: trunk/source/libndr/ndr_basic.c === --- trunk/source/libndr/ndr_basic.c 2006-07-01 15:12:10 UTC (rev 16742) +++ trunk/source/libndr/ndr_basic.c 2006-07-01 15:21:17 UTC (rev 16743) @@ -764,7 +764,7 @@ { ndr-print(ndr, %-25s: DATA_BLOB length=%u, name, r.length); if (r.length) { - dump_data(10, r.data, r.length); + dump_data(10, (const char *)r.data, r.length); } } Modified: trunk/source/passdb/pdb_interface.c === --- trunk/source/passdb/pdb_interface.c 2006-07-01 15:12:10 UTC (rev 16742) +++ trunk/source/passdb/pdb_interface.c 2006-07-01 15:21:17 UTC (rev 16743) @@ -1720,7 +1720,7 @@ static BOOL next_entry_users(struct pdb_search *s, struct samr_displayentry *entry) { - struct user_search *state = s-private_data; + struct user_search *state = (struct user_search *)s-private_data; struct samu *user = NULL; next: @@ -1795,7 +1795,7 @@ static BOOL next_entry_groups(struct pdb_search *s, struct samr_displayentry *entry) { - struct group_search *state = s-private_data; + struct group_search *state = (struct group_search *)s-private_data; uint32 rid; GROUP_MAP *map = state-groups[state-current_group]; @@ -1813,7 +1813,8 @@ static void search_end_groups(struct pdb_search *search) { - struct group_search *state = search-private_data; + struct group_search *state = + (struct group_search *)search-private_data; SAFE_FREE(state-groups); } Modified: trunk/source/torture/locktest2.c === --- trunk/source/torture/locktest2.c2006-07-01 15:12:10 UTC (rev 16742) +++ trunk/source/torture/locktest2.c2006-07-01 15:21:17 UTC (rev 16743) @@ -135,6 +135,7 @@ static void print_brl(SMB_DEV_T dev, SMB_INO_T ino, struct process_id pid, enum brl_type lock_type, + enum brl_flavour lock_flav, br_off start, br_off size) { printf(%6d %05x:%05x%s %.0f:%.0f(%.0f)\n, Modified: trunk/source/torture/scanner.c === --- trunk/source/torture/scanner.c 2006-07-01 15:12:10 UTC (rev 16742) +++ trunk/source/torture/scanner.c 2006-07-01 15:21:17 UTC (rev 16743) @@ -49,7 +49,7 @@ int op, char *param, char *data, int param_len, int data_len, -int *rparam_len, int *rdata_len) +unsigned int *rparam_len, unsigned int *rdata_len) { uint16 setup = op; char *rparam=NULL, *rdata=NULL; @@ -80,7 +80,7 @@ int op, int level, char *param, char *data, int param_len, int *data_len, -int *rparam_len, int *rdata_len) +unsigned int *rparam_len, unsigned int *rdata_len) { NTSTATUS ret=NT_STATUS_OK; @@ -115,7 +115,7 @@ { int data_len = 0; int param_len = 0; - int rparam_len, rdata_len; + unsigned int rparam_len, rdata_len; pstring param, data; NTSTATUS status; @@ -253,7 +253,7 @@ int op, char *param, char *data, int param_len, int data_len, -int *rparam_len, int *rdata_len) +unsigned int *rparam_len, unsigned int *rdata_len) { char *rparam=NULL, *rdata=NULL; @@ -282,7 +282,7 @@ int op, int level, char *param, char *data, int param_len, int *data_len, -int *rparam_len, int *rdata_len) +unsigned int *rparam_len, unsigned int *rdata_len) { NTSTATUS ret=NT_STATUS_OK; @@ -317,7 +317,7 @@ { int data_len = 0; int param_len = 0; - int rparam_len, rdata_len; + unsigned int rparam_len, rdata_len; pstring param, data; NTSTATUS status; Modified: trunk/source/utils/debug2html.c === --- trunk/source/utils/debug2html.c 2006-07-01 15:12:10 UTC (rev 16742) +++
svn commit: samba r16744 - in trunk/source/torture: .
Author: vlendec Date: 2006-07-01 15:22:18 + (Sat, 01 Jul 2006) New Revision: 16744 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16744 Log: Another warning Modified: trunk/source/torture/pdbtest.c Changeset: Modified: trunk/source/torture/pdbtest.c === --- trunk/source/torture/pdbtest.c 2006-07-01 15:21:17 UTC (rev 16743) +++ trunk/source/torture/pdbtest.c 2006-07-01 15:22:18 UTC (rev 16744) @@ -237,7 +237,7 @@ struct pdb_methods *pdb; poptContext pc; static char *backend = NULL; - static char *unix_user = nobody; + static const char *unix_user = nobody; struct poptOption long_options[] = { {username, 'u', POPT_ARG_STRING, unix_user, 0, Unix user to use for testing, USERNAME }, {backend, 'b', POPT_ARG_STRING, backend, 0, Backend to use if not default, BACKEND[:SETTINGS] },
svn commit: samba r16745 - in trunk/source: include lib libads libndr locking nsswitch utils
Author: vlendec Date: 2006-07-01 15:25:21 + (Sat, 01 Jul 2006) New Revision: 16745 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16745 Log: Fix all but three type-punned warnings. I can really understand the compiler freaks out about smbd/vfs.c:107, but changing that is bigger... The other two ones are in auth/auth_winbind.c:160 and auth/auth_script.c:135. Need to look more at those. Volker Modified: trunk/source/include/smb_macros.h trunk/source/lib/charcnv.c trunk/source/lib/util.c trunk/source/libads/ldap.c trunk/source/libndr/ndr_string.c trunk/source/locking/brlock.c trunk/source/nsswitch/pam_winbind.c trunk/source/nsswitch/winbindd_async.c trunk/source/utils/net_ads.c trunk/source/utils/net_rpc_samsync.c trunk/source/utils/ntlm_auth_diagnostics.c Changeset: Modified: trunk/source/include/smb_macros.h === --- trunk/source/include/smb_macros.h 2006-07-01 15:22:18 UTC (rev 16744) +++ trunk/source/include/smb_macros.h 2006-07-01 15:25:21 UTC (rev 16745) @@ -376,6 +376,6 @@ } while (0) #define ADD_TO_LARGE_ARRAY(mem_ctx, type, elem, array, num, size) \ - add_to_large_array((mem_ctx), sizeof(type), (elem), (void **)(array), (num), (size)); + add_to_large_array((mem_ctx), sizeof(type), (elem), (void *)(array), (num), (size)); #endif /* _SMB_MACROS_H */ Modified: trunk/source/lib/charcnv.c === --- trunk/source/lib/charcnv.c 2006-07-01 15:22:18 UTC (rev 16744) +++ trunk/source/lib/charcnv.c 2006-07-01 15:25:21 UTC (rev 16745) @@ -704,8 +704,10 @@ * @returns Size in bytes of the converted string; or -1 in case of error. **/ size_t convert_string_talloc(TALLOC_CTX *ctx, charset_t from, charset_t to, - void const *src, size_t srclen, void **dest, BOOL allow_bad_conv) +void const *src, size_t srclen, void *dst, +BOOL allow_bad_conv) { + void **dest = (void **)dst; size_t dest_len; *dest = NULL; @@ -945,9 +947,9 @@ if (flags STR_TERMINATE) { if (src_len == (size_t)-1) { - src_len = strlen(src) + 1; + src_len = strlen((const char *)src) + 1; } else { - size_t len = strnlen(src, src_len); + size_t len = strnlen((const char *)src, src_len); if (len src_len) len++; src_len = len; @@ -1035,7 +1037,7 @@ len += ret; if (flags STR_UPPER) { - smb_ucs2_t *dest_ucs2 = dest; + smb_ucs2_t *dest_ucs2 = (smb_ucs2_t *)dest; size_t i; for (i = 0; i (dest_len / 2) dest_ucs2[i]; i++) { smb_ucs2_t v = toupper_w(dest_ucs2[i]); @@ -1179,7 +1181,8 @@ if (flags STR_TERMINATE) { /* src_len -1 is the default for null terminated strings. */ if (src_len != (size_t)-1) { - size_t len = strnlen_w(src, src_len/2); + size_t len = strnlen_w((const smb_ucs2_t *)src, + src_len/2); if (len src_len/2) len++; src_len = len*2; Modified: trunk/source/lib/util.c === --- trunk/source/lib/util.c 2006-07-01 15:22:18 UTC (rev 16744) +++ trunk/source/lib/util.c 2006-07-01 15:25:21 UTC (rev 16745) @@ -753,7 +753,7 @@ size_t num_to_read_thistime; size_t num_written = 0; - if ((buf = SMB_MALLOC(TRANSFER_BUF_SIZE)) == NULL) + if ((buf = SMB_MALLOC_ARRAY(char, TRANSFER_BUF_SIZE)) == NULL) return -1; while (total n) { @@ -1052,9 +1052,11 @@ / void add_to_large_array(TALLOC_CTX *mem_ctx, size_t element_size, - void *element, void **array, uint32 *num_elements, + void *element, void *_array, uint32 *num_elements, ssize_t *array_size) { + void **array = (void **)_array; + if (*array_size 0) { return; } Modified: trunk/source/libads/ldap.c === --- trunk/source/libads/ldap.c 2006-07-01 15:22:18 UTC (rev 16744) +++ trunk/source/libads/ldap.c 2006-07-01 15:25:21 UTC (rev 16745) @@ -828,10 +828,11 @@ * @param attrs Attributes to retrieve * @return status of search **/ -ADS_STATUS ads_search_dn(ADS_STRUCT *ads, void **res, +ADS_STATUS ads_search_dn(ADS_STRUCT *ads, void *_res, const char *dn,
svn commit: samba r16746 - in trunk/source/rpc_parse: .
Author: vlendec Date: 2006-07-01 16:56:13 + (Sat, 01 Jul 2006) New Revision: 16746 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16746 Log: Fix a warning from a 64-bit build: rpc_parse/parse_srv.c: In function `srv_io_file_info3': rpc_parse/parse_srv.c:2407: warning: cast from pointer to integer of different size rpc_parse/parse_srv.c:2416: warning: cast from pointer to integer of different size I think this actually fixes a (VERY unlikely) bug. Imagine fl3-path having an address where only the high 32 bits are != 0 Jerry, please check this. Thanks, Volker Modified: trunk/source/rpc_parse/parse_srv.c Changeset: Modified: trunk/source/rpc_parse/parse_srv.c === --- trunk/source/rpc_parse/parse_srv.c 2006-07-01 15:25:21 UTC (rev 16745) +++ trunk/source/rpc_parse/parse_srv.c 2006-07-01 16:56:13 UTC (rev 16746) @@ -2404,7 +2404,7 @@ if(!prs_uint32(num_locks, ps, depth, fl3-num_locks)) return False; - uni_p = fl3-path ? (uint32)fl3-path : 0; + uni_p = fl3-path ? 1 : 0; if(!prs_uint32(ptr, ps, depth, uni_p)) return False; if (UNMARSHALLING(ps)) { @@ -2413,7 +2413,7 @@ } } - uni_p = fl3-user ? (uint32)fl3-user : 0; + uni_p = fl3-user ? 1 : 0; if(!prs_uint32(ptr, ps, depth, uni_p)) return False; if (UNMARSHALLING(ps)) {
Re: svn commit: samba r16746 - in trunk/source/rpc_parse: .
On Sat, Jul 01, 2006 at 04:56:15PM +, [EMAIL PROTECTED] wrote: Author: vlendec Date: 2006-07-01 16:56:13 + (Sat, 01 Jul 2006) New Revision: 16746 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16746 Log: Fix a warning from a 64-bit build: rpc_parse/parse_srv.c: In function `srv_io_file_info3': rpc_parse/parse_srv.c:2407: warning: cast from pointer to integer of different size rpc_parse/parse_srv.c:2416: warning: cast from pointer to integer of different size I think this actually fixes a (VERY unlikely) bug. Imagine fl3-path having an address where only the high 32 bits are != 0 Jerry, please check this. This is hilarious - I was on the phone with Jerry and got a svn conflict message checking in *EXACTLY THE SAME FIX* ! Identical :-). Great minds
svn commit: samba r16748 - in trunk/source/torture: .
Author: vlendec Date: 2006-07-01 17:32:15 + (Sat, 01 Jul 2006) New Revision: 16748 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16748 Log: Fix warnings from the Solaris compilers that happen to also be C++ compat warnings Volker Modified: trunk/source/torture/nsstest.c Changeset: Modified: trunk/source/torture/nsstest.c === --- trunk/source/torture/nsstest.c 2006-07-01 17:18:39 UTC (rev 16747) +++ trunk/source/torture/nsstest.c 2006-07-01 17:32:15 UTC (rev 16748) @@ -62,7 +62,9 @@ static struct passwd *nss_getpwent(void) { NSS_STATUS (*_nss_getpwent_r)(struct passwd *, char *, - size_t , int *) = find_fn(getpwent_r); + size_t , int *) = + (NSS_STATUS (*)(struct passwd *, char *, + size_t, int *))find_fn(getpwent_r); static struct passwd pwd; static char buf[1000]; NSS_STATUS status; @@ -84,7 +86,9 @@ static struct passwd *nss_getpwnam(const char *name) { NSS_STATUS (*_nss_getpwnam_r)(const char *, struct passwd *, char *, - size_t , int *) = find_fn(getpwnam_r); + size_t , int *) = + (NSS_STATUS (*)(const char *, struct passwd *, char *, + size_t, int *))find_fn(getpwnam_r); static struct passwd pwd; static char buf[1000]; NSS_STATUS status; @@ -106,7 +110,9 @@ static struct passwd *nss_getpwuid(uid_t uid) { NSS_STATUS (*_nss_getpwuid_r)(uid_t , struct passwd *, char *, - size_t , int *) = find_fn(getpwuid_r); + size_t , int *) = + (NSS_STATUS (*)(uid_t, struct passwd *, char *, + size_t, int *))find_fn(getpwuid_r); static struct passwd pwd; static char buf[1000]; NSS_STATUS status; @@ -127,7 +133,8 @@ static void nss_setpwent(void) { - NSS_STATUS (*_nss_setpwent)(void) = find_fn(setpwent); + NSS_STATUS (*_nss_setpwent)(void) = + (NSS_STATUS(*)(void))find_fn(setpwent); NSS_STATUS status; if (!_nss_setpwent) @@ -141,7 +148,8 @@ static void nss_endpwent(void) { - NSS_STATUS (*_nss_endpwent)(void) = find_fn(endpwent); + NSS_STATUS (*_nss_endpwent)(void) = + (NSS_STATUS (*)(void))find_fn(endpwent); NSS_STATUS status; if (!_nss_endpwent) @@ -157,7 +165,9 @@ static struct group *nss_getgrent(void) { NSS_STATUS (*_nss_getgrent_r)(struct group *, char *, - size_t , int *) = find_fn(getgrent_r); + size_t , int *) = + (NSS_STATUS (*)(struct group *, char *, + size_t, int *))find_fn(getgrent_r); static struct group grp; static char *buf; static int buflen = 1024; @@ -167,13 +177,13 @@ return NULL; if (!buf) - buf = SMB_MALLOC(buflen); + buf = SMB_MALLOC_ARRAY(char, buflen); again: status = _nss_getgrent_r(grp, buf, buflen, nss_errno); if (status == NSS_STATUS_TRYAGAIN) { buflen *= 2; - buf = SMB_REALLOC(buf, buflen); + buf = SMB_REALLOC_ARRAY(buf, char, buflen); if (!buf) { return NULL; } @@ -192,7 +202,9 @@ static struct group *nss_getgrnam(const char *name) { NSS_STATUS (*_nss_getgrnam_r)(const char *, struct group *, char *, - size_t , int *) = find_fn(getgrnam_r); + size_t , int *) = + (NSS_STATUS (*)(const char *, struct group *, char *, + size_t, int *))find_fn(getgrnam_r); static struct group grp; static char *buf; static int buflen = 1000; @@ -202,12 +214,12 @@ return NULL; if (!buf) - buf = SMB_MALLOC(buflen); + buf = SMB_MALLOC_ARRAY(char, buflen); again: status = _nss_getgrnam_r(name, grp, buf, buflen, nss_errno); if (status == NSS_STATUS_TRYAGAIN) { buflen *= 2; - buf = SMB_REALLOC(buf, buflen); + buf = SMB_REALLOC_ARRAY(buf, char, buflen); if (!buf) { return NULL; } @@ -226,7 +238,9 @@ static struct group *nss_getgrgid(gid_t gid) { NSS_STATUS (*_nss_getgrgid_r)(gid_t , struct group *, char *, - size_t , int *) = find_fn(getgrgid_r); + size_t , int *) = + (NSS_STATUS (*)(gid_t, struct group *, char *, +
svn commit: samba r16749 - branches/SAMBA_3_0/source/auth trunk/source/auth
Author: jerry Date: 2006-07-01 17:55:07 + (Sat, 01 Jul 2006) New Revision: 16749 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16749 Log: BUG 3905: don't fail in create_local_nt_token() when a checking for the builtin Administrators group membership. security = server has no domain info in secrets.tdb Modified: branches/SAMBA_3_0/source/auth/auth_util.c trunk/source/auth/auth_util.c Changeset: Modified: branches/SAMBA_3_0/source/auth/auth_util.c === --- branches/SAMBA_3_0/source/auth/auth_util.c 2006-07-01 17:32:15 UTC (rev 16748) +++ branches/SAMBA_3_0/source/auth/auth_util.c 2006-07-01 17:55:07 UTC (rev 16749) @@ -876,9 +876,10 @@ } else { status = add_builtin_administrators( tmp_ctx, result ); - if ( !NT_STATUS_IS_OK(status) ) { - result = NULL; - goto done; + if ( !NT_STATUS_IS_OK(status) ) { + /* just log a complaint but do not fail */ + DEBUG(3,(create_local_nt_token: failed to check for local Administrators +membership (%s)\n, nt_errstr(status))); } } } Modified: trunk/source/auth/auth_util.c === --- trunk/source/auth/auth_util.c 2006-07-01 17:32:15 UTC (rev 16748) +++ trunk/source/auth/auth_util.c 2006-07-01 17:55:07 UTC (rev 16749) @@ -876,9 +876,10 @@ } else { status = add_builtin_administrators( result ); - if ( !NT_STATUS_IS_OK(status) ) { - TALLOC_FREE(result); - return NULL; + if ( !NT_STATUS_IS_OK(status) ) { + /* just log a complaint but do not fail */ + DEBUG(3,(create_local_nt_token: failed to check for local Administrators +membership (%s)\n, nt_errstr(status))); } } }
svn commit: samba r16750 - in branches/SAMBA_3_0_RELEASE: . source/auth
Author: jerry Date: 2006-07-01 17:56:32 + (Sat, 01 Jul 2006) New Revision: 16750 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16750 Log: merge fix for BUG 3905 Modified: branches/SAMBA_3_0_RELEASE/WHATSNEW.txt branches/SAMBA_3_0_RELEASE/source/auth/auth_util.c Changeset: Modified: branches/SAMBA_3_0_RELEASE/WHATSNEW.txt === --- branches/SAMBA_3_0_RELEASE/WHATSNEW.txt 2006-07-01 17:55:07 UTC (rev 16749) +++ branches/SAMBA_3_0_RELEASE/WHATSNEW.txt 2006-07-01 17:56:32 UTC (rev 16750) @@ -176,6 +176,8 @@ * Fix a crash in the printer publishing code when adding a new printer via the APW. * Fix broken compile of unsupported smbwrapper utility. +* BUG 3905: Fix smbd startup failure caused by a failure to + create an NT token for the guest account. o Guenther Deschner [EMAIL PROTECTED] Modified: branches/SAMBA_3_0_RELEASE/source/auth/auth_util.c === --- branches/SAMBA_3_0_RELEASE/source/auth/auth_util.c 2006-07-01 17:55:07 UTC (rev 16749) +++ branches/SAMBA_3_0_RELEASE/source/auth/auth_util.c 2006-07-01 17:56:32 UTC (rev 16750) @@ -876,9 +876,10 @@ } else { status = add_builtin_administrators( tmp_ctx, result ); - if ( !NT_STATUS_IS_OK(status) ) { - result = NULL; - goto done; + if ( !NT_STATUS_IS_OK(status) ) { + /* just log a complaint but do not fail */ + DEBUG(3,(create_local_nt_token: failed to check for local Administrators +membership (%s)\n, nt_errstr(status))); } } }
svn commit: samba r16751 - branches/SAMBA_3_0/source trunk/source
Author: jerry Date: 2006-07-01 18:26:31 + (Sat, 01 Jul 2006) New Revision: 16751 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16751 Log: The precompiled header should really be in the $(buildir) and not the $(srcdir) to allow multiple concurrent compiles when the source tree is shared via nfs. 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-07-01 17:56:32 UTC (rev 16750) +++ branches/SAMBA_3_0/source/Makefile.in 2006-07-01 18:26:31 UTC (rev 16751) @@ -851,8 +851,8 @@ # this adds support for precompiled headers. To use it, install a snapshot # of gcc-3.4 and run 'make pch' before you do the main build. pch: proto_exists - rm -f $(srcdir)/include/includes.h.gch - $(CC) -I. -I$(srcdir) $(FLAGS) @PIE_CFLAGS@ -c $(srcdir)/include/includes.h -o $(srcdir)/include/includes.h.gch + rm -f $(builddir)/include/includes.h.gch + $(CC) -I. -I$(srcdir) $(FLAGS) @PIE_CFLAGS@ -c $(srcdir)/include/includes.h -o $(builddir)/include/includes.h.gch # These dependencies are only approximately correct: we want to make # sure Samba's paths are updated if ./configure is re-run. Really it Modified: trunk/source/Makefile.in === --- trunk/source/Makefile.in2006-07-01 17:56:32 UTC (rev 16750) +++ trunk/source/Makefile.in2006-07-01 18:26:31 UTC (rev 16751) @@ -879,8 +879,8 @@ # this adds support for precompiled headers. To use it, install a snapshot # of gcc-3.4 and run 'make pch' before you do the main build. pch: proto_exists - rm -f $(srcdir)/include/includes.h.gch - $(CC) -I. -I$(srcdir) $(FLAGS) @PIE_CFLAGS@ -c $(srcdir)/include/includes.h -o $(srcdir)/include/includes.h.gch + rm -f $(builddir)/include/includes.h.gch + $(CC) -I. -I$(srcdir) $(FLAGS) @PIE_CFLAGS@ -c $(srcdir)/include/includes.h -o $(builddir)/include/includes.h.gch # These dependencies are only approximately correct: we want to make # sure Samba's paths are updated if ./configure is re-run. Really it
svn commit: samba r16752 - branches/SAMBA_3_0/examples branches/SAMBA_3_0/packaging/RHEL/setup branches/SAMBA_3_0/packaging/RedHat-9 branches/SAMBA_3_0/packaging/Solaris branches/SAMBA_3_0_RELEASE/exa
Author: jerry Date: 2006-07-01 20:06:15 + (Sat, 01 Jul 2006) New Revision: 16752 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16752 Log: remove the 'socket options' setting from the shipped default smb.conf Modified: branches/SAMBA_3_0/examples/smb.conf.default branches/SAMBA_3_0/packaging/RHEL/setup/smb.conf branches/SAMBA_3_0/packaging/RedHat-9/smb.conf branches/SAMBA_3_0/packaging/Solaris/smb.conf.default branches/SAMBA_3_0_RELEASE/examples/smb.conf.default branches/SAMBA_3_0_RELEASE/packaging/RHEL/setup/smb.conf branches/SAMBA_3_0_RELEASE/packaging/RedHat-9/smb.conf branches/SAMBA_3_0_RELEASE/packaging/Solaris/smb.conf.default trunk/examples/smb.conf.default trunk/packaging/RHEL/setup/smb.conf trunk/packaging/RedHat-9/smb.conf trunk/packaging/Solaris/smb.conf.default Changeset: Sorry, the patch is too large (2261 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16752
svn commit: smb-build r45 - in trunk: . build/m4 build/pidl build/pidl/tests build/smb_build build/tests include include/system lib/netif lib/replace script testprog
Author: jelmer Date: 2006-07-01 22:19:44 + (Sat, 01 Jul 2006) New Revision: 45 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=smb-buildrev=45 Log: Commit something Modified: trunk/acinclude.m4 trunk/autogen.sh trunk/build/m4/check_cc.m4 trunk/build/m4/check_ld.m4 trunk/build/m4/check_path.m4 trunk/build/m4/check_perl.m4 trunk/build/m4/check_python.m4 trunk/build/m4/check_shld.m4 trunk/build/m4/check_types.m4 trunk/build/m4/core.m4 trunk/build/m4/env.m4 trunk/build/m4/public.m4 trunk/build/m4/rewrite.m4 trunk/build/pidl/Makefile trunk/build/pidl/README trunk/build/pidl/TODO trunk/build/pidl/com_header.pm trunk/build/pidl/compat.pm trunk/build/pidl/dcom_proxy.pm trunk/build/pidl/dcom_stub.pm trunk/build/pidl/dump.pm trunk/build/pidl/ejs.pm trunk/build/pidl/eth_header.pm trunk/build/pidl/eth_parser.pm trunk/build/pidl/idl.gram trunk/build/pidl/idl.pm trunk/build/pidl/idl.yp trunk/build/pidl/moduleinfo.c trunk/build/pidl/ndr.pm trunk/build/pidl/ndr_client.pm trunk/build/pidl/ndr_header.pm trunk/build/pidl/ndr_parser.pm trunk/build/pidl/odl.pm trunk/build/pidl/pidl.1.xml trunk/build/pidl/pidl.pl trunk/build/pidl/ref_notes.txt trunk/build/pidl/server.pm trunk/build/pidl/swig.pm trunk/build/pidl/template.pm trunk/build/pidl/test.pm trunk/build/pidl/tests/ndr_align.pl trunk/build/pidl/tests/ndr_alloc.pl trunk/build/pidl/tests/ndr_array.pl trunk/build/pidl/tests/ndr_refptr.pl trunk/build/pidl/tests/ndr_simple.pl trunk/build/pidl/tests/ndr_string.pl trunk/build/pidl/typelist.pm trunk/build/pidl/util.pm trunk/build/pidl/validator.pm trunk/build/smb_build/README.txt trunk/build/smb_build/config_mk.pm trunk/build/smb_build/dot.pm trunk/build/smb_build/input.pm trunk/build/smb_build/main.pm trunk/build/smb_build/makefile.pm trunk/build/smb_build/output.pm trunk/build/smb_build/smb_build_h.pm trunk/build/tests/README trunk/build/tests/crypttest.c trunk/build/tests/fcntl_lock.c trunk/build/tests/fcntl_lock64.c trunk/build/tests/fcntl_lock_thread.c trunk/build/tests/ftruncate.c trunk/build/tests/getgroups.c trunk/build/tests/shared_mmap.c trunk/build/tests/shlib.c trunk/build/tests/summary.c trunk/build/tests/trivial.c trunk/build/tests/unixsock.c trunk/cflags.map trunk/config.guess trunk/config.sub trunk/configure.in trunk/configure.list trunk/foobar trunk/include/includes.h trunk/include/system/network.h trunk/include/system/time.h trunk/include/system/wait.h trunk/install-sh trunk/lib/netif/netif.c trunk/lib/netif/netif.h trunk/lib/replace/config.mk trunk/lib/replace/replace.c trunk/lib/replace/replace.h trunk/lib/replace/snprintf.c trunk/lib/replace/win32.m4 trunk/script/build_idl.sh trunk/script/cflags.sh trunk/script/configure_check_unused.pl trunk/script/depfilter.py trunk/script/extract_allparms.sh trunk/script/find_missing_doc.pl trunk/script/find_unused_macros.pl trunk/script/find_unused_makefilevars.pl trunk/script/find_unused_options.sh trunk/script/findstatic.pl trunk/script/installbin.sh trunk/script/installdat.sh trunk/script/installdirs.sh trunk/script/installman.sh trunk/script/installmodules.sh trunk/script/installscripts.sh trunk/script/installswat.sh trunk/script/minimal_includes.pl trunk/script/mkinstalldirs trunk/script/mkproto.pl trunk/script/mkproto.sh trunk/script/mkversion.sh trunk/script/revert.sh trunk/script/uninstallbin.sh trunk/script/uninstallman.sh trunk/script/uninstallmodules.sh trunk/script/uninstallscripts.sh trunk/testprog/config.mk trunk/testprog/testprog.c trunk/version Changeset: Sorry, the patch is too large (350 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=smb-buildrev=45
svn commit: samba r16753 - in branches/SOC/bnh: .
Author: brad Date: 2006-07-01 22:38:42 + (Sat, 01 Jul 2006) New Revision: 16753 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16753 Log: This archive contains the set of scripts needed to automatically configure a windows guest running on a vmware server to prepare it for automated samba testing. A README file is included in the archive, but i'll paste it into an email to samba-technical to reach a wider audience. Added: branches/SOC/bnh/vm_setup.tar.gz Changeset: Added: branches/SOC/bnh/vm_setup.tar.gz === (Binary files differ) Property changes on: branches/SOC/bnh/vm_setup.tar.gz ___ Name: svn:mime-type + application/octet-stream
svn commit: smb-build r48 - in trunk: .
Author: jelmer Date: 2006-07-01 23:43:46 + (Sat, 01 Jul 2006) New Revision: 48 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=smb-buildrev=48 Log: Change Added: trunk/cflags.map Removed: trunk/cflags.map Modified: trunk/foobar Changeset: Deleted: trunk/cflags.map === --- trunk/cflags.map2006-07-01 23:31:04 UTC (rev 47) +++ trunk/cflags.map2006-07-01 23:43:46 UTC (rev 48) @@ -1,2 +0,0 @@ -lib/replace -Ifoobar -Ixxx -testprog -DTESTPROG_FLAGS=1 Added: trunk/cflags.map === --- trunk/cflags.map2006-07-01 23:31:04 UTC (rev 47) +++ trunk/cflags.map2006-07-01 23:43:46 UTC (rev 48) @@ -0,0 +1,2 @@ +lib/replace -Ifoobar -Ixxx +testprog -DTESTPROG_FLAGS=1 Modified: trunk/foobar === --- trunk/foobar2006-07-01 23:31:04 UTC (rev 47) +++ trunk/foobar2006-07-01 23:43:46 UTC (rev 48) @@ -1,4 +1,4 @@ -x: z +fsdfsdx: z z y: c echo DOUBLE COLON WORKS
svn commit: samba r16754 - in trunk/source: lib locking
Author: vlendec Date: 2006-07-01 23:56:09 + (Sat, 01 Jul 2006) New Revision: 16754 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16754 Log: Some more warnings Modified: trunk/source/lib/popt_common.c trunk/source/locking/locking.c Changeset: Modified: trunk/source/lib/popt_common.c === --- trunk/source/lib/popt_common.c 2006-07-01 22:38:42 UTC (rev 16753) +++ trunk/source/lib/popt_common.c 2006-07-01 23:56:09 UTC (rev 16754) @@ -123,7 +123,7 @@ } struct poptOption popt_common_connection[] = { - { NULL, 0, POPT_ARG_CALLBACK, popt_common_callback }, + { NULL, 0, POPT_ARG_CALLBACK, (void *)popt_common_callback }, { socket-options, 'O', POPT_ARG_STRING, NULL, 'O', socket options to use, SOCKETOPTIONS }, { netbiosname, 'n', POPT_ARG_STRING, NULL, 'n', Primary netbios name, NETBIOSNAME }, @@ -134,7 +134,7 @@ }; struct poptOption popt_common_samba[] = { - { NULL, 0, POPT_ARG_CALLBACK|POPT_CBFLAG_PRE, popt_common_callback }, + { NULL, 0, POPT_ARG_CALLBACK|POPT_CBFLAG_PRE, (void *)popt_common_callback }, { debuglevel, 'd', POPT_ARG_STRING, NULL, 'd', Set debug level, DEBUGLEVEL }, { configfile, 's', POPT_ARG_STRING, NULL, 's', Use alternate configuration file, CONFIGFILE }, { log-basename, 'l', POPT_ARG_STRING, NULL, 'l', Base name for log files, LOGFILEBASE }, @@ -143,7 +143,7 @@ }; struct poptOption popt_common_version[] = { - { NULL, 0, POPT_ARG_CALLBACK, popt_common_callback }, + { NULL, 0, POPT_ARG_CALLBACK, (void *)popt_common_callback }, { version, 'V', POPT_ARG_NONE, NULL, 'V', Print version }, POPT_TABLEEND }; @@ -248,7 +248,7 @@ const struct poptOption popt_common_dynconfig[] = { - { NULL, '\0', POPT_ARG_CALLBACK, popt_dynconfig_callback }, + { NULL, '\0', POPT_ARG_CALLBACK, (void *)popt_dynconfig_callback }, { sbindir, '\0' , POPT_ARG_STRING, NULL, DYN_SBINDIR, Path to sbin directory, SBINDIR }, @@ -515,7 +515,7 @@ struct poptOption popt_common_credentials[] = { - { NULL, 0, POPT_ARG_CALLBACK|POPT_CBFLAG_PRE, popt_common_credentials_callback }, + { NULL, 0, POPT_ARG_CALLBACK|POPT_CBFLAG_PRE, (void *)popt_common_credentials_callback }, { user, 'U', POPT_ARG_STRING, NULL, 'U', Set the network username, USERNAME }, { no-pass, 'N', POPT_ARG_NONE, cmdline_auth_info.got_pass, 0, Don't ask for a password }, { kerberos, 'k', POPT_ARG_NONE, cmdline_auth_info.use_kerberos, 'k', Use kerberos (active directory) authentication }, Modified: trunk/source/locking/locking.c === --- trunk/source/locking/locking.c 2006-07-01 22:38:42 UTC (rev 16753) +++ trunk/source/locking/locking.c 2006-07-01 23:56:09 UTC (rev 16754) @@ -516,9 +516,10 @@ smb_panic(PANIC: parse_share_modes: buffer too short.\n); } - lck-share_modes = talloc_memdup(lck, dbuf.dptr+sizeof(*data), -lck-num_share_modes * -sizeof(struct share_mode_entry)); + lck-share_modes = (struct share_mode_entry *) + talloc_memdup(lck, dbuf.dptr+sizeof(*data), + lck-num_share_modes * + sizeof(struct share_mode_entry)); if (lck-share_modes == NULL) { smb_panic(talloc failed\n); @@ -635,7 +636,7 @@ delete_token_size + sp_len + 1 + strlen(lck-filename) + 1; - result.dptr = talloc_size(lck, result.dsize); + result.dptr = TALLOC_ARRAY(lck, char, result.dsize); if (result.dptr == NULL) { smb_panic(talloc failed\n); @@ -838,7 +839,7 @@ msg_len = MSG_FILE_RENAMED_MIN_SIZE + sp_len + 1 + fn_len + 1; /* Set up the name changed message. */ - frm = TALLOC(lck, msg_len); + frm = TALLOC_ARRAY(lck, char, msg_len); if (!frm) { return False; } @@ -1305,5 +1306,5 @@ { if (tdb == NULL) return 0; - return tdb_traverse(tdb, traverse_fn, fn); + return tdb_traverse(tdb, traverse_fn, (void *)fn); }
svn commit: samba r16755 - branches/SAMBA_3_0/source/nsswitch trunk/source/nsswitch
Author: vlendec Date: 2006-07-01 23:59:32 + (Sat, 01 Jul 2006) New Revision: 16755 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=16755 Log: Hunting warning has some benefits Solaris found this one that needs to go into 3.0.23, actually munlock the password memory. Volker Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c trunk/source/nsswitch/winbindd_cred_cache.c Changeset: Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c === --- branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c2006-07-01 23:56:09 UTC (rev 16754) +++ branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c2006-07-01 23:59:32 UTC (rev 16755) @@ -80,8 +80,8 @@ #ifdef DEBUG_PASSWORD DEBUG(10,(unlocking memory: %p\n, entry-pass)); #endif - memset((entry-pass), 0, len); - if ((munlock(entry-pass, len)) == -1) { + memset(entry-pass, 0, len); + if ((munlock(entry-pass, len)) == -1) { DEBUG(0,(failed to munlock memory: %s (%d)\n, strerror(errno), errno)); return map_nt_error_from_unix(errno); Modified: trunk/source/nsswitch/winbindd_cred_cache.c === --- trunk/source/nsswitch/winbindd_cred_cache.c 2006-07-01 23:56:09 UTC (rev 16754) +++ trunk/source/nsswitch/winbindd_cred_cache.c 2006-07-01 23:59:32 UTC (rev 16755) @@ -80,8 +80,8 @@ #ifdef DEBUG_PASSWORD DEBUG(10,(unlocking memory: %p\n, entry-pass)); #endif - memset((entry-pass), 0, len); - if ((munlock(entry-pass, len)) == -1) { + memset(entry-pass, 0, len); + if ((munlock(entry-pass, len)) == -1) { DEBUG(0,(failed to munlock memory: %s (%d)\n, strerror(errno), errno)); return map_nt_error_from_unix(errno);
Build status as of Sun Jul 2 00:00:04 2006
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2006-07-01 00:00:17.0 + +++ /home/build/master/cache/broken_results.txt 2006-07-02 00:00:26.0 + @@ -1,4 +1,4 @@ -Build status as of Sat Jul 1 00:00:02 2006 +Build status as of Sun Jul 2 00:00:04 2006 Build counts: Tree Total Broken Panic @@ -7,12 +7,12 @@ distcc 34 4 0 lorikeet-heimdal 0 0 0 ppp 20 0 0 -rsync35 0 0 +rsync37 1 0 samba31 8 0 samba-docs 0 0 0 samba4 42 28 5 samba_3_040 12 0 smb-build31 29 0 -talloc 25 11 0 -tdb 25 3 0 +talloc 26 11 0 +tdb 26 3 0