diff options
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/pdbedit.c | 15 | ||||
-rw-r--r-- | source3/utils/smbpasswd.c | 4 |
2 files changed, 10 insertions, 9 deletions
diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c index da57dbd8c8..ef62fe32df 100644 --- a/source3/utils/pdbedit.c +++ b/source3/utils/pdbedit.c @@ -122,12 +122,12 @@ static int print_user_info (char *username, BOOL verbosity, BOOL smbpwdstyle) if (ret==False) { fprintf (stderr, "Username not found!\n"); - pdb_clear_sam(sam_pwent); + pdb_free_sam(sam_pwent); return -1; } ret=print_sam_info (sam_pwent, verbosity, smbpwdstyle); - pdb_clear_sam(sam_pwent); + pdb_free_sam(sam_pwent); return ret; } @@ -145,7 +145,7 @@ static int print_users_list (BOOL verbosity, BOOL smbpwdstyle) ret = pdb_setsampwent(False); if (ret && errno == ENOENT) { fprintf (stderr,"Password database not found!\n"); - pdb_clear_sam(sam_pwent); + pdb_free_sam(sam_pwent); exit(1); } @@ -153,10 +153,11 @@ static int print_users_list (BOOL verbosity, BOOL smbpwdstyle) { if (verbosity) printf ("---------------\n"); print_sam_info (sam_pwent, verbosity, smbpwdstyle); + pdb_reset_sam(sam_pwent); } pdb_endsampwent (); - pdb_clear_sam(sam_pwent); + pdb_free_sam(sam_pwent); return 0; } @@ -174,7 +175,7 @@ static int set_user_info (char *username, char *fullname, char *homedir, char *d if (ret==False) { fprintf (stderr, "Username not found!\n"); - pdb_clear_sam(sam_pwent); + pdb_free_sam(sam_pwent); return -1; } @@ -188,10 +189,10 @@ static int set_user_info (char *username, char *fullname, char *homedir, char *d else { fprintf (stderr, "Unable to modify entry!\n"); - pdb_clear_sam(sam_pwent); + pdb_free_sam(sam_pwent); return -1; } - pdb_clear_sam(sam_pwent); + pdb_free_sam(sam_pwent); return 0; } diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c index 2131ea0d8f..00a7d3c1c1 100644 --- a/source3/utils/smbpasswd.c +++ b/source3/utils/smbpasswd.c @@ -420,7 +420,7 @@ static int process_root(int argc, char *argv[]) if((sampass != False) && (pdb_get_lanman_passwd(sampass) != NULL)) { new_passwd = xstrdup("XXXX"); /* Don't care. */ } - pdb_clear_sam(sampass); + pdb_free_sam(sampass); } if(!new_passwd) @@ -451,7 +451,7 @@ static int process_root(int argc, char *argv[]) if((ret != False) && (pdb_get_acct_ctrl(sampass) & ACB_PWNOTREQ) ) printf(" User has no password flag set."); printf("\n"); - pdb_clear_sam(sampass); + pdb_free_sam(sampass); } done: |