1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-13 08:23:49 +03:00

r16360: Fix Klocwork ID 136 520 521 522 523 542 574 575 576 607

in net_rpc.c: 715 716 732 734 735 736 737 738 739 749

in net_rpc_audit.c: 754 755 756

in net_rpc_join.c: 757

in net_rpc_registry: 766 767

in net_rpc_samsync.c: 771 773

in net_sam.c: 797 798

Volker
This commit is contained in:
Volker Lendecke
2006-06-19 19:07:39 +00:00
committed by Gerald (Jerry) Carter
parent 09c8973286
commit 3df0bf7d60
12 changed files with 117 additions and 16 deletions

View File

@@ -840,7 +840,11 @@ static int net_sam_provision(int argc, const char **argv)
return -1;
}
ldap_bk = talloc_strdup(tc, lp_passdb_backend());
if ((ldap_bk = talloc_strdup(tc, lp_passdb_backend())) == NULL) {
d_fprintf(stderr, "talloc failed\n");
talloc_free(tc);
return -1;
}
p = strchr(ldap_bk, ':');
if (p) {
*p = 0;
@@ -1081,7 +1085,10 @@ doma_done:
d_fprintf(stderr, "Can't create Guest user, Domain Users group not available!\n");
goto done;
}
pwd = talloc(tc, struct passwd);
if ((pwd = talloc(tc, struct passwd)) == NULL) {
d_fprintf(stderr, "talloc failed\n");
goto done;
}
pwd->pw_name = talloc_strdup(pwd, lp_guestaccount());
if (!winbind_allocate_uid(&(pwd->pw_uid))) {
d_fprintf(stderr, "Unable to allocate a new uid to create the Guest user!\n");