diff options
author | Luke Leighton <lkcl@samba.org> | 1999-03-09 01:21:57 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-03-09 01:21:57 +0000 |
commit | a3c6e96a22bfaaa5a2993e85327555266476013d (patch) | |
tree | d18c6f1a16ab14ab17d1e4157198a941e667931b /source3/web | |
parent | aecbc5b5d37690f145c42ed834a58565c12db6d3 (diff) | |
download | samba-a3c6e96a22bfaaa5a2993e85327555266476013d.tar.gz samba-a3c6e96a22bfaaa5a2993e85327555266476013d.tar.bz2 samba-a3c6e96a22bfaaa5a2993e85327555266476013d.zip |
mods to allow inter-domain trust accounts to be added to SAM database
using smbpasswd command.
(This used to be commit 62d499f83256c6e8b3308dc4bd8e9f5df873b14b)
Diffstat (limited to 'source3/web')
-rw-r--r-- | source3/web/swat.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/source3/web/swat.c b/source3/web/swat.c index 3383b29f3b..ce7801ba5c 100644 --- a/source3/web/swat.c +++ b/source3/web/swat.c @@ -584,6 +584,8 @@ static BOOL change_password(const char *remote_machine, char *user_name, BOOL add_user, BOOL enable_user, BOOL disable_user) { BOOL ret = False; + uint16 acb_info = 0; + uint16 acb_mask = 0; pstring err_str; pstring msg_str; @@ -606,9 +608,22 @@ static BOOL change_password(const char *remote_machine, char *user_name, return False; } - ret = local_password_change(user_name, False, add_user, enable_user, - disable_user, False, new_passwd, err_str, sizeof(err_str), - msg_str, sizeof(msg_str)); + if (enable_user) + { + acb_mask |= ACB_DISABLED; + acb_info &= ~ACB_DISABLED; + } + + if (disable_user) + { + acb_mask |= ACB_DISABLED; + acb_info |= ACB_DISABLED; + } + + ret = local_password_change(user_name, add_user, + acb_info, acb_mask, + new_passwd, err_str, sizeof(err_str), + msg_str, sizeof(msg_str)); if(*msg_str) printf("%s\n<p>", msg_str); |