summaryrefslogtreecommitdiff
path: root/source3/web
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-03-09 01:21:57 +0000
committerLuke Leighton <lkcl@samba.org>1999-03-09 01:21:57 +0000
commita3c6e96a22bfaaa5a2993e85327555266476013d (patch)
treed18c6f1a16ab14ab17d1e4157198a941e667931b /source3/web
parentaecbc5b5d37690f145c42ed834a58565c12db6d3 (diff)
downloadsamba-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.c21
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);