summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2001-05-07 14:04:46 +0000
committerGerald Carter <jerry@samba.org>2001-05-07 14:04:46 +0000
commit30c4c04c2f584857633ce7605555dcfb37a3e1af (patch)
treecd8eb3081373a1d46a9e5d601e92467db40f9817 /source3/utils
parent050b0307f086037ec9c21d7125fd2a86cf218339 (diff)
downloadsamba-30c4c04c2f584857633ce7605555dcfb37a3e1af.tar.gz
samba-30c4c04c2f584857633ce7605555dcfb37a3e1af.tar.bz2
samba-30c4c04c2f584857633ce7605555dcfb37a3e1af.zip
Patch from Simo:
o sed 's/pdb_clear_sam/pdb_free_sam/g' o add pdb_reset_sam() o password changing should be ok now as well. (This used to be commit 96d0e7c3301ad990f6c83b9c216720cb32661fb5)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/pdbedit.c15
-rw-r--r--source3/utils/smbpasswd.c4
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: