summaryrefslogtreecommitdiff
path: root/source3/passdb/pdb_ldap.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-08-08 17:01:00 -0700
committerJeremy Allison <jra@samba.org>2012-08-09 12:08:18 -0700
commitb70f23c2b581c5d455362ab37f4846de9a910055 (patch)
treecf95e8d35a03d1e39d5926d2e03d7046d42cae64 /source3/passdb/pdb_ldap.c
parentce21d0804012da27cec72abe896352d7f0e7e1e5 (diff)
downloadsamba-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.c9
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,