summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-01-23 13:54:02 -0800
committerJeremy Allison <jra@samba.org>2008-01-23 13:54:02 -0800
commita0186fb78d05aa997b114eee6afabaf138540ab8 (patch)
tree0b0ed3842165a0b859858325821e95380b440209 /source3/rpcclient
parenta925a53f61ebdc6b4386b7c0853f2f87cbe2e166 (diff)
downloadsamba-a0186fb78d05aa997b114eee6afabaf138540ab8.tar.gz
samba-a0186fb78d05aa997b114eee6afabaf138540ab8.tar.bz2
samba-a0186fb78d05aa997b114eee6afabaf138540ab8.zip
Forward ported version of Matt Geddes <musicalcarrion@gmail.com>
patch for adding acct_flags to rpccli_samr_create_dom_user(). Jerry please test. Jeremy. (This used to be commit 7d94f97947b7edfcf3ec52f0125e4593d6d54c05)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_samr.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c
index 171027fa49..5b42c6bc0e 100644
--- a/source3/rpcclient/cmd_samr.c
+++ b/source3/rpcclient/cmd_samr.c
@@ -1450,7 +1450,7 @@ static NTSTATUS cmd_samr_create_dom_user(struct rpc_pipe_client *cli,
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
const char *acct_name;
uint32 acb_info;
- uint32 user_rid;
+ uint32 acct_flags, user_rid;
uint32 access_mask = MAXIMUM_ALLOWED_ACCESS;
if ((argc < 2) || (argc > 3)) {
@@ -1459,7 +1459,7 @@ static NTSTATUS cmd_samr_create_dom_user(struct rpc_pipe_client *cli,
}
acct_name = argv[1];
-
+
if (argc > 2)
sscanf(argv[2], "%x", &access_mask);
@@ -1483,10 +1483,13 @@ static NTSTATUS cmd_samr_create_dom_user(struct rpc_pipe_client *cli,
/* Create domain user */
acb_info = ACB_NORMAL;
- access_mask = 0xe005000b;
+ acct_flags = SAMR_GENERIC_READ | SAMR_GENERIC_WRITE |
+ SAMR_GENERIC_EXECUTE | SAMR_STANDARD_WRITEDAC |
+ SAMR_STANDARD_DELETE | SAMR_USER_SETPASS |
+ SAMR_USER_GETATTR | SAMR_USER_SETATTR;
result = rpccli_samr_create_dom_user(cli, mem_ctx, &domain_pol,
- acct_name, acb_info, access_mask,
+ acct_name, acb_info, acct_flags,
&user_pol, &user_rid);
if (!NT_STATUS_IS_OK(result))