summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-03-19 21:20:19 +0000
committerLuke Leighton <lkcl@samba.org>1999-03-19 21:20:19 +0000
commitda4cd4f5a9c8aaf9caddbc6864a6ba7ac4adf67f (patch)
tree580089043757b1440a1f2ddbf0a3802d12baba70 /source3/include
parent19e22bc8b6d8542567381d9bebdd9337019f7353 (diff)
downloadsamba-da4cd4f5a9c8aaf9caddbc6864a6ba7ac4adf67f.tar.gz
samba-da4cd4f5a9c8aaf9caddbc6864a6ba7ac4adf67f.tar.bz2
samba-da4cd4f5a9c8aaf9caddbc6864a6ba7ac4adf67f.zip
added a "createuser" command.
(This used to be commit fefb4bf19181714cb73414febd6ee2ec10356cbe)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/proto.h18
-rw-r--r--source3/include/rpc_samr.h31
2 files changed, 46 insertions, 3 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index b604d55c51..1c704c5d5d 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1695,6 +1695,10 @@ BOOL do_reg_shutdown(struct cli_state *cli, uint16 fnum,
/*The following definitions come from rpc_client/cli_samr.c */
+BOOL create_samr_domain_user(struct cli_state *cli, uint16 fnum,
+ POLICY_HND *pol_open_domain,
+ const char *acct_name, uint16 acb_info,
+ uint32 *rid);
BOOL create_samr_domain_alias(struct cli_state *cli, uint16 fnum,
POLICY_HND *pol_open_domain,
const char *acct_name, const char *acct_desc,
@@ -1763,6 +1767,10 @@ BOOL samr_add_aliasmem(struct cli_state *cli, uint16 fnum,
POLICY_HND *alias_pol, DOM_SID *sid);
BOOL samr_delete_dom_alias(struct cli_state *cli, uint16 fnum,
POLICY_HND *alias_pol);
+BOOL samr_create_dom_user(struct cli_state *cli, uint16 fnum,
+ POLICY_HND *domain_pol, const char *acct_name,
+ uint32 unk_0, uint32 unk_1,
+ POLICY_HND *user_pol, uint32 *rid);
BOOL samr_create_dom_alias(struct cli_state *cli, uint16 fnum,
POLICY_HND *domain_pol, const char *acct_name,
POLICY_HND *alias_pol, uint32 *rid);
@@ -1783,7 +1791,8 @@ BOOL samr_create_dom_group(struct cli_state *cli, uint16 fnum,
BOOL samr_set_groupinfo(struct cli_state *cli, uint16 fnum,
POLICY_HND *group_pol, GROUP_INFO_CTR *ctr);
BOOL samr_open_domain(struct cli_state *cli, uint16 fnum,
- POLICY_HND *connect_pol, uint32 flags, DOM_SID *sid,
+ POLICY_HND *connect_pol, uint32 ace_perms,
+ DOM_SID *sid,
POLICY_HND *domain_pol);
BOOL samr_query_lookup_domain(struct cli_state *cli, uint16 fnum,
POLICY_HND *pol, const char *dom_name,
@@ -2442,6 +2451,12 @@ void make_samr_q_open_user(SAMR_Q_OPEN_USER *q_u,
uint32 unk_0, uint32 rid);
void samr_io_q_open_user(char *desc, SAMR_Q_OPEN_USER *q_u, prs_struct *ps, int depth);
void samr_io_r_open_user(char *desc, SAMR_R_OPEN_USER *r_u, prs_struct *ps, int depth);
+void make_samr_q_create_user(SAMR_Q_CREATE_USER *q_u,
+ POLICY_HND *pol,
+ const char *name,
+ uint16 acb_info, uint32 unk_1);
+void samr_io_q_create_user(char *desc, SAMR_Q_CREATE_USER *q_u, prs_struct *ps, int depth);
+void samr_io_r_create_user(char *desc, SAMR_R_CREATE_USER *r_u, prs_struct *ps, int depth);
void make_samr_q_query_userinfo(SAMR_Q_QUERY_USERINFO *q_u,
POLICY_HND *hnd, uint16 switch_value);
void samr_io_q_query_userinfo(char *desc, SAMR_Q_QUERY_USERINFO *q_u, prs_struct *ps, int depth);
@@ -2793,6 +2808,7 @@ void cmd_sam_lookup_domain(struct client_info *info);
void cmd_sam_del_aliasmem(struct client_info *info);
void cmd_sam_delete_dom_alias(struct client_info *info);
void cmd_sam_add_aliasmem(struct client_info *info);
+void cmd_sam_create_dom_user(struct client_info *info);
void cmd_sam_create_dom_alias(struct client_info *info);
void cmd_sam_del_groupmem(struct client_info *info);
void cmd_sam_delete_dom_group(struct client_info *info);
diff --git a/source3/include/rpc_samr.h b/source3/include/rpc_samr.h
index ea6a1f7919..54df484444 100644
--- a/source3/include/rpc_samr.h
+++ b/source3/include/rpc_samr.h
@@ -40,7 +40,7 @@ x SamrCloseHandle
x SamrConnect
x SamrCreateAliasInDomain
x SamrCreateGroupInDomain
-SamrCreateUserInDomain
+x SamrCreateUserInDomain
? SamrDeleteAlias
SamrDeleteGroup
SamrDeleteUser
@@ -113,6 +113,7 @@ SamrTestPrivateFunctionsUser
#define SAMR_QUERY_ALIASMEM 0x21
#define SAMR_OPEN_USER 0x22
+#define SAMR_CREATE_USER 0x32
#define SAMR_QUERY_USERINFO 0x24
#define SAMR_QUERY_USERGROUPS 0x27
@@ -1202,11 +1203,37 @@ typedef struct r_samr_open_user_info
} SAMR_R_OPEN_USER;
+/* SAMR_Q_CREATE_USER - probably a create */
+typedef struct q_samr_create_user_info
+{
+ POLICY_HND domain_pol; /* policy handle */
+
+ UNIHDR hdr_name; /* unicode account name header */
+ UNISTR2 uni_name; /* unicode account name */
+
+ uint16 acb_info; /* account control info */
+ uint32 unknown_1; /* 0xe005 00b0 */
+
+} SAMR_Q_CREATE_USER;
+
+
+/* SAMR_R_CREATE_USER - probably a create */
+typedef struct r_samr_create_user_info
+{
+ POLICY_HND user_pol; /* policy handle associated with user */
+
+ uint32 unknown_0; /* 0x0007 03ff */
+ uint32 user_rid; /* user RID */
+ uint32 status; /* return status */
+
+} SAMR_R_CREATE_USER;
+
+
/* SAMR_Q_UNKNOWN_32 - probably a "create SAM entry" */
typedef struct q_samr_unknown_32_info
{
- POLICY_HND pol; /* policy handle */
+ POLICY_HND pol; /* policy handle */
UNIHDR hdr_mach_acct; /* unicode machine account name header */
UNISTR2 uni_mach_acct; /* unicode machine account name */