From d713f9e9f50dfe680f66798098ee5ede3ee80e06 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sat, 20 Aug 2011 16:19:43 +0200 Subject: [PATCH] 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 Autobuild-User: Simo Sorce Autobuild-Date: Sun Aug 21 16:39:10 CEST 2011 on sn-devel-104 --- source3/passdb/pdb_interface.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c index a74f1812d9d..7a0279e1fb7 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); } -- 2.34.1