summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/smbpasswd.c19
-rw-r--r--source3/utils/status.c4
2 files changed, 9 insertions, 14 deletions
diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c
index d20760bee1..94bfe464e4 100644
--- a/source3/utils/smbpasswd.c
+++ b/source3/utils/smbpasswd.c
@@ -221,13 +221,12 @@ static BOOL password_change(const char *remote_machine, char *user_name,
if (remote_machine != NULL) {
if (local_flags & (LOCAL_ADD_USER|LOCAL_DELETE_USER|LOCAL_DISABLE_USER|LOCAL_ENABLE_USER|
- LOCAL_TRUST_ACCOUNT|LOCAL_SET_NO_PASSWORD))
- {
+ LOCAL_TRUST_ACCOUNT|LOCAL_SET_NO_PASSWORD)) {
/* these things can't be done remotely yet */
return False;
}
- ret = remote_password_change(remote_machine, user_name, old_passwd,
- new_passwd, err_str, sizeof(err_str));
+ ret = remote_password_change(remote_machine, user_name,
+ old_passwd, new_passwd, err_str, sizeof(err_str));
if(*err_str)
fprintf(stderr, err_str);
return ret;
@@ -409,11 +408,9 @@ static int process_root(int argc, char *argv[])
* smbpasswd file) then we need to prompt for a new password.
*/
- if(local_flags & LOCAL_ENABLE_USER)
- {
+ if(local_flags & LOCAL_ENABLE_USER) {
SAM_ACCOUNT *sampass = pdb_getsampwnam(user_name);
- if((sampass != NULL) && (pdb_get_lanman_passwd(sampass) != NULL))
- {
+ if((sampass != NULL) && (pdb_get_lanman_passwd(sampass) != NULL)) {
new_passwd = xstrdup("XXXX"); /* Don't care. */
}
}
@@ -427,15 +424,13 @@ static int process_root(int argc, char *argv[])
}
}
- if (!password_change(remote_machine, user_name, old_passwd, new_passwd, local_flags))
- {
+ if (!password_change(remote_machine, user_name, old_passwd, new_passwd, local_flags)) {
fprintf(stderr,"Failed to modify password entry for user %s\n", user_name);
result = 1;
goto done;
}
- if(!(local_flags & (LOCAL_ADD_USER|LOCAL_DISABLE_USER|LOCAL_ENABLE_USER|LOCAL_DELETE_USER|LOCAL_SET_NO_PASSWORD)))
- {
+ if(!(local_flags & (LOCAL_ADD_USER|LOCAL_DISABLE_USER|LOCAL_ENABLE_USER|LOCAL_DELETE_USER|LOCAL_SET_NO_PASSWORD))) {
SAM_ACCOUNT *sampass = pdb_getsampwnam(user_name);
printf("Password changed for user %s.", user_name );
if( (sampass != NULL) && (pdb_get_acct_ctrl(sampass)&ACB_DISABLED) )
diff --git a/source3/utils/status.c b/source3/utils/status.c
index edc861d267..06abd09d92 100644
--- a/source3/utils/status.c
+++ b/source3/utils/status.c
@@ -58,8 +58,8 @@ static BOOL processes_only=False;
static int show_brl;
/* we need these because we link to locking*.o */
- void become_root(BOOL save_dir) {}
- void unbecome_root(BOOL restore_dir) {}
+ void become_root(void) {}
+ void unbecome_root(void) {}
/* added by OH */