The branch, master has been updated via 826f619 s3-winbind: Fix memory leak with each cached credential login via 1be45ab selftest: Skip the samba4.raw.eas tests via 9da97e5 selftest: Skip also s4 base.createx_sharemodes_dir via bba66ca selftest: Remove samba4.smb2.compound tests we skip via 82f0c72 selftest: Remove samba4 delaywrite tests we skip via 32d10fd selftest: Skip s4 smb2 rename tests via 2240aff selftest: Skip the Samba4 rap tests via ca0332e selftest: Skip smbtorture_s3 tests against ntvfs from 04967d6 s3: tdb: On some platforms pthread_mutex_trylock() returns EBUSY not EDEADLK.
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 826f61960ec74deedc9d556a3b8fe04d9178dcd8 Author: Andreas Schneider <a...@samba.org> Date: Wed Jun 29 13:38:19 2016 +0200 s3-winbind: Fix memory leak with each cached credential login When we allow offline logon and have a lot of logins, windbind will leak 4k of memory which each log in. On systems with heavy load this can grow quickly and the OOM killer will kill Winbind. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11999 Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Guenther Deschner <g...@samba.org> Autobuild-User(master): Andreas Schneider <a...@cryptomilk.org> Autobuild-Date(master): Wed Jun 29 19:03:53 CEST 2016 on sn-devel-144 commit 1be45ab4d5bb8a6369d941e677f00ed5517005bf Author: Andreas Schneider <a...@samba.org> Date: Mon Jun 27 11:04:48 2016 +0200 selftest: Skip the samba4.raw.eas tests Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit 9da97e5572e20788e5d24e1c017e75beeb2f1ab2 Author: Andreas Schneider <a...@samba.org> Date: Mon Jun 27 10:14:03 2016 +0200 selftest: Skip also s4 base.createx_sharemodes_dir Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit bba66ca4591ab2f1dc29d256322f4ba3db383cc5 Author: Andreas Schneider <a...@samba.org> Date: Mon Jun 27 09:45:19 2016 +0200 selftest: Remove samba4.smb2.compound tests we skip Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit 82f0c72c39f12cf56844409315b0a0c3ce0257cc Author: Andreas Schneider <a...@samba.org> Date: Mon Jun 27 09:36:24 2016 +0200 selftest: Remove samba4 delaywrite tests we skip Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit 32d10fd77bb251bb649ef82d1c43742d3a5ed07e Author: Andreas Schneider <a...@samba.org> Date: Mon Jun 27 09:08:02 2016 +0200 selftest: Skip s4 smb2 rename tests Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit 2240aff7ed1a5f8212afc830c581071573fa24a8 Author: Andreas Schneider <a...@samba.org> Date: Mon Jun 27 08:49:24 2016 +0200 selftest: Skip the Samba4 rap tests Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit ca0332e9010ee190f45ee20a84309a142e02d5a0 Author: Andreas Schneider <a...@samba.org> Date: Mon Jun 27 08:45:15 2016 +0200 selftest: Skip smbtorture_s3 tests against ntvfs This reduces the time our testsuite is running. We are not going to implement these features so it doesn't make sense to run the test at all. More will follow. Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Ralph Boehme <s...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> ----------------------------------------------------------------------- Summary of changes: selftest/knownfail | 45 --------------------------------------- selftest/skip | 26 ++++++++++++++++++++++ source3/winbindd/winbindd_cache.c | 8 +++++-- 3 files changed, 32 insertions(+), 47 deletions(-) Changeset truncated at 500 lines: diff --git a/selftest/knownfail b/selftest/knownfail index be6c70c..4a3f7f5 100644 --- a/selftest/knownfail +++ b/selftest/knownfail @@ -6,25 +6,6 @@ ^samba3.blackbox.failure.failure # this is designed to fail, for testing our test infrastructure .*driver.add_driver_timestamps # we only can store dates, not timestamps -^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).LOCK9 # Fails against the s4 ntvfs server -^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).OPLOCK2 # Fails against the s4 ntvfs server -^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).STREAMERROR # Fails against the s4 ntvfs server -^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).DIR1 # Fails against the s4 ntvfs server -^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).DIR-CREATETIME # Fails against the s4 ntvfs server -^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).DELETE-LN # Fails against the s4 ntvfs server -^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).POSIX # Fails against the s4 ntvfs server -^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).UID-REGRESSION-TEST # Fails against the s4 ntvfs server -^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).SHORTNAME-TEST # Fails against the s4 ntvfs server -^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).POSIX-APPEND # Fails against the s4 ntvfs server -^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).POSIX-SYMLINK-ACL # Fails against the s4 ntvfs server -^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).POSIX-SYMLINK-EA # Fails against the s4 ntvfs server -^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).POSIX-OFD-LOCK # Fails against the s4 ntvfs server -^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).PIDHIGH # Fails against the s4 ntvfs server -^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).NTTRANS-FSCTL # Fails against the s4 ntvfs server -^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).SMB2-NEGPROT # Fails against the s4 ntvfs server -^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).BAD-NBT-SESSION # Fails against the s4 ntvfs server -^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).SMB2-SESSION-REAUTH # Fails against the s4 ntvfs server -^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).SMB2-SESSION-RECONNECT # Fails against the s4 ntvfs server ^samba3.smbtorture_s3.crypt_server\(nt4_dc\).SMB2-SESSION-REAUTH # expected to give ACCESS_DENIED SMB2.1 doesn't have encryption ^samba3.smbtorture_s3.crypt_server\(nt4_dc\).SMB2-SESSION-RECONNECT # expected to give CONNECTION_DISCONNECTED, we need to fix the test ^samba3.smb2.session enc.reconnect # expected to give CONNECTION_DISCONNECTED, we need to fix the test @@ -76,7 +57,6 @@ ^samba4.raw.session.expire1 ^samba4.raw.rename.*.osxrename ^samba4.raw.rename.*.directory rename -^samba4.raw.eas ^samba4.rpc.winreg.*security ^samba4.local.registry.(dir|ldb).check hive security ^samba4.local.registry.local.security @@ -106,34 +86,9 @@ ^samba4.base.charset.*.Testing partial surrogate ^samba4.*.base.maximum_allowed # broken until we implement NTCREATEX_OPTIONS_BACKUP_INTENT .*net.api.delshare.* # DelShare isn't implemented yet -^samba4.rap.*netservergetinfo -^samba4.rap.*netsessionenum -^samba4.rap.*netsessiongetinfo -^samba4.rap.*netremotetod -# SMB2 in s4 does not seem to support rename correctly -^samba4.smb2.rename.simple\(.*\)$ -^samba4.smb2.rename.no_sharing\(.*\)$ -^samba4.smb2.rename.share_delete_and_delete_access\(.*\)$ -^samba4.smb2.rename.no_share_delete_but_delete_access\(.*\)$ -^samba4.smb2.rename.share_delete_no_delete_access\(.*\)$ -^samba4.smb2.rename.no_share_delete_no_delete_access\(.*\)$ -^samba4.smb2.rename.msword -^samba4.smb2.rename.rename_dir_bench\(ad_dc_ntvfs\) -^samba4.smb2.rename.rename_dir_openfile\(.*\)$ ^samba4.smb2.oplock.doc -^samba4.smb2.compound.related3 -^samba4.smb2.compound.compound-break ^samba4.smb2.lock.valid-request -^samba4.*base.delaywrite.*update of write time and SMBwrite truncate\(.*\)$ -^samba4.*base.delaywrite.*update of write time and SMBwrite truncate expand\(.*\)$ -^samba4.*base.delaywrite.*delayed update of write time 3a\(.*\)$ -^samba4.*base.delaywrite.*delayed update of write time 3c\(.*\)$ -^samba4.*base.delaywrite.*update of write time using SET_END_OF_FILE\(.*\)$ -^samba4.*base.delaywrite.*update of write time using SET_ALLOCATION_SIZE\(.*\)$ -^samba4.*base.delaywrite.*directory timestamp update test\(.*\)$ ^samba4.ldap.python \(ad_dc_ntvfs\).Test add_ldif\(\) with BASE64 security descriptor input using WRONG domain SID\(.*\)$ -# some operations don't work over the CIFS NTVFS backend yet (eg. root_fid) -^samba4.ntvfs.cifs.*.base.createx_sharemodes_dir ^samba4.raw.lock.*.async # bug 6960 ^samba4.raw.open.ntcreatex_supersede ^samba4.smb2.lock.*.multiple-unlock # bug 6959 diff --git a/selftest/skip b/selftest/skip index 94d0a88..4ff7274 100644 --- a/selftest/skip +++ b/selftest/skip @@ -34,6 +34,25 @@ ^samba3.smbtorture_s3.*.pipe_number ^samba3.smbtorture_s3.LOCAL-DBTRANS #hangs for some reason ^samba3.smbtorture_s3.*.DIR1 #loops on 64 bit linux with ext4 +^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).LOCK9 # Fails against the s4 ntvfs server +^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).OPLOCK2 # Fails against the s4 ntvfs server +^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).STREAMERROR # Fails against the s4 ntvfs server +^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).DIR1 # Fails against the s4 ntvfs server +^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).DIR-CREATETIME # Fails against the s4 ntvfs server +^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).DELETE-LN # Fails against the s4 ntvfs server +^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).POSIX # Fails against the s4 ntvfs server +^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).UID-REGRESSION-TEST # Fails against the s4 ntvfs server +^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).SHORTNAME-TEST # Fails against the s4 ntvfs server +^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).POSIX-APPEND # Fails against the s4 ntvfs server +^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).POSIX-SYMLINK-ACL # Fails against the s4 ntvfs server +^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).POSIX-SYMLINK-EA # Fails against the s4 ntvfs server +^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).POSIX-OFD-LOCK # Fails against the s4 ntvfs server +^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).PIDHIGH # Fails against the s4 ntvfs server +^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).NTTRANS-FSCTL # Fails against the s4 ntvfs server +^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).SMB2-NEGPROT # Fails against the s4 ntvfs server +^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).BAD-NBT-SESSION # Fails against the s4 ntvfs server +^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).SMB2-SESSION-REAUTH # Fails against the s4 ntvfs server +^samba3.smbtorture_s3.plain\(ad_dc_ntvfs\).SMB2-SESSION-RECONNECT # Fails against the s4 ntvfs server ^samba3.*base.charset ^samba3.*raw.context ^samba3.*raw.ioctl @@ -49,6 +68,7 @@ ^samba4.base.casetable ^samba4.base.nttrans ^samba4.base.scan.maxfid +^samba4.raw.eas ^samba4.raw.hold-oplock # Not a test, but a way to block other clients for a test ^samba4.smb2.hold-oplock # Not a test, but a way to block other clients for a test ^samba4.raw.ping.pong # Needs second server to test @@ -65,6 +85,10 @@ ^samba4.smb2.session ^samba4.smb2.compound ^samba4.smb2.oplock.levelii501 # No test yet +# SMB2 in s4 does not seem to support rename correctly +^samba4.smb2.rename.*\(ad_dc_ntvfs\)$ +# some operations don't work over the CIFS NTVFS backend yet (eg. root_fid) +^samba4.ntvfs.cifs.*.base.createx_sharemodes_dir ^samba4.ntvfs.cifs.*.base.charset ^samba4.ntvfs.cifs.*.base.iometer ^samba4.ntvfs.cifs.*.base.casetable @@ -92,8 +116,10 @@ ^samba4.raw.offline # Samba 4 doesn't have much offline support yet ^samba4.rpc.autoidl # this one just generates a lot of noise, and is no longer useful ^samba4.rpc.countcalls # this is not useful now we have full IDL +^samba4.rap.basic ^samba4.rap.scan # same thing here - we have docs now ^samba4.rap.printing # Not provided by Samba 4 +^samba4.rap.rpc ^samba4.rap.sam # Not provided by Samba 4 bench # don't run benchmarks in our selftest ^samba4..*trans2.scan # uses huge number of file descriptors diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c index 6123e96..b2c0ae2 100644 --- a/source3/winbindd/winbindd_cache.c +++ b/source3/winbindd/winbindd_cache.c @@ -3471,7 +3471,7 @@ NTSTATUS wcache_remove_oldest_cached_creds(struct winbindd_domain *domain, const struct winbind_cache *cache = get_cache(domain); NTSTATUS status; int ret; - struct cred_list *cred, *oldest = NULL; + struct cred_list *cred, *next, *oldest = NULL; if (!cache->tdb) { return NT_STATUS_INTERNAL_DB_ERROR; @@ -3540,7 +3540,11 @@ NTSTATUS wcache_remove_oldest_cached_creds(struct winbindd_domain *domain, const status = NT_STATUS_UNSUCCESSFUL; } done: - SAFE_FREE(wcache_cred_list); + for (cred = wcache_cred_list; cred; cred = next) { + next = cred->next; + DLIST_REMOVE(wcache_cred_list, cred); + SAFE_FREE(cred); + } SAFE_FREE(oldest); return status; -- Samba Shared Repository