2003-11-21 16:14:17 +03:00
#include "idl_types.h"
2003-11-15 09:00:21 +03:00
/*
samr interface definition
2003-11-19 01:35:39 +03:00
*/
/*
Thanks to Todd Sabin for some information from his samr.idl in acltools
2003-11-15 09:00:21 +03:00
*/
2004-10-27 08:48:41 +04:00
[ uuid("12345778-1234-abcd-ef00-0123456789ac"),
2003-11-15 09:00:21 +03:00
version(1.0),
2004-10-24 18:57:16 +04:00
endpoint("ncacn_np:[\\pipe\\samr]","ncacn_ip_tcp:", "ncalrpc:"),
2004-11-01 13:30:34 +03:00
pointer_default(unique),
r6973: Merge new version of pidl into the main SAMBA_4_0 branch.
The main difference in this new version is the extra data structure generated
between the IDL data structure and the NDR parser:
IDL -> NDR -> { ndr_parser, ndr_header, eparser, etc }
This makes the ndr_parser.pm internals much more sane.
Other changes include:
- Remove unnecessary calls with NDR_BUFFERS (for example, GUID doesn't have any buffers, just scalars) as well as some (unnecessary) nested setting of flags.
- Parse array loops in the C code rather then calling ndr_pull_array(). This allows us to have, for example, arrays of pointers or arrays of pointers to arrays, etc..
- Use if() {} rather then if () goto foo; everywhere
- NDR_IN no longer implies LIBNDR_FLAG_REF_ALLOC
- By default, top level pointers are now "ref" (as is the default in
most other IDL compilers). This can be overridden using the
default_pointer_top() property.
- initial work on new ethereal parser generators by Alan DeKok and me
- pidl now writes errors in the standard format used by compilers, which
is parsable by most editors
- ability to warn about the fact that pidl extension(s) have been used,
useful for making sure IDL files work with other IDL compilers.
oh, and there's probably some other things I can't think of right now..
(This used to be commit 13cf227615f6b9e0e5fa62e59197024410254f01)
2005-05-25 17:50:27 +04:00
pointer_default_top(unique),
2004-11-17 17:35:29 +03:00
depends(lsa,security)
2003-11-18 08:01:10 +03:00
] interface samr
2003-11-15 09:00:21 +03:00
{
2005-08-24 15:01:10 +04:00
declare bitmap security_secinfo;
2004-05-09 13:39:47 +04:00
/* account control (acct_flags) bits */
2005-01-26 07:34:16 +03:00
typedef [public,bitmap32bit] bitmap {
2005-01-05 19:54:51 +03:00
ACB_DISABLED = 0x00000001, /* 1 = User account disabled */
ACB_HOMDIRREQ = 0x00000002, /* 1 = Home directory required */
ACB_PWNOTREQ = 0x00000004, /* 1 = User password not required */
ACB_TEMPDUP = 0x00000008, /* 1 = Temporary duplicate account */
ACB_NORMAL = 0x00000010, /* 1 = Normal user account */
ACB_MNS = 0x00000020, /* 1 = MNS logon user account */
ACB_DOMTRUST = 0x00000040, /* 1 = Interdomain trust account */
ACB_WSTRUST = 0x00000080, /* 1 = Workstation trust account */
ACB_SVRTRUST = 0x00000100, /* 1 = Server trust account */
ACB_PWNOEXP = 0x00000200, /* 1 = User password does not expire */
ACB_AUTOLOCK = 0x00000400 /* 1 = Account auto locked */
} samr_AcctFlags;
2004-05-09 13:39:47 +04:00
2003-11-15 09:00:21 +03:00
/******************/
/* Function: 0x00 */
NTSTATUS samr_Connect (
/* notice the lack of [string] */
[in] uint16 *system_name,
[in] uint32 access_mask,
2004-09-21 07:51:38 +04:00
[out,ref] policy_handle *connect_handle
2003-11-15 09:00:21 +03:00
);
/******************/
/* Function: 0x01 */
2003-11-15 23:47:59 +03:00
NTSTATUS samr_Close (
[in,out,ref] policy_handle *handle
);
2003-11-15 09:00:21 +03:00
/******************/
/* Function: 0x02 */
2003-11-19 07:44:47 +03:00
2003-12-20 02:44:26 +03:00
NTSTATUS samr_SetSecurity (
[in,ref] policy_handle *handle,
2005-08-24 15:01:10 +04:00
[in] security_secinfo sec_info,
2004-11-20 03:29:04 +03:00
[in,ref] sec_desc_buf *sdbuf
2003-12-20 02:44:26 +03:00
);
/******************/
/* Function: 0x03 */
2003-11-18 08:20:54 +03:00
NTSTATUS samr_QuerySecurity (
[in,ref] policy_handle *handle,
2005-08-24 15:01:10 +04:00
[in] security_secinfo sec_info,
2004-11-20 03:29:04 +03:00
[out] sec_desc_buf *sdbuf
2003-11-18 08:20:54 +03:00
);
2003-11-15 09:00:21 +03:00
/******************/
/* Function: 0x04 */
2004-04-23 08:21:22 +04:00
/*
shutdown the SAM - once you call this the SAM will be dead
*/
NTSTATUS samr_Shutdown (
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *connect_handle
2004-04-23 08:21:22 +04:00
);
2003-11-15 09:00:21 +03:00
/******************/
/* Function: 0x05 */
2003-11-15 10:51:19 +03:00
NTSTATUS samr_LookupDomain (
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *connect_handle,
2005-07-08 12:09:02 +04:00
[in,ref] lsa_String *domain_name,
2003-11-15 10:51:19 +03:00
[out] dom_sid2 *sid
);
/******************/
/* Function: 0x06 */
2003-11-15 09:00:21 +03:00
typedef struct {
2003-11-15 10:51:19 +03:00
uint32 idx;
2005-07-08 12:09:02 +04:00
lsa_String name;
2003-11-15 09:00:21 +03:00
} samr_SamEntry;
typedef struct {
uint32 count;
2005-05-27 19:49:15 +04:00
[size_is(count)] samr_SamEntry *entries;
2003-11-15 09:00:21 +03:00
} samr_SamArray;
NTSTATUS samr_EnumDomains (
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *connect_handle,
2003-11-15 09:00:21 +03:00
[in,out,ref] uint32 *resume_handle,
[in] uint32 buf_size,
[out] samr_SamArray *sam,
2003-11-22 11:11:32 +03:00
[out] uint32 num_entries
2003-11-15 09:00:21 +03:00
);
/************************/
/* Function 0x07 */
2003-11-15 11:06:39 +03:00
NTSTATUS samr_OpenDomain(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *connect_handle,
2003-11-15 11:06:39 +03:00
[in] uint32 access_mask,
[in,ref] dom_sid2 *sid,
[out,ref] policy_handle *domain_handle
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x08 */
2005-01-10 20:28:36 +03:00
/* server roles */
typedef [v1_enum] enum {
ROLE_STANDALONE = 0,
ROLE_DOMAIN_MEMBER = 1,
ROLE_DOMAIN_BDC = 2,
ROLE_DOMAIN_PDC = 3
} samr_Role;
2003-11-15 11:06:39 +03:00
typedef struct {
2004-11-17 14:56:13 +03:00
uint16 min_password_length;
uint16 password_history_length;
2004-05-04 17:42:32 +04:00
uint32 password_properties;
2004-05-25 17:57:39 +04:00
/* yes, these are signed. They are in negative 100ns */
2005-01-27 09:16:59 +03:00
dlong max_password_age;
dlong min_password_age;
2003-11-15 11:06:39 +03:00
} samr_DomInfo1;
2003-11-15 12:18:02 +03:00
typedef struct {
2004-11-17 14:56:13 +03:00
NTTIME force_logoff_time;
2005-07-08 12:09:02 +04:00
lsa_String comment;
lsa_String domain_name;
lsa_String primary; /* PDC name if this is a BDC */
2005-01-27 09:16:59 +03:00
udlong sequence_num;
2003-11-15 14:34:01 +03:00
uint32 unknown2;
2005-01-10 20:28:36 +03:00
samr_Role role;
2003-11-15 14:34:01 +03:00
uint32 unknown3;
2003-11-15 12:18:02 +03:00
uint32 num_users;
uint32 num_groups;
uint32 num_aliases;
} samr_DomInfo2;
typedef struct {
2004-11-17 14:56:13 +03:00
NTTIME force_logoff_time;
2003-11-15 12:18:02 +03:00
} samr_DomInfo3;
typedef struct {
2005-07-08 12:09:02 +04:00
lsa_String comment;
2003-11-15 12:18:02 +03:00
} samr_DomInfo4;
typedef struct {
2005-07-08 12:09:02 +04:00
lsa_String domain_name;
2003-11-15 12:18:02 +03:00
} samr_DomInfo5;
typedef struct {
2005-07-08 12:09:02 +04:00
lsa_String primary;
2003-11-15 12:18:02 +03:00
} samr_DomInfo6;
typedef struct {
2005-01-10 20:28:36 +03:00
samr_Role role;
2003-11-15 12:18:02 +03:00
} samr_DomInfo7;
typedef struct {
2005-01-27 09:33:07 +03:00
hyper sequence_num;
2004-11-17 14:56:13 +03:00
NTTIME domain_create_time;
2003-11-15 12:18:02 +03:00
} samr_DomInfo8;
typedef struct {
2004-04-26 04:31:31 +04:00
uint32 unknown; /* w2k3 returns 1 */
2003-11-15 12:18:02 +03:00
} samr_DomInfo9;
typedef struct {
2004-10-07 07:47:38 +04:00
samr_DomInfo2 info2;
2005-01-27 09:33:07 +03:00
hyper lockout_duration;
hyper lockout_window;
2003-11-15 12:18:02 +03:00
uint16 lockout_threshold;
} samr_DomInfo11;
typedef struct {
2005-01-27 09:33:07 +03:00
hyper lockout_duration;
hyper lockout_window;
2003-11-15 12:18:02 +03:00
uint16 lockout_threshold;
} samr_DomInfo12;
typedef struct {
2005-01-27 09:33:07 +03:00
hyper sequence_num;
2004-11-17 14:56:13 +03:00
NTTIME domain_create_time;
2003-11-15 14:13:49 +03:00
uint32 unknown1;
uint32 unknown2;
2003-11-15 12:18:02 +03:00
} samr_DomInfo13;
2005-03-06 20:02:14 +03:00
typedef [switch_type(uint16)] union {
2003-11-20 03:57:59 +03:00
[case(1)] samr_DomInfo1 info1;
[case(2)] samr_DomInfo2 info2;
[case(3)] samr_DomInfo3 info3;
[case(4)] samr_DomInfo4 info4;
[case(5)] samr_DomInfo5 info5;
[case(6)] samr_DomInfo6 info6;
[case(7)] samr_DomInfo7 info7;
[case(8)] samr_DomInfo8 info8;
[case(9)] samr_DomInfo9 info9;
[case(11)] samr_DomInfo11 info11;
[case(12)] samr_DomInfo12 info12;
[case(13)] samr_DomInfo13 info13;
2003-11-15 11:06:39 +03:00
} samr_DomainInfo;
NTSTATUS samr_QueryDomainInfo(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *domain_handle,
2003-11-15 11:06:39 +03:00
[in] uint16 level,
[out,switch_is(level)] samr_DomainInfo *info
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x09 */
2004-04-17 09:25:49 +04:00
/*
only levels 1, 3, 4, 6, 7, 9, 12 are valid for this
call in w2k3
*/
NTSTATUS samr_SetDomainInfo(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *domain_handle,
2004-04-17 09:25:49 +04:00
[in] uint16 level,
[in,switch_is(level),ref] samr_DomainInfo *info
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x0a */
2004-04-17 09:54:55 +04:00
NTSTATUS samr_CreateDomainGroup(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *domain_handle,
2005-07-08 12:09:02 +04:00
[in,ref] lsa_String *name,
2004-04-17 09:54:55 +04:00
[in] uint32 access_mask,
[out,ref] policy_handle *group_handle,
[out,ref] uint32 *rid
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x0b */
2003-11-15 12:39:48 +03:00
NTSTATUS samr_EnumDomainGroups(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *domain_handle,
2003-11-15 12:39:48 +03:00
[in,out,ref] uint32 *resume_handle,
[in] uint32 max_size,
[out] samr_SamArray *sam,
2003-11-22 11:11:32 +03:00
[out] uint32 num_entries
2003-11-15 12:39:48 +03:00
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x0c */
2003-11-18 11:03:06 +03:00
NTSTATUS samr_CreateUser(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *domain_handle,
2005-07-08 12:09:02 +04:00
[in,ref] lsa_String *account_name,
2003-11-18 11:03:06 +03:00
[in] uint32 access_mask,
2004-09-21 07:51:38 +04:00
[out,ref] policy_handle *user_handle,
2003-11-18 13:21:05 +03:00
[out,ref] uint32 *rid
2003-11-18 11:03:06 +03:00
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x0d */
2004-05-08 18:42:45 +04:00
2004-05-09 13:39:47 +04:00
2004-05-08 18:42:45 +04:00
/* w2k3 treats max_size as max_users*54 and sets the
resume_handle as the rid of the last user sent
*/
2004-05-09 04:40:45 +04:00
const int SAMR_ENUM_USERS_MULTIPLIER = 54;
2003-11-15 12:39:48 +03:00
NTSTATUS samr_EnumDomainUsers(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *domain_handle,
2003-11-15 12:39:48 +03:00
[in,out,ref] uint32 *resume_handle,
2005-01-05 19:54:51 +03:00
[in] samr_AcctFlags acct_flags,
2003-11-15 12:39:48 +03:00
[in] uint32 max_size,
[out] samr_SamArray *sam,
2003-11-22 11:11:32 +03:00
[out] uint32 num_entries
2003-11-15 12:39:48 +03:00
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x0e */
2003-12-19 06:59:27 +03:00
NTSTATUS samr_CreateDomAlias(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *domain_handle,
2005-07-08 12:09:02 +04:00
[in,ref] lsa_String *alias_name,
2003-12-19 06:59:27 +03:00
[in] uint32 access_mask,
2004-09-21 07:51:38 +04:00
[out,ref] policy_handle *alias_handle,
2003-12-19 06:59:27 +03:00
[out,ref] uint32 *rid
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x0f */
2003-11-15 13:03:12 +03:00
NTSTATUS samr_EnumDomainAliases(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *domain_handle,
2003-11-15 13:03:12 +03:00
[in,out,ref] uint32 *resume_handle,
2005-01-05 19:54:51 +03:00
[in] samr_AcctFlags acct_flags,
2003-11-15 13:03:12 +03:00
[out] samr_SamArray *sam,
2003-11-22 11:11:32 +03:00
[out] uint32 num_entries
2003-11-15 13:03:12 +03:00
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x10 */
2003-11-18 11:03:06 +03:00
typedef struct {
2004-10-13 17:00:57 +04:00
[range(0,1024)] uint32 count;
2005-05-27 19:49:15 +04:00
[size_is(count)] uint32 *ids;
2003-11-20 06:09:19 +03:00
} samr_Ids;
2003-11-18 11:03:06 +03:00
NTSTATUS samr_GetAliasMembership(
2004-12-29 16:20:17 +03:00
[in,ref] policy_handle *domain_handle,
2004-04-18 08:06:15 +04:00
[in,ref] lsa_SidArray *sids,
2004-12-29 16:20:17 +03:00
[out,ref] samr_Ids *rids
2003-11-18 11:03:06 +03:00
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x11 */
2003-11-20 06:09:19 +03:00
NTSTATUS samr_LookupNames(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *domain_handle,
2004-10-13 17:00:57 +04:00
[in,range(0,1000)] uint32 num_names,
2005-07-08 12:09:02 +04:00
[in,size_is(1000),length_is(num_names)] lsa_String names[],
2003-11-20 06:09:19 +03:00
[out] samr_Ids rids,
[out] samr_Ids types
);
2003-11-15 09:00:21 +03:00
2003-11-20 06:18:07 +03:00
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x12 */
2003-11-20 06:18:07 +03:00
NTSTATUS samr_LookupRids(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *domain_handle,
2004-10-13 17:00:57 +04:00
[in,range(0,1000)] uint32 num_rids,
2005-03-05 21:34:18 +03:00
[in,size_is(1000),length_is(num_rids)] uint32 rids[],
2005-07-08 12:09:02 +04:00
[out] lsa_Strings names,
2003-11-20 06:18:07 +03:00
[out] samr_Ids types
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x13 */
2003-11-15 15:14:22 +03:00
NTSTATUS samr_OpenGroup(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *domain_handle,
2003-11-15 15:14:22 +03:00
[in] uint32 access_mask,
[in] uint32 rid,
2004-09-21 07:51:38 +04:00
[out,ref] policy_handle *group_handle
2003-11-15 15:14:22 +03:00
);
2003-11-15 09:00:21 +03:00
2005-06-29 17:55:09 +04:00
/* Group attributes */
const int SE_GROUP_MANDATORY = 0x0001;
const int SE_GROUP_ENABLED_BY_DEFAULT = 0x0002;
const int SE_GROUP_ENABLED = 0x0004;
2003-11-15 15:38:06 +03:00
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x14 */
2003-11-15 15:14:22 +03:00
typedef struct {
2005-07-08 12:09:02 +04:00
lsa_String name;
2004-11-17 16:39:37 +03:00
uint32 attributes;
2003-11-15 15:38:06 +03:00
uint32 num_members;
2005-07-08 12:09:02 +04:00
lsa_String description;
2003-11-15 15:14:22 +03:00
} samr_GroupInfoAll;
typedef struct {
uint32 unknown;
} samr_GroupInfoX;
typedef struct {
2005-07-08 12:09:02 +04:00
lsa_String description;
2003-11-15 15:14:22 +03:00
} samr_GroupInfoDesciption;
2003-11-23 01:53:08 +03:00
typedef enum {
2005-01-29 05:46:37 +03:00
GROUPINFOALL = 1,
GROUPINFONAME = 2,
GROUPINFOX = 3,
GROUPINFODESCRIPTION = 4,
GROUPINFOALL2 = 5
} samr_GroupInfoEnum;
2003-11-23 01:53:08 +03:00
2005-03-06 20:02:14 +03:00
typedef [switch_type(samr_GroupInfoEnum)] union {
2005-01-29 05:46:37 +03:00
[case(GROUPINFOALL)] samr_GroupInfoAll all;
2005-07-08 12:09:02 +04:00
[case(GROUPINFONAME)] lsa_String name;
2005-01-29 05:46:37 +03:00
[case(GROUPINFOX)] samr_GroupInfoX unknown;
2005-07-08 12:09:02 +04:00
[case(GROUPINFODESCRIPTION)] lsa_String description;
2005-01-29 05:46:37 +03:00
[case(GROUPINFOALL2)] samr_GroupInfoAll all2;
2003-11-15 15:14:22 +03:00
} samr_GroupInfo;
NTSTATUS samr_QueryGroupInfo(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *group_handle,
2005-01-29 05:46:37 +03:00
[in] samr_GroupInfoEnum level,
2003-11-15 15:14:22 +03:00
[out,switch_is(level)] samr_GroupInfo *info
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x15 */
2004-04-17 10:19:51 +04:00
NTSTATUS samr_SetGroupInfo(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *group_handle,
2005-01-29 05:46:37 +03:00
[in] samr_GroupInfoEnum level,
2004-04-17 10:19:51 +04:00
[in,switch_is(level),ref] samr_GroupInfo *info
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x16 */
2004-04-17 10:40:50 +04:00
NTSTATUS samr_AddGroupMember(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *group_handle,
2004-04-17 10:40:50 +04:00
[in] uint32 rid,
[in] uint32 flags
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x17 */
2004-04-17 09:54:55 +04:00
NTSTATUS samr_DeleteDomainGroup(
2004-09-21 07:51:38 +04:00
[in,out,ref] policy_handle *group_handle
2004-04-17 09:54:55 +04:00
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x18 */
2004-04-17 10:49:26 +04:00
NTSTATUS samr_DeleteGroupMember(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *group_handle,
2004-04-17 10:49:26 +04:00
[in] uint32 rid
);
2003-11-15 09:00:21 +03:00
2004-04-23 08:21:22 +04:00
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x19 */
2004-04-23 08:21:22 +04:00
typedef struct {
uint32 count;
2005-05-27 19:49:15 +04:00
[size_is(count)] uint32 *rids;
[size_is(count)] uint32 *types;
2005-05-01 12:05:17 +04:00
} samr_RidTypeArray;
2004-04-23 08:21:22 +04:00
NTSTATUS samr_QueryGroupMember(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *group_handle,
2005-05-01 12:05:17 +04:00
[out] samr_RidTypeArray *rids
2004-04-23 08:21:22 +04:00
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x1a */
2004-04-23 08:21:22 +04:00
/*
win2003 seems to accept any data at all for the two integers
below, and doesn't seem to do anything with them that I can
see. Weird. I really expected the first integer to be a rid
and the second to be the attributes for that rid member.
*/
NTSTATUS samr_SetMemberAttributesOfGroup(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *group_handle,
2004-04-23 08:21:22 +04:00
[in] uint32 unknown1,
[in] uint32 unknown2
);
2003-11-15 09:00:21 +03:00
2003-11-15 15:38:06 +03:00
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x1b */
2003-11-15 15:38:06 +03:00
NTSTATUS samr_OpenAlias (
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *domain_handle,
2003-11-15 15:38:06 +03:00
[in] uint32 access_mask,
[in] uint32 rid,
2004-09-21 07:51:38 +04:00
[out,ref] policy_handle *alias_handle
2003-11-15 15:38:06 +03:00
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x1c */
2003-11-15 15:38:06 +03:00
typedef struct {
2005-07-08 12:09:02 +04:00
lsa_String name;
2003-11-15 15:38:06 +03:00
uint32 num_members;
2005-07-08 12:09:02 +04:00
lsa_String description;
2003-11-15 15:38:06 +03:00
} samr_AliasInfoAll;
2004-12-27 14:27:30 +03:00
typedef enum {
2005-01-29 05:46:37 +03:00
ALIASINFOALL = 1,
ALIASINFONAME = 2,
ALIASINFODESCRIPTION = 3
} samr_AliasInfoEnum;
2004-12-27 14:27:30 +03:00
2005-03-06 20:02:14 +03:00
typedef [switch_type(samr_AliasInfoEnum)] union {
2005-01-29 05:46:37 +03:00
[case(ALIASINFOALL)] samr_AliasInfoAll all;
2005-07-08 12:09:02 +04:00
[case(ALIASINFONAME)] lsa_String name;
[case(ALIASINFODESCRIPTION)] lsa_String description;
2003-11-15 15:38:06 +03:00
} samr_AliasInfo;
NTSTATUS samr_QueryAliasInfo(
2005-01-05 03:41:49 +03:00
[in,ref] policy_handle *alias_handle,
2005-01-29 05:46:37 +03:00
[in] samr_AliasInfoEnum level,
2003-11-15 15:38:06 +03:00
[out,switch_is(level)] samr_AliasInfo *info
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x1d */
2003-12-19 06:59:27 +03:00
NTSTATUS samr_SetAliasInfo(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *alias_handle,
2005-01-29 05:46:37 +03:00
[in] samr_AliasInfoEnum level,
2005-01-05 03:41:49 +03:00
[in,switch_is(level),ref] samr_AliasInfo *info
2003-12-19 06:59:27 +03:00
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x1e */
2003-12-19 06:59:27 +03:00
NTSTATUS samr_DeleteDomAlias(
2004-09-21 07:51:38 +04:00
[in,out,ref] policy_handle *alias_handle
2003-12-19 06:59:27 +03:00
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x1f */
2004-04-23 08:21:22 +04:00
NTSTATUS samr_AddAliasMember(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *alias_handle,
2003-12-19 06:59:27 +03:00
[in,ref] dom_sid2 *sid
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x20 */
2004-04-23 08:21:22 +04:00
NTSTATUS samr_DeleteAliasMember(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *alias_handle,
2003-12-19 06:59:27 +03:00
[in,ref] dom_sid2 *sid
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x21 */
2003-12-19 06:59:27 +03:00
NTSTATUS samr_GetMembersInAlias(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *alias_handle,
2003-12-19 06:59:27 +03:00
[out,ref] lsa_SidArray *sids
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x22 */
2003-11-15 13:03:12 +03:00
NTSTATUS samr_OpenUser(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *domain_handle,
2003-11-15 13:03:12 +03:00
[in] uint32 access_mask,
[in] uint32 rid,
2004-09-21 07:51:38 +04:00
[out,ref] policy_handle *user_handle
2003-11-15 13:03:12 +03:00
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x23 */
2003-11-18 11:03:06 +03:00
NTSTATUS samr_DeleteUser(
2004-09-21 07:51:38 +04:00
[in,out,ref] policy_handle *user_handle
2003-11-18 11:03:06 +03:00
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x24 */
2003-11-15 13:03:12 +03:00
typedef struct {
2005-07-08 12:09:02 +04:00
lsa_String account_name;
lsa_String full_name;
2003-11-20 13:53:08 +03:00
uint32 primary_gid;
2005-07-08 12:09:02 +04:00
lsa_String description;
lsa_String comment;
2003-11-15 13:03:12 +03:00
} samr_UserInfo1;
2003-11-15 13:58:29 +03:00
typedef struct {
2005-07-08 12:09:02 +04:00
lsa_String comment;
lsa_String unknown; /* settable, but doesn't stick. probably obsolete */
2003-11-15 13:58:29 +03:00
uint16 country_code;
uint16 code_page;
} samr_UserInfo2;
2004-11-02 05:57:18 +03:00
/* this is also used in samr and netlogon */
typedef [public, flag(NDR_PAHEX)] struct {
uint16 units_per_week;
2005-05-27 19:49:15 +04:00
[size_is(1260), length_is(units_per_week/8)] uint8 *bits;
2004-11-02 05:57:18 +03:00
} samr_LogonHours;
2003-11-15 13:58:29 +03:00
typedef struct {
2005-07-08 12:09:02 +04:00
lsa_String account_name;
lsa_String full_name;
2004-05-09 13:39:47 +04:00
uint32 rid;
2003-11-20 13:53:08 +03:00
uint32 primary_gid;
2005-07-08 12:09:02 +04:00
lsa_String home_directory;
lsa_String home_drive;
lsa_String logon_script;
lsa_String profile_path;
lsa_String workstations;
2003-11-15 13:58:29 +03:00
NTTIME last_logon;
NTTIME last_logoff;
2004-06-05 07:22:10 +04:00
NTTIME last_password_change;
NTTIME allow_password_change;
NTTIME force_password_change;
2003-12-02 06:06:21 +03:00
samr_LogonHours logon_hours;
2004-06-05 07:22:10 +04:00
uint16 bad_password_count;
2004-11-13 16:45:41 +03:00
uint16 logon_count;
2005-01-05 19:54:51 +03:00
samr_AcctFlags acct_flags;
2003-11-15 13:58:29 +03:00
} samr_UserInfo3;
2003-11-15 14:13:49 +03:00
typedef struct {
2003-12-02 06:06:21 +03:00
samr_LogonHours logon_hours;
2003-11-15 14:13:49 +03:00
} samr_UserInfo4;
typedef struct {
2005-07-08 12:09:02 +04:00
lsa_String account_name;
lsa_String full_name;
2003-11-15 14:13:49 +03:00
uint32 rid;
2003-11-20 13:53:08 +03:00
uint32 primary_gid;
2005-07-08 12:09:02 +04:00
lsa_String home_directory;
lsa_String home_drive;
lsa_String logon_script;
lsa_String profile_path;
lsa_String description;
lsa_String workstations;
2003-11-15 14:13:49 +03:00
NTTIME last_logon;
NTTIME last_logoff;
2003-12-02 06:06:21 +03:00
samr_LogonHours logon_hours;
2004-06-05 07:22:10 +04:00
uint16 bad_password_count;
2004-11-13 16:45:41 +03:00
uint16 logon_count;
2004-06-05 07:22:10 +04:00
NTTIME last_password_change;
2003-11-15 14:13:49 +03:00
NTTIME acct_expiry;
2005-01-05 19:54:51 +03:00
samr_AcctFlags acct_flags;
2003-11-15 14:13:49 +03:00
} samr_UserInfo5;
typedef struct {
2005-07-08 12:09:02 +04:00
lsa_String account_name;
lsa_String full_name;
2003-11-15 14:13:49 +03:00
} samr_UserInfo6;
typedef struct {
2005-07-08 12:09:02 +04:00
lsa_String account_name;
2003-11-15 14:13:49 +03:00
} samr_UserInfo7;
typedef struct {
2005-07-08 12:09:02 +04:00
lsa_String full_name;
2003-11-15 14:13:49 +03:00
} samr_UserInfo8;
typedef struct {
2003-11-20 13:53:08 +03:00
uint32 primary_gid;
2003-11-15 14:13:49 +03:00
} samr_UserInfo9;
typedef struct {
2005-07-08 12:09:02 +04:00
lsa_String home_directory;
lsa_String home_drive;
2003-11-15 14:13:49 +03:00
} samr_UserInfo10;
typedef struct {
2005-07-08 12:09:02 +04:00
lsa_String logon_script;
2003-11-15 14:13:49 +03:00
} samr_UserInfo11;
typedef struct {
2005-07-08 12:09:02 +04:00
lsa_String profile_path;
2003-11-15 14:13:49 +03:00
} samr_UserInfo12;
typedef struct {
2005-07-08 12:09:02 +04:00
lsa_String description;
2003-11-15 14:13:49 +03:00
} samr_UserInfo13;
typedef struct {
2005-07-08 12:09:02 +04:00
lsa_String workstations;
2003-11-15 14:13:49 +03:00
} samr_UserInfo14;
typedef struct {
2005-01-05 19:54:51 +03:00
samr_AcctFlags acct_flags;
2003-11-15 14:13:49 +03:00
} samr_UserInfo16;
typedef struct {
NTTIME acct_expiry;
} samr_UserInfo17;
typedef struct {
2005-07-08 12:09:02 +04:00
lsa_String parameters;
2003-11-15 14:13:49 +03:00
} samr_UserInfo20;
2004-04-30 07:57:48 +04:00
/* this defines the bits used for fields_present in info21 */
2005-01-26 07:34:16 +03:00
typedef [bitmap32bit] bitmap {
2005-03-13 09:43:34 +03:00
SAMR_FIELD_ACCOUNT_NAME = 0x00000001,
SAMR_FIELD_FULL_NAME = 0x00000002,
2005-01-05 19:54:51 +03:00
SAMR_FIELD_DESCRIPTION = 0x00000010,
SAMR_FIELD_COMMENT = 0x00000020,
SAMR_FIELD_LOGON_SCRIPT = 0x00000100,
SAMR_FIELD_PROFILE_PATH = 0x00000200,
2005-03-18 07:25:10 +03:00
SAMR_FIELD_WORKSTATIONS = 0x00000400,
2005-01-05 19:54:51 +03:00
SAMR_FIELD_LOGON_HOURS = 0x00002000,
SAMR_FIELD_ACCT_FLAGS = 0x00100000,
SAMR_FIELD_PARAMETERS = 0x00200000,
SAMR_FIELD_COUNTRY_CODE = 0x00400000,
SAMR_FIELD_CODE_PAGE = 0x00800000,
SAMR_FIELD_PASSWORD = 0x01000000, /* either of these */
SAMR_FIELD_PASSWORD2 = 0x02000000 /* two bits seems to work */
} samr_FieldsPresent;
2004-04-30 07:57:48 +04:00
2003-11-15 14:34:01 +03:00
typedef struct {
NTTIME last_logon;
NTTIME last_logoff;
2004-06-05 07:22:10 +04:00
NTTIME last_password_change;
2003-11-15 14:34:01 +03:00
NTTIME acct_expiry;
2004-06-05 07:22:10 +04:00
NTTIME allow_password_change;
NTTIME force_password_change;
2005-07-08 12:09:02 +04:00
lsa_String account_name;
lsa_String full_name;
lsa_String home_directory;
lsa_String home_drive;
lsa_String logon_script;
lsa_String profile_path;
lsa_String description;
lsa_String workstations;
lsa_String comment;
lsa_String parameters;
lsa_String unknown1;
lsa_String unknown2;
lsa_String unknown3;
2003-11-15 14:34:01 +03:00
uint32 buf_count;
2005-05-27 19:49:15 +04:00
[size_is(buf_count)] uint8 *buffer;
2003-11-15 14:34:01 +03:00
uint32 rid;
2003-11-20 13:53:08 +03:00
uint32 primary_gid;
2005-01-05 19:54:51 +03:00
samr_AcctFlags acct_flags;
samr_FieldsPresent fields_present;
2003-12-02 06:06:21 +03:00
samr_LogonHours logon_hours;
2004-06-05 07:22:10 +04:00
uint16 bad_password_count;
2004-11-13 16:45:41 +03:00
uint16 logon_count;
2003-11-15 14:34:01 +03:00
uint16 country_code;
uint16 code_page;
2004-06-05 07:22:10 +04:00
uint8 nt_password_set;
uint8 lm_password_set;
2004-11-13 16:45:41 +03:00
uint8 password_expired;
2003-11-15 14:34:01 +03:00
uint8 unknown4;
} samr_UserInfo21;
2005-01-12 10:22:34 +03:00
typedef [public, flag(NDR_PAHEX)] struct {
2004-04-21 09:01:31 +04:00
uint8 data[516];
} samr_CryptPassword;
2004-04-28 17:13:26 +04:00
typedef struct {
samr_UserInfo21 info;
samr_CryptPassword password;
} samr_UserInfo23;
2004-04-21 09:01:31 +04:00
typedef struct {
samr_CryptPassword password;
uint16 pw_len;
} samr_UserInfo24;
2004-04-30 07:57:48 +04:00
typedef [flag(NDR_PAHEX)] struct {
2004-04-28 17:13:26 +04:00
uint8 data[532];
} samr_CryptPasswordEx;
typedef struct {
samr_UserInfo21 info;
samr_CryptPasswordEx password;
} samr_UserInfo25;
typedef struct {
samr_CryptPasswordEx password;
2004-05-28 17:23:30 +04:00
uint8 pw_len;
2004-04-28 17:13:26 +04:00
} samr_UserInfo26;
2005-03-06 20:02:14 +03:00
typedef [switch_type(uint16)] union {
2003-11-20 03:57:59 +03:00
[case(1)] samr_UserInfo1 info1;
[case(2)] samr_UserInfo2 info2;
[case(3)] samr_UserInfo3 info3;
[case(4)] samr_UserInfo4 info4;
[case(5)] samr_UserInfo5 info5;
[case(6)] samr_UserInfo6 info6;
[case(7)] samr_UserInfo7 info7;
[case(8)] samr_UserInfo8 info8;
[case(9)] samr_UserInfo9 info9;
[case(10)] samr_UserInfo10 info10;
[case(11)] samr_UserInfo11 info11;
[case(12)] samr_UserInfo12 info12;
[case(13)] samr_UserInfo13 info13;
[case(14)] samr_UserInfo14 info14;
[case(16)] samr_UserInfo16 info16;
[case(17)] samr_UserInfo17 info17;
[case(20)] samr_UserInfo20 info20;
[case(21)] samr_UserInfo21 info21;
2004-04-28 17:13:26 +04:00
[case(23)] samr_UserInfo23 info23;
2004-04-21 09:01:31 +04:00
[case(24)] samr_UserInfo24 info24;
2004-04-28 17:13:26 +04:00
[case(25)] samr_UserInfo25 info25;
[case(26)] samr_UserInfo26 info26;
2003-11-15 13:03:12 +03:00
} samr_UserInfo;
NTSTATUS samr_QueryUserInfo(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *user_handle,
2003-11-15 13:03:12 +03:00
[in] uint16 level,
[out,switch_is(level)] samr_UserInfo *info
);
2003-11-15 09:00:21 +03:00
2003-11-20 10:20:59 +03:00
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x25 */
2003-11-20 10:20:59 +03:00
NTSTATUS samr_SetUserInfo(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *user_handle,
2003-11-20 10:20:59 +03:00
[in] uint16 level,
[in,ref,switch_is(level)] samr_UserInfo *info
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x26 */
2005-01-10 20:28:36 +03:00
typedef [public, flag(NDR_PAHEX)] struct {
uint8 hash[16];
} samr_Password;
2004-04-18 08:06:15 +04:00
/*
2004-04-26 07:07:46 +04:00
this is a password change interface that doesn't give
the server the plaintext password. Depricated.
2004-04-18 08:06:15 +04:00
*/
NTSTATUS samr_ChangePasswordUser(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *user_handle,
2004-04-26 07:07:46 +04:00
[in] bool8 lm_present,
2004-06-04 15:58:46 +04:00
[in] samr_Password *old_lm_crypted,
[in] samr_Password *new_lm_crypted,
2004-04-26 07:07:46 +04:00
[in] bool8 nt_present,
2004-06-04 15:58:46 +04:00
[in] samr_Password *old_nt_crypted,
[in] samr_Password *new_nt_crypted,
2004-04-26 07:07:46 +04:00
[in] bool8 cross1_present,
2004-06-04 15:58:46 +04:00
[in] samr_Password *nt_cross,
2004-04-26 07:07:46 +04:00
[in] bool8 cross2_present,
2004-06-04 15:58:46 +04:00
[in] samr_Password *lm_cross
2004-04-18 08:06:15 +04:00
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x27 */
2003-12-19 06:59:27 +03:00
2005-05-01 12:05:17 +04:00
typedef [public] struct {
2003-12-19 06:59:27 +03:00
uint32 rid;
2005-06-29 17:55:09 +04:00
uint32 attributes;
} samr_RidWithAttribute;
2003-12-19 06:59:27 +03:00
2005-05-01 12:05:17 +04:00
typedef [public] struct {
2003-12-19 06:59:27 +03:00
uint32 count;
2005-06-29 17:55:09 +04:00
[size_is(count)] samr_RidWithAttribute *rids;
} samr_RidWithAttributeArray;
2003-12-19 06:59:27 +03:00
NTSTATUS samr_GetGroupsForUser(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *user_handle,
2005-06-29 17:55:09 +04:00
[out] samr_RidWithAttributeArray *rids
2003-12-19 06:59:27 +03:00
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x28 */
2003-11-20 15:10:41 +03:00
typedef struct {
uint32 idx;
uint32 rid;
2005-01-05 19:54:51 +03:00
samr_AcctFlags acct_flags;
2005-07-08 12:09:02 +04:00
lsa_String account_name;
lsa_String full_name;
lsa_String description;
2003-11-21 05:19:47 +03:00
} samr_DispEntryGeneral;
typedef struct {
uint32 count;
2005-05-27 19:49:15 +04:00
[size_is(count)] samr_DispEntryGeneral *entries;
2003-11-21 05:19:47 +03:00
} samr_DispInfoGeneral;
typedef struct {
uint32 idx;
uint32 rid;
2005-01-05 19:54:51 +03:00
samr_AcctFlags acct_flags;
2005-07-08 12:09:02 +04:00
lsa_String account_name;
lsa_String description;
2003-11-21 05:19:47 +03:00
} samr_DispEntryFull;
typedef struct {
uint32 count;
2005-05-27 19:49:15 +04:00
[size_is(count)] samr_DispEntryFull *entries;
2003-11-21 05:19:47 +03:00
} samr_DispInfoFull;
typedef struct {
uint32 idx;
2005-07-08 12:09:02 +04:00
lsa_AsciiString account_name;
2003-11-21 05:19:47 +03:00
} samr_DispEntryAscii;
2003-11-20 15:10:41 +03:00
typedef struct {
uint32 count;
2005-05-27 19:49:15 +04:00
[size_is(count)] samr_DispEntryAscii *entries;
2003-11-21 05:19:47 +03:00
} samr_DispInfoAscii;
2003-11-20 15:10:41 +03:00
2005-03-06 20:02:14 +03:00
typedef [switch_type(uint16)] union {
2003-11-21 05:19:47 +03:00
[case(1)] samr_DispInfoGeneral info1;/* users */
[case(2)] samr_DispInfoFull info2; /* trust accounts? */
[case(3)] samr_DispInfoFull info3; /* groups */
[case(4)] samr_DispInfoAscii info4; /* users */
[case(5)] samr_DispInfoAscii info5; /* groups */
2003-11-20 15:10:41 +03:00
} samr_DispInfo;
NTSTATUS samr_QueryDisplayInfo(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *domain_handle,
2003-11-20 15:10:41 +03:00
[in] uint16 level,
[in] uint32 start_idx,
[in] uint32 max_entries,
[in] uint32 buf_size,
[out] uint32 total_size,
[out] uint32 returned_size,
[out,switch_is(level)] samr_DispInfo info
);
2003-11-15 09:00:21 +03:00
2004-04-18 08:06:15 +04:00
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x29 */
2004-04-18 08:06:15 +04:00
/*
this seems to be an alphabetic search function. The returned index
is the index for samr_QueryDisplayInfo needed to get names occurring
after the specified name. The supplied name does not need to exist
in the database (for example you can supply just a first letter for
searching starting at that letter)
The level corresponds to the samr_QueryDisplayInfo level
*/
NTSTATUS samr_GetDisplayEnumerationIndex(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *domain_handle,
2004-04-18 08:06:15 +04:00
[in] uint16 level,
2005-07-08 12:09:02 +04:00
[in] lsa_String name,
2004-04-18 08:06:15 +04:00
[out] uint32 idx
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x2a */
2004-04-18 08:06:15 +04:00
/*
2004-04-22 11:28:18 +04:00
w2k3 returns NT_STATUS_NOT_IMPLEMENTED for this
2004-04-18 08:06:15 +04:00
*/
NTSTATUS samr_TestPrivateFunctionsDomain(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *domain_handle
2004-04-18 08:06:15 +04:00
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x2b */
2004-04-18 08:06:15 +04:00
/*
2004-04-22 11:28:18 +04:00
w2k3 returns NT_STATUS_NOT_IMPLEMENTED for this
2004-04-18 08:06:15 +04:00
*/
NTSTATUS samr_TestPrivateFunctionsUser(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *user_handle
2004-04-18 08:06:15 +04:00
);
2003-11-15 09:00:21 +03:00
2003-11-21 16:14:17 +03:00
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x2c */
2003-11-21 16:14:17 +03:00
2003-11-23 01:09:10 +03:00
/* password properties flags */
const uint32 DOMAIN_PASSWORD_COMPLEX = 0x00000001;
const uint32 DOMAIN_PASSWORD_NO_ANON_CHANGE = 0x00000002;
const uint32 DOMAIN_PASSWORD_NO_CLEAR_CHANGE = 0x00000004;
const uint32 DOMAIN_PASSWORD_STORE_CLEARTEXT = 0x00000010;
const uint32 DOMAIN_REFUSE_PASSWORD_CHANGE = 0x00000020;
2003-11-21 16:14:17 +03:00
typedef struct {
2004-11-17 14:56:13 +03:00
uint16 min_password_length;
2003-11-23 01:09:10 +03:00
uint32 password_properties;
2003-11-21 16:14:17 +03:00
} samr_PwInfo;
NTSTATUS samr_GetUserPwInfo(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *user_handle,
2003-11-21 16:14:17 +03:00
[out] samr_PwInfo info
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x2d */
2004-04-18 08:06:15 +04:00
NTSTATUS samr_RemoveMemberFromForeignDomain(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *domain_handle,
2004-04-18 08:06:15 +04:00
[in,ref] dom_sid2 *sid
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x2e */
2004-04-18 08:32:04 +04:00
/*
how is this different from QueryDomainInfo ??
*/
NTSTATUS samr_QueryDomainInfo2(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *domain_handle,
2004-04-18 08:32:04 +04:00
[in] uint16 level,
[out,switch_is(level)] samr_DomainInfo *info
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x2f */
2004-04-18 08:32:04 +04:00
/*
how is this different from QueryUserInfo ??
*/
NTSTATUS samr_QueryUserInfo2(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *user_handle,
2004-04-18 08:32:04 +04:00
[in] uint16 level,
[out,switch_is(level)] samr_UserInfo *info
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x30 */
2004-04-18 08:32:04 +04:00
/*
how is this different from QueryDisplayInfo??
*/
NTSTATUS samr_QueryDisplayInfo2(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *domain_handle,
2004-04-18 08:32:04 +04:00
[in] uint16 level,
[in] uint32 start_idx,
[in] uint32 max_entries,
[in] uint32 buf_size,
[out] uint32 total_size,
[out] uint32 returned_size,
[out,switch_is(level)] samr_DispInfo info
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x31 */
2004-04-18 08:32:04 +04:00
/*
how is this different from GetDisplayEnumerationIndex ??
*/
NTSTATUS samr_GetDisplayEnumerationIndex2(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *domain_handle,
2004-04-18 08:32:04 +04:00
[in] uint16 level,
2005-07-08 12:09:02 +04:00
[in] lsa_String name,
2004-04-18 08:32:04 +04:00
[out] uint32 idx
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x32 */
2003-12-03 06:10:10 +03:00
NTSTATUS samr_CreateUser2(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *domain_handle,
2005-07-08 12:09:02 +04:00
[in,ref] lsa_String *account_name,
2005-01-05 19:54:51 +03:00
[in] samr_AcctFlags acct_flags,
2003-12-03 06:10:10 +03:00
[in] uint32 access_mask,
2004-09-21 07:51:38 +04:00
[out,ref] policy_handle *user_handle,
2003-12-03 06:10:10 +03:00
[out,ref] uint32 *access_granted,
[out,ref] uint32 *rid
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x33 */
2004-04-19 09:48:03 +04:00
/*
another duplicate. There must be a reason ....
*/
NTSTATUS samr_QueryDisplayInfo3(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *domain_handle,
2004-04-19 09:48:03 +04:00
[in] uint16 level,
[in] uint32 start_idx,
[in] uint32 max_entries,
[in] uint32 buf_size,
[out] uint32 total_size,
[out] uint32 returned_size,
[out,switch_is(level)] samr_DispInfo info
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x34 */
2004-04-19 09:48:03 +04:00
NTSTATUS samr_AddMultipleMembersToAlias(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *alias_handle,
2004-04-19 09:48:03 +04:00
[in,ref] lsa_SidArray *sids
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x35 */
2004-04-19 09:48:03 +04:00
NTSTATUS samr_RemoveMultipleMembersFromAlias(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *alias_handle,
2004-04-19 09:48:03 +04:00
[in,ref] lsa_SidArray *sids
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x36 */
2004-04-19 09:48:03 +04:00
NTSTATUS samr_OemChangePasswordUser2(
2005-07-08 12:09:02 +04:00
[in] lsa_AsciiString *server,
[in,ref] lsa_AsciiString *account,
2004-04-19 09:48:03 +04:00
[in] samr_CryptPassword *password,
2004-06-04 15:58:46 +04:00
[in] samr_Password *hash
2004-04-19 09:48:03 +04:00
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x37 */
2004-04-19 09:48:03 +04:00
NTSTATUS samr_ChangePasswordUser2(
2005-07-08 12:09:02 +04:00
[in] lsa_String *server,
[in,ref] lsa_String *account,
2004-04-19 09:48:03 +04:00
[in] samr_CryptPassword *nt_password,
2004-06-04 15:58:46 +04:00
[in] samr_Password *nt_verifier,
2004-04-19 09:48:03 +04:00
[in] bool8 lm_change,
[in] samr_CryptPassword *lm_password,
2004-06-04 15:58:46 +04:00
[in] samr_Password *lm_verifier
2004-04-19 09:48:03 +04:00
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x38 */
2004-04-21 10:23:29 +04:00
NTSTATUS samr_GetDomPwInfo(
2005-07-08 12:09:02 +04:00
[in] lsa_String *domain_name,
2004-04-21 10:23:29 +04:00
[out] samr_PwInfo info
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x39 */
2003-11-24 00:51:24 +03:00
NTSTATUS samr_Connect2(
2005-10-16 22:33:56 +04:00
[in,string,charset(UTF16)] uint16 *system_name,
2003-11-24 00:51:24 +03:00
[in] uint32 access_mask,
2004-09-21 07:51:38 +04:00
[out,ref] policy_handle *connect_handle
2003-11-24 00:51:24 +03:00
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x3a */
2004-04-21 10:23:29 +04:00
/*
seems to be an exact alias for samr_SetUserInfo()
*/
NTSTATUS samr_SetUserInfo2(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *user_handle,
2004-04-21 10:23:29 +04:00
[in] uint16 level,
[in,ref,switch_is(level)] samr_UserInfo *info
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x3b */
2004-04-21 10:23:29 +04:00
/*
this one is mysterious. I have a few guesses, but nothing working yet
*/
NTSTATUS samr_SetBootKeyInformation(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *connect_handle,
2004-04-21 10:23:29 +04:00
[in] uint32 unknown1,
[in] uint32 unknown2,
[in] uint32 unknown3
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x3c */
2004-04-21 10:23:29 +04:00
NTSTATUS samr_GetBootKeyInformation(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *domain_handle,
2004-04-21 10:23:29 +04:00
[out] uint32 unknown
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x3d */
2004-04-21 10:23:29 +04:00
NTSTATUS samr_Connect3(
2005-10-16 22:33:56 +04:00
[in,string,charset(UTF16)] uint16 *system_name,
2004-04-26 07:52:44 +04:00
/* this unknown value seems to be completely ignored by w2k3 */
2004-04-21 10:23:29 +04:00
[in] uint32 unknown,
[in] uint32 access_mask,
2004-09-21 07:51:38 +04:00
[out,ref] policy_handle *connect_handle
2004-04-21 10:23:29 +04:00
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x3e */
2003-11-15 10:51:19 +03:00
NTSTATUS samr_Connect4(
2005-10-16 22:33:56 +04:00
[in,string,charset(UTF16)] uint16 *system_name,
2003-11-15 09:00:21 +03:00
[in] uint32 unknown,
[in] uint32 access_mask,
2004-09-21 07:51:38 +04:00
[out,ref] policy_handle *connect_handle
2003-11-15 09:00:21 +03:00
);
/************************/
/* Function 0x3f */
2004-05-04 17:42:32 +04:00
2005-01-12 12:57:32 +03:00
typedef [v1_enum] enum {
SAMR_REJECT_OTHER = 0,
SAMR_REJECT_TOO_SHORT = 1,
SAMR_REJECT_COMPLEXITY = 2
} samr_RejectReason;
2004-05-25 17:57:39 +04:00
2004-05-04 17:42:32 +04:00
typedef struct {
2005-01-12 12:57:32 +03:00
samr_RejectReason reason;
2004-05-04 17:42:32 +04:00
uint32 unknown1;
uint32 unknown2;
} samr_ChangeReject;
2004-04-22 10:19:48 +04:00
NTSTATUS samr_ChangePasswordUser3(
2005-07-08 12:09:02 +04:00
[in] lsa_String *server,
[in,ref] lsa_String *account,
2004-04-22 10:19:48 +04:00
[in] samr_CryptPassword *nt_password,
2004-06-04 15:58:46 +04:00
[in] samr_Password *nt_verifier,
2004-04-22 10:19:48 +04:00
[in] bool8 lm_change,
[in] samr_CryptPassword *lm_password,
2004-06-04 15:58:46 +04:00
[in] samr_Password *lm_verifier,
2004-04-22 10:19:48 +04:00
[in] samr_CryptPassword *password3,
2004-05-04 17:42:32 +04:00
[out] samr_DomInfo1 *dominfo,
[out] samr_ChangeReject *reject
2004-04-22 10:19:48 +04:00
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x40 */
2004-04-26 07:52:44 +04:00
typedef struct {
uint32 unknown1; /* w2k3 gives 3 */
uint32 unknown2; /* w2k3 gives 0 */
} samr_ConnectInfo1;
typedef union {
[case(1)] samr_ConnectInfo1 info1;
} samr_ConnectInfo;
2003-12-19 06:59:27 +03:00
NTSTATUS samr_Connect5(
2005-10-16 22:33:56 +04:00
[in,string,charset(UTF16)] uint16 *system_name,
2004-04-26 07:52:44 +04:00
[in] uint32 access_mask,
[in,out] uint32 level,
[in,out,switch_is(level),ref] samr_ConnectInfo *info,
2004-09-21 07:51:38 +04:00
[out,ref] policy_handle *connect_handle
2003-12-19 06:59:27 +03:00
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x41 */
2004-04-21 09:01:31 +04:00
NTSTATUS samr_RidToSid(
2004-09-21 07:51:38 +04:00
[in,ref] policy_handle *domain_handle,
2004-04-21 09:01:31 +04:00
[in] uint32 rid,
[out] dom_sid2 *sid
);
2003-11-15 09:00:21 +03:00
2004-04-23 08:21:22 +04:00
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x42 */
2004-04-23 09:40:18 +04:00
/*
this should set the DSRM password for the server, which is used
when booting into Directory Services Recovery Mode on a DC. Win2003
gives me NT_STATUS_NOT_SUPPORTED
*/
NTSTATUS samr_SetDsrmPassword(
2005-07-08 12:09:02 +04:00
[in] lsa_String *name,
2004-04-23 09:40:18 +04:00
[in] uint32 unknown,
2004-06-04 15:58:46 +04:00
[in] samr_Password *hash
2004-04-23 09:40:18 +04:00
);
2003-11-15 09:00:21 +03:00
/************************/
/* Function 0x43 */
2004-04-23 08:21:22 +04:00
/*
I haven't been able to work out the format of this one yet.
Seems to start with a switch level for a union?
*/
NTSTATUS samr_ValidatePassword();
2003-11-15 09:00:21 +03:00
}