diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2002-09-25 11:42:30 +0000 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2002-09-25 11:42:30 +0000 |
commit | 059838a843e8677e69c79ee8dbdc0e575ca54797 (patch) | |
tree | f6c885513ad8f0505be482982deeefa9ccb65339 /source3/passdb/pdb_interface.c | |
parent | 82102d9c99f9b255d6262553187642e9637e4670 (diff) | |
download | samba-059838a843e8677e69c79ee8dbdc0e575ca54797.tar.gz samba-059838a843e8677e69c79ee8dbdc0e575ca54797.tar.bz2 samba-059838a843e8677e69c79ee8dbdc0e575ca54797.zip |
Don't crash when a backend doesn't have a setsampwent function available - bug reported by metze
(This used to be commit 4aea951102a6e82612560e6a59931fde433ee6ea)
Diffstat (limited to 'source3/passdb/pdb_interface.c')
-rw-r--r-- | source3/passdb/pdb_interface.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c index f5926e54f1..f965dd727c 100644 --- a/source3/passdb/pdb_interface.c +++ b/source3/passdb/pdb_interface.c @@ -41,7 +41,7 @@ const struct pdb_init_function_entry builtin_pdb_init_functions[] = { static BOOL context_setsampwent(struct pdb_context *context, BOOL update) { - if ((!context) || (!context->pdb_methods) || (!context->pdb_methods->setsampwent)) { + if (!context) { DEBUG(0, ("invalid pdb_context specified!\n")); return False; } @@ -53,7 +53,7 @@ static BOOL context_setsampwent(struct pdb_context *context, BOOL update) return True; } - while (!(context->pwent_methods->setsampwent(context->pwent_methods, update))) { + while (!(context->pwent_methods->setsampwent) || !(context->pwent_methods->setsampwent(context->pwent_methods, update))) { context->pwent_methods = context->pwent_methods->next; if (context->pwent_methods == NULL) return False; |