summaryrefslogtreecommitdiff
path: root/source3/passdb/passdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/passdb/passdb.c')
-rw-r--r--source3/passdb/passdb.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index 5b1ff38d2c..3cb083bb76 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -208,7 +208,12 @@ struct smb_passwd *getsmbpwent(void *vp)
BOOL add_smbpwd_entry(struct smb_passwd *newpwd)
{
- return pwdb_ops->add_smbpwd_entry(pwdb_smb_map_names(newpwd));
+ struct smb_passwd *mapped = pwdb_smb_map_names(newpwd);
+ if (mapped)
+ {
+ return pwdb_ops->add_smbpwd_entry(mapped);
+ }
+ return False;
}
/************************************************************************
@@ -222,7 +227,12 @@ BOOL add_smbpwd_entry(struct smb_passwd *newpwd)
BOOL mod_smbpwd_entry(struct smb_passwd* pwd, BOOL override)
{
- return pwdb_ops->mod_smbpwd_entry(pwdb_smb_map_names(pwd), override);
+ struct smb_passwd *mapped = pwdb_smb_map_names(pwd);
+ if (mapped)
+ {
+ return pwdb_ops->mod_smbpwd_entry(mapped, override);
+ }
+ return False;
}
/************************************************************************