summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2002-09-25 11:42:30 +0000
committerJelmer Vernooij <jelmer@samba.org>2002-09-25 11:42:30 +0000
commit059838a843e8677e69c79ee8dbdc0e575ca54797 (patch)
treef6c885513ad8f0505be482982deeefa9ccb65339 /source3/passdb
parent82102d9c99f9b255d6262553187642e9637e4670 (diff)
downloadsamba-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')
-rw-r--r--source3/passdb/pdb_interface.c4
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;