summaryrefslogtreecommitdiff
path: root/source3/passdb/pdb_interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/passdb/pdb_interface.c')
-rw-r--r--source3/passdb/pdb_interface.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c
index 7a73fbfacf..cdbb378e94 100644
--- a/source3/passdb/pdb_interface.c
+++ b/source3/passdb/pdb_interface.c
@@ -472,7 +472,9 @@ static NTSTATUS pdb_default_create_user(struct pdb_methods *methods,
/* lowercase the username before creating the Unix account for
compatibility with previous Samba releases */
fstrcpy( name2, name );
- strlower_m( name2 );
+ if (!strlower_m( name2 )) {
+ return NT_STATUS_INVALID_PARAMETER;
+ }
add_script = talloc_all_string_sub(tmp_ctx,
add_script,
"%u",
@@ -598,7 +600,9 @@ static NTSTATUS pdb_default_delete_user(struct pdb_methods *methods,
external scripts */
fstrcpy( username, pdb_get_username(sam_acct) );
- strlower_m( username );
+ if (!strlower_m( username )) {
+ return status;
+ }
smb_delete_user( username );