summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-03-11 00:32:10 +0000
committerJeremy Allison <jra@samba.org>2001-03-11 00:32:10 +0000
commitda3053048c3d224a20d6383ac6682d31059cd46c (patch)
treee0608d0bb47fcf3b6228db16507d3263afb869bd /source3/utils
parent1af77d39fa69d201be739e379d8bf4a370fc2df1 (diff)
downloadsamba-da3053048c3d224a20d6383ac6682d31059cd46c.tar.gz
samba-da3053048c3d224a20d6383ac6682d31059cd46c.tar.bz2
samba-da3053048c3d224a20d6383ac6682d31059cd46c.zip
Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMR
RPC code to merge with new passdb code. Currently rpcclient doesn't compile. I'm working on it... Jeremy. (This used to be commit 0be41d5158ea4e645e93e8cd30617c038416e549)
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 */