1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

Correctly check for errors in strlower_m() returns.

This commit is contained in:
Jeremy Allison
2012-08-08 17:01:00 -07:00
parent ce21d08040
commit b70f23c2b5
42 changed files with 225 additions and 72 deletions

View File

@ -655,7 +655,11 @@ static int set_machine_info(const char *machinename,
return -1;
}
strlower_m(name);
if (!strlower_m(name)) {
fprintf(stderr, "strlower_m %s failed\n", name);
TALLOC_FREE(sam_pwent);
return -1;
}
ret = pdb_getsampwnam(sam_pwent, name);
if (!ret) {
@ -853,7 +857,10 @@ static int new_machine(const char *machinename, char *machine_sid)
return -1;
}
strlower_m(name);
if (!strlower_m(name)) {
fprintf(stderr, "strlower_m %s failed\n", name);
return -1;
}
flags = LOCAL_ADD_USER | LOCAL_TRUST_ACCOUNT | LOCAL_SET_PASSWORD;