summaryrefslogtreecommitdiffstats
path: root/source/utils
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-05-07 19:59:32 +0000
committerLuke Leighton <lkcl@samba.org>1998-05-07 19:59:32 +0000
commitabe261b2f5ea7036e7be6230876176d134ef4ee4 (patch)
tree9c6afefcf6e77caf45efafa6739bf39195dcb188 /source/utils
parent1fd8d12ca414066acec71b33eb8a13e16c2acd3a (diff)
downloadsamba-abe261b2f5ea7036e7be6230876176d134ef4ee4.tar.gz
samba-abe261b2f5ea7036e7be6230876176d134ef4ee4.tar.xz
samba-abe261b2f5ea7036e7be6230876176d134ef4ee4.zip
moving gethexpwd into util.c, because it's used in both smbpass.c and ldap.c
Diffstat (limited to 'source/utils')
-rw-r--r--source/utils/smbpasswd.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c
index cc883ff51b7..2504727bd6c 100644
--- a/source/utils/smbpasswd.c
+++ b/source/utils/smbpasswd.c
@@ -637,13 +637,13 @@ int main(int argc, char **argv)
/*
* Open the smbpaswd file.
*/
- vp = startsmbpwent(True);
+ vp = startsampwent(True);
if (!vp && errno == ENOENT) {
fp = fopen(lp_smb_passwd_file(), "w");
if (fp) {
fprintf(fp, "# Samba SMB password file\n");
fclose(fp);
- vp = startsmbpwent(True);
+ vp = startsampwent(True);
}
}
if (!fp) {
@@ -656,12 +656,12 @@ int main(int argc, char **argv)
}
/* Get the smb passwd entry for this user */
- smb_pwent = getsmbpwnam(user_name);
+ smb_pwent = getsampwnam(user_name);
if (smb_pwent == NULL) {
if(add_user == False) {
fprintf(stderr, "%s: Failed to find entry for user %s.\n",
prog_name, pwd->pw_name);
- endsmbpwent(vp);
+ endsampwent(vp);
exit(1);
}
@@ -684,14 +684,14 @@ int main(int argc, char **argv)
new_smb_pwent.smb_nt_passwd = new_nt_p16;
}
- if(add_smbpwd_entry(&new_smb_pwent) == False) {
+ if(add_sampwd_entry(&new_smb_pwent) == False) {
fprintf(stderr, "%s: Failed to add entry for user %s.\n",
prog_name, pwd->pw_name);
- endsmbpwent(vp);
+ endsampwent(vp);
exit(1);
}
- endsmbpwent(vp);
+ endsampwent(vp);
printf("%s: Added user %s.\n", prog_name, user_name);
exit(0);
}
@@ -726,14 +726,14 @@ int main(int argc, char **argv)
smb_pwent->smb_nt_passwd = new_nt_p16;
}
- if(mod_smbpwd_entry(smb_pwent,True) == False) {
+ if(mod_sampwd_entry(smb_pwent,True) == False) {
fprintf(stderr, "%s: Failed to modify entry for user %s.\n",
prog_name, pwd->pw_name);
- endsmbpwent(vp);
+ endsampwent(vp);
exit(1);
}
- endsmbpwent(vp);
+ endsampwent(vp);
if(disable_user)
printf("User %s disabled.\n", user_name);
else if (set_no_password)