diff options
author | Jeremy Allison <jra@samba.org> | 2012-08-08 17:01:00 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2012-08-09 12:08:18 -0700 |
commit | b70f23c2b581c5d455362ab37f4846de9a910055 (patch) | |
tree | cf95e8d35a03d1e39d5926d2e03d7046d42cae64 /source3/passdb/pdb_ldap.c | |
parent | ce21d0804012da27cec72abe896352d7f0e7e1e5 (diff) | |
download | samba-b70f23c2b581c5d455362ab37f4846de9a910055.tar.gz |
Correctly check for errors in strlower_m() returns.
Diffstat (limited to 'source3/passdb/pdb_ldap.c')
-rw-r--r-- | source3/passdb/pdb_ldap.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 56225a2965d..9b4d8a6a4dd 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -2015,9 +2015,14 @@ static NTSTATUS ldapsam_rename_sam_account(struct pdb_methods *my_methods, posix name but preserve the case in passdb */ fstrcpy( oldname_lower, oldname ); - strlower_m( oldname_lower ); + if (!strlower_m( oldname_lower )) { + return NT_STATUS_INVALID_PARAMETER; + } fstrcpy( newname_lower, newname ); - strlower_m( newname_lower ); + if (!strlower_m( newname_lower )) { + return NT_STATUS_INVALID_PARAMETER; + } + rename_script = realloc_string_sub2(rename_script, "%unew", newname_lower, |