summaryrefslogtreecommitdiffstats
path: root/source/utils/pdbedit.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-02-03 22:19:41 +0000
committerGerald Carter <jerry@samba.org>2006-02-03 22:19:41 +0000
commit5831715049f2d460ce42299963a5defdc160891b (patch)
tree19a0c31c817c9bc26fd53485b5348ab4af127a23 /source/utils/pdbedit.c
parente24ac859e7964714ed3b543300aadf77955af5bf (diff)
downloadsamba-5831715049f2d460ce42299963a5defdc160891b.tar.gz
samba-5831715049f2d460ce42299963a5defdc160891b.tar.xz
samba-5831715049f2d460ce42299963a5defdc160891b.zip
r13316: Let the carnage begin....
Sync with trunk as off r13315
Diffstat (limited to 'source/utils/pdbedit.c')
-rw-r--r--source/utils/pdbedit.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/utils/pdbedit.c b/source/utils/pdbedit.c
index f41bbb8caaf..0b17d50ad31 100644
--- a/source/utils/pdbedit.c
+++ b/source/utils/pdbedit.c
@@ -337,7 +337,7 @@ static int fix_users_list (struct pdb_context *in)
while (check && NT_STATUS_IS_OK(in->pdb_getsampwent (in, sam_pwent))) {
printf("Updating record for user %s\n", pdb_get_username(sam_pwent));
- if (!pdb_update_sam_account(sam_pwent)) {
+ if (!NT_STATUS_IS_OK(pdb_update_sam_account(sam_pwent))) {
printf("Update of user %s failed!\n", pdb_get_username(sam_pwent));
}
pdb_free_sam(&sam_pwent);
@@ -498,7 +498,7 @@ static int new_user (struct pdb_context *in, const char *username,
get_global_sam_sid();
- if (!NT_STATUS_IS_OK(pdb_init_sam_new(&sam_pwent, username, 0))) {
+ if (!NT_STATUS_IS_OK(pdb_init_sam_new(&sam_pwent, username))) {
DEBUG(0, ("could not create account to add new user %s\n", username));
return -1;
}
@@ -603,13 +603,13 @@ static int new_machine (struct pdb_context *in, const char *machine_in)
fstrcpy(machineaccount, machinename);
fstrcat(machineaccount, "$");
- if ((pwd = getpwnam_alloc(machineaccount))) {
+ if ((pwd = getpwnam_alloc(NULL, machineaccount))) {
if (!NT_STATUS_IS_OK(pdb_init_sam_pw( &sam_pwent, pwd))) {
fprintf(stderr, "Could not init sam from pw\n");
- passwd_free(&pwd);
+ talloc_free(pwd);
return -1;
}
- passwd_free(&pwd);
+ talloc_free(&pwd);
} else {
if (!NT_STATUS_IS_OK(pdb_init_sam (&sam_pwent))) {
fprintf(stderr, "Could not init sam from pw\n");