[Samba] err: I have no name (Idmap Ldap)
I succesfully setted up the winbind with idmap backend = ldap:ldap:... LDAP is used only to store idmap's. The problem: On the server with OpenLDAP and winbind, all is working fine! Thanks to the SAMBA team and OSS community! But on the second server, where winbind is used to authenticate users and retrieve uid's from server with ldap, users get error message: id: cannot find name for user ID The authentication works fine, users can use their samba shares, but ssh sessions are not more accessible (There is error, that it is not possible to retrieve username for lastlog and session closes). May bee someone had already such problem, and know's solution? There is some illustration of problem: === [EMAIL PROTECTED] /]# wbinfo -t checking the trust secret via RPC calls succeeded === [EMAIL PROTECTED] /]# wbinfo -u ...skip tst10 tst11 ...skip === [EMAIL PROTECTED] /]# getent passwd | grep tst1 tst10:x:20694:3::/skola/tst10:/bin/bash tst11:x:20695:3::/skola/tst11:/bin/bash ...skip === But! [EMAIL PROTECTED] /]# su tst10 Creating directory '/skola/tst10'. Creating directory '/skola/tst10/tmp'. id: cannot find name for user ID 20694 [I have no [EMAIL PROTECTED] /]$ and [I have no [EMAIL PROTECTED] tst10]$ ls -l total 4 drwxr-xr-x 2 20694 3 4096 aug 21 13:27 tmp/ === The both systems are like each other: The configuration on both servers are like each other: - Mandrake Cooker - samba 3.0.5.2 (including winbind) The samba.conf on secondary server [EMAIL PROTECTED] root]# cat /etc/samba/smb.conf [global] workgroup = SKOLA security = domain netbios name = VIRSIS winbind use default domain = yes default service = homes unix charset = iso8859-13 idmap gid = 2-3 idmap uid = 3-4 winbind separator = + winbind use default domain = yes idmap backend = ldap:ldap://10.0.0.50 ldap admin dn = cn=Manager,dc=venta,dc=lv ldap suffix = dc=venta,dc=lv ldap idmap suffix = ou=Idmap winbind enum users = yes winbind enum groups = yes encrypt passwords = Yes template homedir = /skola/%U os level = 18 socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 wins server = 10.0.0.10 log level = 3 obey pam restrictions = yes template shell = /bin/bash max log size = 200 min protocol = NT1 password server = * local master = No [homes] ...skip The /etc/nsswitch.conf ... passwd: files winbind nisplus nis shadow: files nisplus nis group: files winbind nisplus nis ... There is no working nscd daemon, which will cause I have no name! problem. Thanks! Gints -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
[Samba] Slow samba performance when writing many files into single directory
Hello, I met with this problem - we use a groupware app on Win PCs that stores its data on samba share. The app uses many directories with large amount of small files (emails) in each. App performance is teribly slow - compared with data stored on netware share that we were using succesfully for many years. The app is unsuable now. I tried to simulate with these results: 1. ftp access read/write of anything is ok 2. samba reading and writing of big files (250MB) is ok 3. samba reading of 3000 small files (total 100MB) in one directory is ok 4. samba writing of 3000 small files (total 100MB) into one directory is POOR 5. samba writing of the same 3000 files splitted into 15 directories is better but stil slow. I think it is related to case (in)sensitivity. I have no chance to change app behaviour so I need to tune samba settings. It is SLES 8, kernel k_smp 2.4.21-241, samba 2.2.8a It is independent on filesystem - tried with very similar results on ext3, reiser, xfs. Thanks. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
[Samba] samba Digest, Vol 20, Issue 28
I am out of the office on vacation from Tuesday August 10th until Monday August 23rd. Regards, Ray Moroney This e-mail message may contain proprietary and/or confidential information, and is intended only for the use of the individual or entity named above. RF Integration Inc. retains all legal rights to the dispersement of company related material, and does not imply any transfer of rights by this e-mail. If you received this communication in error, please notify us immediately by e-mail [EMAIL PROTECTED] and delete or discard this message. Thank you. *** -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Slow samba performance when writing many files into single directory
Hi, winxp has a service running called windows xp Webclient disable it for a better performance browsing networks, also windows will try to use show you the right icons for every file type this may slow down performance toowith many files, this can be adjusted by settings explorer...hope this helps Regards Jan Brychta schrieb: Hello, I met with this problem - we use a groupware app on Win PCs that stores its data on samba share. The app uses many directories with large amount of small files (emails) in each. App performance is teribly slow - compared with data stored on netware share that we were using succesfully for many years. The app is unsuable now. I tried to simulate with these results: 1. ftp access read/write of anything is ok 2. samba reading and writing of big files (250MB) is ok 3. samba reading of 3000 small files (total 100MB) in one directory is ok 4. samba writing of 3000 small files (total 100MB) into one directory is POOR 5. samba writing of the same 3000 files splitted into 15 directories is better but stil slow. I think it is related to case (in)sensitivity. I have no chance to change app behaviour so I need to tune samba settings. It is SLES 8, kernel k_smp 2.4.21-241, samba 2.2.8a It is independent on filesystem - tried with very similar results on ext3, reiser, xfs. Thanks. -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Re: [Samba] Re: Password Syncing
Thanks Ulf for your suggestion. I did have a question about your post. The line that you suggest we add to the /etc/pam.d/passwd file would change the SAMBA password when the UNIX password changes. (Does the line you suggest replace the password line already present in the passwd file? password required pam_stack.so service=system-auth) Is there a way to change the UNIX password when the SAMBA password is changed in a similar fashion using PAM? I have tried using the unix password sync = yes parameter with password program = usr/bin/passwd %u and password chat parameters but have never been able to change the UNIX password when SAMBA password is changed. I have simply ruled that this method does not work at all for me after umpteen tries. So if you have a PAM based password sync going from SAMBA to UNIX I would really appreciate it. Also found the following: (http://us4.samba.org/samba/docs/man/Samba-HOWTO-Collection/pam.html#id2582436) Password Synchronization Configuration A sample PAM configuration that shows the use of pam_smbpass to make sure private/smbpasswd is kept in sync when /etc/passwd (/etc/shadow) is changed. Useful when an expired password might be changed by an application (such as *ssh*). #%PAM-1.0 # password-sync # auth requisitepam_nologin.so auth required pam_unix.so accountrequired pam_unix.so password requisitepam_cracklib.so retry=3 password requisitepam_unix.so shadow md5 use_authtok try_first_pass password required pam_smbpass.so nullok use_authtok try_first_pass sessionrequired pam_unix.so Is this the /etc/pam.d/passwd file? The documentation does not explicitly mention it as such. Would this work in place of the config line that you have provided? Any comments that you may provide would be highly helpful. I am trying to implement a single username/password system for the user and till now have been totally unsuccessful. Thanks in advance. Ganesh Ulf Dettmer wrote: Hi, the file you need to modify is /etc/pam.d/passwd . You should include a line like this: password required pam_smbpass.so use_authtok use_first_pass smbconf=/etc/samba/smb.conf cheers, Ulf Stephen Le schrieb: Hello, Is there a way to sync the Unix password database with Samba's database? I know that Samba is able to update the Unix database if a user changes their password via smbpasswd, but what if a user changes their Unix password with passwd? I looked into libpam-smbpass, but it didn't seem to work; the documentation was rather sparse, so I just overwrote my /etc/pam.d/samba with the provided password-sync in the samples directory. Additionally, I would prefer not to use unencrypted passwords. Thanks, Stephen Le -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
[Samba] samba client/server bug?
Hi list, After upgrade my FreeBSD samba server from 3.0.5 to 3.0.6, my cifs client on my linux box stop. My linux kernel is 2.6.8.1 and samba* rpms is 3.0.6. But when try access any file (cat grupos.conf) on mounted point (smbfs) on freebsd server (3.0.6), this connection freeze. If samba on freebsd is 3.0.5 work's normally. This 2 logs generated with log level = 4 ---log on freebsd with 3.0.5--- [2004/08/21 18:07:00, 3] smbd/process.c:process_smb(890) Transaction 11 of length 80 [2004/08/21 18:07:00, 3] smbd/process.c:switch_message(685) switch message SMBtrans2 (pid 30604) [2004/08/21 18:07:00, 3] smbd/sec_ctx.c:set_sec_ctx(288) setting sec ctx (0, 1001) - sec_ctx_stack_ndx = 0 [2004/08/21 18:07:00, 3] smbd/trans2.c:call_trans2qfilepathinfo(2331) call_trans2qfilepathinfo: TRANSACT2_QPATHINFO: level = 512 [2004/08/21 18:07:00, 3] smbd/trans2.c:call_trans2qfilepathinfo(2362) call_trans2qfilepathinfo . (fnum = -1) level=512 call=5 total_data=0 [2004/08/21 18:07:00, 4] smbd/trans2.c:call_trans2qfilepathinfo(2708) call_trans2qfilepathinfo: st_mode=40755 [2004/08/21 18:07:00, 4] smbd/trans2.c:call_trans2qfilepathinfo(2754) call_trans2qfilepathinfo: SMB_QUERY_FILE_UNIX_BASIC0=0, 1=0, 2=0, 3=0, 4=0, 5=0, 6=0, 7=0, 8=0, 9=0, 10=10, 11=0, 12=0, 13=0, 14=0, 15=0, 16=0, 17=3a, 18=ffeb, 19=ffc0, 20=fff4, 21=ff86, 22=ffc4, 23=1, 24=ff80, 25=41, 26=ffaa, 27=ffc9, 28=ffc2, 29=ff87, 30=ffc4, 31=1, 32=0, 33=3a, 34=ffeb, 35=ffc0, 36=fff4, 37=ff86, 38=ffc4, 39=1, 40=ffe9, 41=3, 42=0, 43=0, 44=0, 45=0, 46=0, 47=0, 48=ffe9, 49=3, 50=0, 51=0, 52=0, 53=0, 54=0, 55=0, 56=1, 57=0, 58=0, 59=0, 60=ffcd, 61=0, 62=0, 63=0, 64=0, 65=0, 66=0, 67=0, 68=20, 69=0, 70=ff8f, 71=0, 72=0, 73=0, 74=0, 75=0, 76=4e, 77=ffbf, 78=1b, 79=0, 80=0, 81=0, 82=0, 83=0, 84=ffed, 85=1, 86=0, 87=0, 88=0, 89=0, 90=0, 91=0, 92=a, 93=0, 94=0, 95=0, 96=0, 97=0, 98=0, 99=0, [2004/08/21 18:07:00, 3] smbd/process.c:process_smb(890) Transaction 12 of length 91 [2004/08/21 18:07:00, 3] smbd/process.c:switch_message(685) switch message SMBtrans2 (pid 30604) [2004/08/21 18:07:00, 3] smbd/sec_ctx.c:set_sec_ctx(288) setting sec ctx (0, 1001) - sec_ctx_stack_ndx = 0 [2004/08/21 18:07:00, 3] smbd/trans2.c:call_trans2qfilepathinfo(2331) call_trans2qfilepathinfo: TRANSACT2_QPATHINFO: level = 512 [2004/08/21 18:07:00, 3] smbd/trans2.c:call_trans2qfilepathinfo(2362) call_trans2qfilepathinfo grupos.conf (fnum = -1) level=512 call=5 total_data=0 [2004/08/21 18:07:00, 4] smbd/trans2.c:call_trans2qfilepathinfo(2708) call_trans2qfilepathinfo: st_mode=100644 [2004/08/21 18:07:00, 4] smbd/trans2.c:call_trans2qfilepathinfo(2754) call_trans2qfilepathinfo: SMB_QUERY_FILE_UNIX_BASIC0=44, 1=48, 2=0, 3=0, 4=0, 5=0, 6=0, 7=0, 8=0, 9=0, 10=10, 11=0, 12=0, 13=0, 14=0, 15=0, 16=ff80, 17=fffc, 18=ffa8, 19=ff9b, 20=fff1, 21=ff86, 22=ffc4, 23=1, 24=0, 25=b, 26=ffb1, 27=4a, 28=ffba, 29=ff87, 30=ffc4, 31=1, 32=0, 33=ff88, 34=7b, 35=1f, 36=3d, 37=ffc6, 38=ffc3, 39=1, 40=ffe9, 41=3, 42=0, 43=0, 44=0, 45=0, 46=0, 47=0, 48=ffe9, 49=3, 50=0, 51=0, 52=0, 53=0, 54=0, 55=0, 56=0, 57=0, 58=0, 59=0, 60=ff96, 61=0, 62=0, 63=0, 64=0, 65=0, 66=0, 67=0, 68=78, 69=0, 70=7a, 71=0, 72=0, 73=0, 74=0, 75=0, 76=46, 77=ffc2, 78=1b, 79=0, 80=0, 81=0, 82=0, 83=0, 84=ffa4, 85=1, 86=0, 87=0, 88=0, 89=0, 90=0, 91=0, 92=1, 93=0, 94=0, 95=0, 96=0, 97=0, 98=0, 99=0, [2004/08/21 18:07:00, 3] smbd/process.c:process_smb(890) Transaction 13 of length 57 [2004/08/21 18:07:00, 3] smbd/process.c:switch_message(685) switch message SMBopen (pid 30604) [2004/08/21 18:07:00, 3] smbd/sec_ctx.c:set_sec_ctx(288) setting sec ctx (0, 1001) - sec_ctx_stack_ndx = 0 [2004/08/21 18:07:00, 3] smbd/dosmode.c:unix_mode(111) unix_mode(grupos.conf) returning 0775 [2004/08/21 18:07:00, 4] smbd/open.c:open_file_shared1(1010) calling open_file with flags=0x2 flags2=0x0 mode=0775 [2004/08/21 18:07:00, 2] smbd/open.c:open_file(240) marcus opened file grupos.conf read=Yes write=Yes (numopen=1) [2004/08/21 18:07:00, 3] smbd/process.c:process_smb(890) Transaction 14 of length 63 [2004/08/21 18:07:00, 3] smbd/process.c:switch_message(685) switch message SMBreadX (pid 30604) [2004/08/21 18:07:00, 3] smbd/sec_ctx.c:set_sec_ctx(288) setting sec ctx (0, 1001) - sec_ctx_stack_ndx = 0 [2004/08/21 18:07:00, 3] smbd/reply.c:send_file_readX(2075) send_file_readX fnum=12024 max=4096 nread=4096 [2004/08/21 18:07:00, 3] smbd/process.c:process_smb(890) Transaction 15 of length 63 [2004/08/21 18:07:00, 3] smbd/process.c:switch_message(685) switch message SMBreadX (pid 30604) [2004/08/21 18:07:00, 3] smbd/sec_ctx.c:set_sec_ctx(288) setting sec ctx (0, 1001) - sec_ctx_stack_ndx = 0 [2004/08/21 18:07:00, 3] smbd/reply.c:send_file_readX(2075) send_file_readX fnum=12024 max=4096 nread=4096 [2004/08/21 18:07:00, 3] smbd/process.c:process_smb(890) Transaction
[Samba] smbmount or mount -t smbfs
I have a share on windows xp system. I have a 8 gigabyte dvd image on that share. Whenever i use mount or smbmount to mount that share it shows the 8 gigabyte dvd image as 16 thousand terrabytes. I was using samba 2.27a now im using 3, but it is still the same. Suggestions? I've noticed this with smblclient too to a differnt windows xp box and different file. If i try to get the file using smbclient it will download and make some garbage file unitl the linux partition fills up. I googled and saw only one other page takling about this, anyone know what I'm talking about? Dan Baughman -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
svn commit: samba r1985 - in branches/SAMBA_4_0/source: include lib libcli libcli/raw librpc/ndr torture/basic utils
Author: tridge Date: 2004-08-21 07:43:29 + (Sat, 21 Aug 2004) New Revision: 1985 WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=sambapath=/branches/SAMBA_4_0/sourcerev=1985nolog=1 Log: take advantage of the new talloc in a few more places Modified: branches/SAMBA_4_0/source/include/cli_context.h branches/SAMBA_4_0/source/lib/talloc.c branches/SAMBA_4_0/source/libcli/cliconnect.c branches/SAMBA_4_0/source/libcli/raw/clisession.c branches/SAMBA_4_0/source/libcli/raw/clisocket.c branches/SAMBA_4_0/source/libcli/raw/clitransport.c branches/SAMBA_4_0/source/libcli/raw/clitree.c branches/SAMBA_4_0/source/libcli/raw/rawnegotiate.c branches/SAMBA_4_0/source/librpc/ndr/libndr.h branches/SAMBA_4_0/source/librpc/ndr/ndr.c branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c branches/SAMBA_4_0/source/librpc/ndr/ndr_sec.c branches/SAMBA_4_0/source/torture/basic/aliases.c branches/SAMBA_4_0/source/utils/ndrdump.c Changeset: Sorry, the patch is too large (895 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=sambapath=/branches/SAMBA_4_0/sourcerev=1985nolog=1
svn commit: samba r1986 - branches/SAMBA_4_0/source/client trunk/source/client
Author: tpot Date: 2004-08-21 11:48:46 + (Sat, 21 Aug 2004) New Revision: 1986 WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=sambapath=/rev=1986nolog=1 Log: Janitor for myself. Merge -r1907:1908 from SAMBA_3_0 branch. Modified: branches/SAMBA_4_0/source/client/client.c trunk/source/client/client.c Changeset: Modified: branches/SAMBA_4_0/source/client/client.c === --- branches/SAMBA_4_0/source/client/client.c 2004-08-21 07:43:29 UTC (rev 1985) +++ branches/SAMBA_4_0/source/client/client.c 2004-08-21 11:48:46 UTC (rev 1986) @@ -689,7 +689,7 @@ else pstrcat(mask,p); } else { - pstrcat(mask,*); + pstrcat(mask,\\*); } do_list(mask, attribute, do_du, recurse, True); Modified: trunk/source/client/client.c === --- trunk/source/client/client.c2004-08-21 07:43:29 UTC (rev 1985) +++ trunk/source/client/client.c2004-08-21 11:48:46 UTC (rev 1986) @@ -592,7 +592,7 @@ else pstrcat(mask,p); } else { - pstrcat(mask,*); + pstrcat(mask,\\*); } do_list(mask, attribute, display_finfo, recurse, True);
svn commit: samba r1987 - branches/SAMBA_2_2/source
Author: paulg Date: 2004-08-21 12:21:03 + (Sat, 21 Aug 2004) New Revision: 1987 WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=sambapath=/rev=1987nolog=1 Log: Let Samba use all POSIX features available on VOS. paulg Modified: branches/SAMBA_2_2/source/configure.in Changeset: Modified: branches/SAMBA_2_2/source/configure.in === --- branches/SAMBA_2_2/source/configure.in 2004-08-21 11:48:46 UTC (rev 1986) +++ branches/SAMBA_2_2/source/configure.in 2004-08-21 12:21:03 UTC (rev 1987) @@ -327,8 +327,9 @@ *-D_POSIX_C_SOURCE*) ;; *) - CPPFLAGS=$CPPFLAGS -D_POSIX_C_SOURCE=199506L - AC_DEFINE(_POSIX_C_SOURCE, 199506L, [Whether to enable POSIX support]) + CPPFLAGS=$CPPFLAGS -D_POSIX_C_SOURCE=200112L + AC_DEFINE(_POSIX_C_SOURCE, 200112L, [Whether to enable +POSIX support]) ;; esac case $CPPFLAGS in
svn commit: samba r1988 - branches/SAMBA_4_0/source/build/m4
Author: paulg Date: 2004-08-21 12:23:02 + (Sat, 21 Aug 2004) New Revision: 1988 WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=sambapath=/rev=1988nolog=1 Log: Let Samba use all POSIX features available on VOS. paulg Modified: branches/SAMBA_4_0/source/build/m4/rewrite.m4 Changeset: Modified: branches/SAMBA_4_0/source/build/m4/rewrite.m4 === --- branches/SAMBA_4_0/source/build/m4/rewrite.m4 2004-08-21 12:21:03 UTC (rev 1987) +++ branches/SAMBA_4_0/source/build/m4/rewrite.m4 2004-08-21 12:23:02 UTC (rev 1988) @@ -110,8 +110,8 @@ *-D_POSIX_C_SOURCE*) ;; *) - CPPFLAGS=$CPPFLAGS -D_POSIX_C_SOURCE=199506L - AC_DEFINE(_POSIX_C_SOURCE, 199506L, [Whether to enable POSIX support]) + CPPFLAGS=$CPPFLAGS -D_POSIX_C_SOURCE=200112L + AC_DEFINE(_POSIX_C_SOURCE, 200112L, [Whether to enable POSIX support]) ;; esac case $CPPFLAGS in
svn commit: samba r1989 - branches/SAMBA_4_0/source/lib
Author: tridge Date: 2004-08-21 18:15:07 + (Sat, 21 Aug 2004) New Revision: 1989 WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=sambapath=/rev=1989nolog=1 Log: fixed a couple of bugs in code that assumes sizeof(time_t) == sizeof(int) Modified: branches/SAMBA_4_0/source/lib/gencache.c Changeset: Modified: branches/SAMBA_4_0/source/lib/gencache.c === --- branches/SAMBA_4_0/source/lib/gencache.c2004-08-21 12:23:02 UTC (rev 1988) +++ branches/SAMBA_4_0/source/lib/gencache.c2004-08-21 18:15:07 UTC (rev 1989) @@ -250,13 +250,15 @@ char* entry_buf = strndup(databuf.dptr, databuf.dsize); char *v; time_t t; + unsigned i; v = (char*)malloc(sizeof(char) * (databuf.dsize - TIMEOUT_LEN)); SAFE_FREE(databuf.dptr); - sscanf(entry_buf, CACHE_DATA_FMT, (int*)t, v); + sscanf(entry_buf, CACHE_DATA_FMT, (int*)i, v); SAFE_FREE(entry_buf); + t = i; DEBUG(10, (Returning %s cache entry: key = %s, value = %s, timeout = %s\n, t time(NULL) ? valid : @@ -307,6 +309,7 @@ TDB_DATA databuf; char *keystr = NULL, *valstr = NULL, *entry = NULL; time_t timeout = 0; + unsigned i; /* fail completely if get null pointers passed */ SMB_ASSERT(fn keystr_pattern); @@ -335,7 +338,8 @@ entry = strndup(databuf.dptr, databuf.dsize); SAFE_FREE(databuf.dptr); valstr = (char*)malloc(sizeof(char) * (databuf.dsize - TIMEOUT_LEN)); - sscanf(entry, CACHE_DATA_FMT, (int*)(timeout), valstr); + sscanf(entry, CACHE_DATA_FMT, (int*)(i), valstr); + timeout = i; DEBUG(10, (Calling function with arguments (key = %s, value = %s, timeout = %s)\n, keystr, valstr, ctime(timeout)));
svn commit: samba r1990 - in branches/SAMBA_4_0/source: gtk/common lib/registry/reg_backend_ldb libcli/util
Author: abartlet Date: 2004-08-22 05:33:07 + (Sun, 22 Aug 2004) New Revision: 1990 WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=sambapath=/branches/SAMBA_4_0/sourcerev=1990nolog=1 Log: Fix breakage caused by the recent talloc changes. (Failure to process an SPNEGO login from WinXP at least). talloc_asprintf_append() lost an argument, but because TALLOC_CTX is now a void*, this was not picked up by the compiler. I've tested the login (asn1), but not the registry/gtk changes. Andrew Bartlett Modified: branches/SAMBA_4_0/source/gtk/common/gtk-smb.c branches/SAMBA_4_0/source/lib/registry/reg_backend_ldb/reg_backend_ldb.c branches/SAMBA_4_0/source/libcli/util/asn1.c Changeset: Modified: branches/SAMBA_4_0/source/gtk/common/gtk-smb.c === --- branches/SAMBA_4_0/source/gtk/common/gtk-smb.c 2004-08-21 18:15:07 UTC (rev 1989) +++ branches/SAMBA_4_0/source/gtk/common/gtk-smb.c 2004-08-22 05:33:07 UTC (rev 1990) @@ -300,11 +300,11 @@ } if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d-chk_seal))) { - options = talloc_asprintf_append(d-mem_ctx, options, ,seal); + options = talloc_asprintf_append(options, ,seal); } if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d-chk_sign))) { - options = talloc_asprintf_append(d-mem_ctx, options, ,sign); + options = talloc_asprintf_append(options, ,sign); } if(options) { Modified: branches/SAMBA_4_0/source/lib/registry/reg_backend_ldb/reg_backend_ldb.c === --- branches/SAMBA_4_0/source/lib/registry/reg_backend_ldb/reg_backend_ldb.c 2004-08-21 18:15:07 UTC (rev 1989) +++ branches/SAMBA_4_0/source/lib/registry/reg_backend_ldb/reg_backend_ldb.c 2004-08-22 05:33:07 UTC (rev 1990) @@ -28,7 +28,7 @@ char *end = mypath, *begin; if(add) - ret = talloc_asprintf_append(mem_ctx, ret, %s, add); + ret = talloc_asprintf_append(ret, %s, add); while(end) { char *keyname; @@ -38,7 +38,7 @@ else keyname = mypath; if(strlen(keyname)) - ret = talloc_asprintf_append(mem_ctx, ret, key=%s,, keyname); + ret = talloc_asprintf_append(ret, key=%s,, keyname); if(begin) { begin[0] = '\0'; Modified: branches/SAMBA_4_0/source/libcli/util/asn1.c === --- branches/SAMBA_4_0/source/libcli/util/asn1.c2004-08-21 18:15:07 UTC (rev 1989) +++ branches/SAMBA_4_0/source/libcli/util/asn1.c2004-08-22 05:33:07 UTC (rev 1990) @@ -454,7 +454,7 @@ asn1_read_uint8(data, b); tmp_oid = talloc_asprintf(mem_ctx, %u, b/40); - tmp_oid = talloc_asprintf_append(mem_ctx, tmp_oid, %u, b%40); + tmp_oid = talloc_asprintf_append(tmp_oid, %u, b%40); while (!data-has_error asn1_tag_remaining(data) 0) { uint_t v = 0; @@ -462,7 +462,7 @@ asn1_read_uint8(data, b); v = (v7) | (b0x7f); } while (!data-has_error b 0x80); - tmp_oid = talloc_asprintf_append(mem_ctx, tmp_oid, %u, v); + tmp_oid = talloc_asprintf_append(tmp_oid, %u, v); } asn1_end_tag(data);
svn commit: samba r1991 - branches/SAMBA_4_0/source/lib
Author: abartlet Date: 2004-08-22 05:35:43 + (Sun, 22 Aug 2004) New Revision: 1991 WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=sambapath=/rev=1991nolog=1 Log: After finding a talloc inconsistancy is a very good time to smb_panic(), it can only indicate programmer error, and doing a smb_panic() ensures an automatic backtrace (and eventually an abort()). Andrew Bartlett Modified: branches/SAMBA_4_0/source/lib/talloc.c Changeset: Modified: branches/SAMBA_4_0/source/lib/talloc.c === --- branches/SAMBA_4_0/source/lib/talloc.c 2004-08-22 05:33:07 UTC (rev 1990) +++ branches/SAMBA_4_0/source/lib/talloc.c 2004-08-22 05:35:43 UTC (rev 1991) @@ -66,6 +66,7 @@ if (parent-magic != TALLOC_MAGIC) { DEBUG(0,(Bad magic in context - 0x%08x\n, parent-magic)); free(tc); + smb_panic(Bad magic in talloc context); return NULL; } @@ -172,6 +173,7 @@ if (tc-magic != TALLOC_MAGIC) { DEBUG(0,(Bad talloc magic 0x%08x in talloc_free\n, tc-magic)); + smb_panic(Bad talloc magic in talloc_realloc); return; } @@ -219,8 +221,14 @@ tc = ((struct talloc_chunk *)ptr)-1; if (tc-magic != TALLOC_MAGIC) { - DEBUG(0,(Bad talloc magic 0x%08x in talloc_realloc\n, tc-magic)); - return NULL; + if (tc-magic == TALLOC_MAGIC_FREE) { + + DEBUG(0,(Bad talloc magic - magic 0x%08x indicates double-free in talloc_realloc\n, tc-magic)); + smb_panic(Bad talloc magic - double-free - in talloc_realloc); + } else { + DEBUG(0,(Bad talloc magic 0x%08x in talloc_realloc\n, tc-magic)); + smb_panic(Bad talloc magic in talloc_realloc); + } } /* by resetting magic we catch users of the old memory */ @@ -267,10 +275,12 @@ if (tc-magic != TALLOC_MAGIC) { DEBUG(0,(Bad talloc magic 0x%08x in talloc_steal\n, tc-magic)); + smb_panic(Bad talloc magic in talloc_steal); return NULL; } if (new_tc-magic != TALLOC_MAGIC) { DEBUG(0,(Bad new talloc magic 0x%08x in talloc_steal\n, new_tc-magic)); + smb_panic(Bad new talloc magic in talloc_steal); return NULL; }
svn commit: samba r1992 - branches/SAMBA_4_0/source/torture/auth
Author: abartlet Date: 2004-08-22 05:37:39 + (Sun, 22 Aug 2004) New Revision: 1992 WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=sambapath=/rev=1992nolog=1 Log: Make the NTLMSSP torture test show more detail, and return failure etc. Andrew Bartlett Modified: branches/SAMBA_4_0/source/torture/auth/ntlmssp.c Changeset: Modified: branches/SAMBA_4_0/source/torture/auth/ntlmssp.c === --- branches/SAMBA_4_0/source/torture/auth/ntlmssp.c2004-08-22 05:35:43 UTC (rev 1991) +++ branches/SAMBA_4_0/source/torture/auth/ntlmssp.c2004-08-22 05:37:39 UTC (rev 1992) @@ -50,9 +50,18 @@ expected_sig = strhex_to_data_blob(0100e37f97f2544f4d7e); - dump_data_pw(NTLMSSP sig: , sig.data, sig.length); - dump_data_pw(NTLMSSP sig: , expected_sig.data, expected_sig.length); + dump_data_pw(NTLMSSP calc sig: , sig.data, sig.length); + dump_data_pw(NTLMSSP expected sig: , expected_sig.data, expected_sig.length); + if (sig.length != expected_sig.length) { + printf(Wrong sig length: %d != %d\n, sig.length, expected_sig.length); + return False; + } + + if (memcmp(sig.data, expected_sig.data, sig.length)) { + return False; + } + ntlmssp_end(ntlmssp_state); if (!NT_STATUS_IS_OK(ntlmssp_client_start(ntlmssp_state))) { @@ -78,8 +87,17 @@ expected_sig = strhex_to_data_blob(010078010900397420fe0e5a0f89); - dump_data_pw(NTLMSSP sig: , sig.data, sig.length); - dump_data_pw(NTLMSSP sig: , expected_sig.data, expected_sig.length); + dump_data_pw(NTLMSSP calc sig: , sig.data, sig.length); + dump_data_pw(NTLMSSP expected sig: , expected_sig.data, expected_sig.length); + if (sig.length != expected_sig.length) { + printf(Wrong sig length: %d != %d\n, sig.length, expected_sig.length); + return False; + } + + if (memcmp(sig.data, expected_sig.data, sig.length)) { + return False; + } + return True; }