From 720ca2c4775d77669a55c67bf7f72c98be989ee2 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 7 Nov 2002 04:52:04 +0000 Subject: when doing a 'net rpc vampire' a pdb_init_sam_pw() is used to create a sam account object, then pdb_update_sam_account() can be used to update an account. This code path could lead to the methods element of the account being used when uninitialised (leading to a segv) Easiest fix is to always make that that when creating a sam_account object we initialise the methods to null, so that the passdb code knows that it needs to be filled in. (This used to be commit fb79fa5a31c2fa8ebdcddbc49b1d9c1aa3059691) --- source3/passdb/passdb.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/passdb') diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index 4ce5b93abd..de737f7df7 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -42,6 +42,9 @@ static void pdb_fill_default_sam(SAM_ACCOUNT *user) { ZERO_STRUCT(user->private); /* Don't touch the talloc context */ + /* no initial methods */ + user->methods = NULL; + /* Don't change these timestamp settings without a good reason. They are important for NT member server compatibility. */ -- cgit