summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-11-18 23:15:45 +0000
committerLuke Leighton <lkcl@samba.org>1999-11-18 23:15:45 +0000
commitda517a3ff4c133a1475e8e63054201551d132436 (patch)
treea135ac5704692397cd99a230d01db1549ad552fb /source3/rpcclient
parent4245278ca3fea4a6b79daf58a8712a2774811c58 (diff)
downloadsamba-da517a3ff4c133a1475e8e63054201551d132436.tar.gz
samba-da517a3ff4c133a1475e8e63054201551d132436.tar.bz2
samba-da517a3ff4c133a1475e8e63054201551d132436.zip
responses to UDP samquery go back to SERVER<00> not DOMAIN<1c>, the
request name. modified createuser rpcclient command to examine name being added. if it ends in a $, assume that a workstation trust account is being added. (This used to be commit 4aea261cb0e5f34255ff83271eb5cadb0eb78bc9)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_samr.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c
index 90266f0868..a97288d0a2 100644
--- a/source3/rpcclient/cmd_samr.c
+++ b/source3/rpcclient/cmd_samr.c
@@ -1605,6 +1605,7 @@ void cmd_sam_create_dom_user(struct client_info *info)
uint32 user_rid;
POLICY_HND sam_pol;
POLICY_HND pol_dom;
+ uint16 acb_info;
sid_copy(&sid1, &info->dom.level5_sid);
sid_to_string(sid, &sid1);
@@ -1631,7 +1632,14 @@ void cmd_sam_create_dom_user(struct client_info *info)
acct_desc[0] = 0;
}
-
+ if (acct_name[strlen(acct_name)-1] == '$')
+ {
+ acb_info = ACB_WSTRUST;
+ }
+ else
+ {
+ acb_info = ACB_NORMAL;
+ }
report(out_hnd, "SAM Create Domain User\n");
report(out_hnd, "Domain: %s Name: %s Description: %s\n",
domain, acct_name, acct_desc);
@@ -1652,7 +1660,7 @@ void cmd_sam_create_dom_user(struct client_info *info)
/* create a domain user */
res1 = res ? create_samr_domain_user(smb_cli, fnum,
&pol_dom,
- acct_name, ACB_NORMAL, &user_rid) : False;
+ acct_name, acb_info, &user_rid) : False;
res = res ? samr_close(smb_cli, fnum,
&pol_dom) : False;