summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-08-20 16:19:43 +0200
committerSimo Sorce <idra@samba.org>2011-08-21 16:39:10 +0200
commitd713f9e9f50dfe680f66798098ee5ede3ee80e06 (patch)
tree7a8391400724175078e9a6b54bbe2a4fa0c163d5 /source3
parent99bb3eed1dac5d2e81fd213beda414bd65076eea (diff)
downloadsamba-d713f9e9f50dfe680f66798098ee5ede3ee80e06.tar.gz
samba-d713f9e9f50dfe680f66798098ee5ede3ee80e06.tar.bz2
samba-d713f9e9f50dfe680f66798098ee5ede3ee80e06.zip
s3-passdb: Only delete 1 entry from memcache.
If we delete or update one user we shouldn't flush the complete memcache. Signed-off-by: Simo Sorce <idra@samba.org> Autobuild-User: Simo Sorce <idra@samba.org> Autobuild-Date: Sun Aug 21 16:39:10 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/passdb/pdb_interface.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c
index a74f1812d9..7a0279e1fb 100644
--- a/source3/passdb/pdb_interface.c
+++ b/source3/passdb/pdb_interface.c
@@ -667,8 +667,11 @@ NTSTATUS pdb_update_sam_account(struct samu *sam_acct)
NTSTATUS pdb_delete_sam_account(struct samu *sam_acct)
{
struct pdb_methods *pdb = pdb_get_methods();
+ const struct dom_sid *user_sid = pdb_get_user_sid(sam_acct);
- memcache_flush(NULL, PDB_GETPWSID_CACHE);
+ memcache_delete(NULL,
+ PDB_GETPWSID_CACHE,
+ data_blob_const(user_sid, sizeof(*user_sid)));
return pdb->delete_sam_account(pdb, sam_acct);
}