From b70f23c2b581c5d455362ab37f4846de9a910055 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 8 Aug 2012 17:01:00 -0700 Subject: Correctly check for errors in strlower_m() returns. --- source3/passdb/pdb_interface.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source3/passdb/pdb_interface.c') 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 ); -- cgit