Merge branch 'master' of ssh://git.samba.org/data/git/abartlet/samba into extended...
[abartlet/samba.git/.git] / librpc / idl / samr.idl
similarity index 97%
rename from source3/librpc/idl/samr.idl
rename to librpc/idl/samr.idl
index f47e0994dc232a5588082ce538b3ad52c47348c8..7d5d877bb1f26bbd5fa494827fc01c5f77ac0662 100644 (file)
@@ -17,6 +17,22 @@ import "misc.idl", "lsa.idl", "security.idl";
 {
        typedef bitmap security_secinfo security_secinfo;
 
+       /* SAM database types */
+       typedef [public,v1_enum] enum {
+               SAM_DATABASE_DOMAIN  = 0, /* Domain users and groups */
+               SAM_DATABASE_BUILTIN = 1, /* BUILTIN users and groups */
+               SAM_DATABASE_PRIVS   = 2 /* Privileges */
+       } netr_SamDatabaseID;
+
+       typedef [public,v1_enum] enum {
+               SAMR_REJECT_OTHER      = 0,
+               SAMR_REJECT_TOO_SHORT  = 1,
+               SAMR_REJECT_IN_HISTORY = 2,
+               SAMR_REJECT_COMPLEXITY = 5
+       } samr_RejectReason;
+
+
+
        /* account control (acct_flags) bits */
        typedef [public,bitmap32bit] bitmap {
                ACB_DISABLED                    = 0x00000001,  /* 1 = User account disabled */
@@ -321,6 +337,11 @@ import "misc.idl", "lsa.idl", "security.idl";
                DOMAIN_REFUSE_PASSWORD_CHANGE   = 0x00000020
        } samr_PasswordProperties;
 
+       typedef [v1_enum] enum {
+               DOMAIN_SERVER_ENABLED = 1,
+               DOMAIN_SERVER_DISABLED = 2
+       } samr_DomainServerState;
+
        typedef struct {
                uint16 min_password_length;
                uint16 password_history_length;
@@ -336,7 +357,7 @@ import "misc.idl", "lsa.idl", "security.idl";
                lsa_String domain_name;
                lsa_String primary; /* PDC name if this is a BDC */
                udlong sequence_num;
-               uint32 unknown2;
+               samr_DomainServerState domain_server_state;
                samr_Role role;
                uint32 unknown3;
                uint32 num_users;
@@ -370,7 +391,7 @@ import "misc.idl", "lsa.idl", "security.idl";
        } samr_DomInfo8;
 
        typedef struct {
-               uint32 unknown; /* w2k3 returns 1 */
+               samr_DomainServerState domain_server_state;
        } samr_DomInfo9;
 
        typedef struct {
@@ -389,8 +410,7 @@ import "misc.idl", "lsa.idl", "security.idl";
        typedef struct {
                hyper sequence_num;
                NTTIME domain_create_time;
-               uint32 unknown1;
-               uint32 unknown2;
+               hyper modified_count_at_last_promotion;
        } samr_DomInfo13;
 
        typedef [switch_type(uint16)] union {
@@ -417,7 +437,7 @@ import "misc.idl", "lsa.idl", "security.idl";
        /************************/
        /* Function    0x09     */
        /*
-         only levels 1, 3, 4, 6, 7, 9, 12 are valid for this 
+         only levels 1, 3, 4, 6, 7, 9, 12 are valid for this
          call in w2k3
        */
        NTSTATUS samr_SetDomainInfo(
@@ -436,14 +456,10 @@ import "misc.idl", "lsa.idl", "security.idl";
                [out,ref]     policy_handle *group_handle,
                [out,ref]     uint32 *rid
                );
-               
+
 
        /************************/
        /* Function    0x0b     */
-
-       const int MAX_SAM_ENTRIES_W2K = 0x400; /* 1024 */
-       const int MAX_SAM_ENTRIES_W95 = 50;
-
        NTSTATUS samr_EnumDomainGroups(
                [in]          policy_handle *domain_handle,
                [in,out,ref]  uint32 *resume_handle,
@@ -853,7 +869,7 @@ import "misc.idl", "lsa.idl", "security.idl";
        typedef struct {
                samr_AcctFlags acct_flags;
        } samr_UserInfo16;
-       
+
        typedef struct {
                NTTIME acct_expiry;
        } samr_UserInfo17;
@@ -863,10 +879,11 @@ import "misc.idl", "lsa.idl", "security.idl";
        } samr_Password;
 
        typedef struct {
-               samr_Password lm_pwd;
                samr_Password nt_pwd;
-               boolean8 lm_pwd_active;
+               samr_Password lm_pwd;
                boolean8 nt_pwd_active;
+               boolean8 lm_pwd_active;
+               uint8 password_expired;
        } samr_UserInfo18;
 
        typedef struct {
@@ -899,8 +916,8 @@ import "misc.idl", "lsa.idl", "security.idl";
                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_FIELD_NT_PASSWORD_PRESENT = 0x01000000, /* either of these */
+               SAMR_FIELD_LM_PASSWORD_PRESENT = 0x02000000, /* two bits seems to work */
                SAMR_FIELD_PRIVATE_DATA     = 0x04000000,
                SAMR_FIELD_EXPIRED_FLAG     = 0x08000000,
                SAMR_FIELD_SEC_DESC         = 0x10000000,
@@ -928,8 +945,8 @@ import "misc.idl", "lsa.idl", "security.idl";
                lsa_String workstations;
                lsa_String comment;
                lsa_BinaryString parameters;
-               lsa_String unknown1;
-               lsa_String unknown2;
+               lsa_BinaryString lm_owf_password;
+               lsa_BinaryString nt_owf_password;
                lsa_String unknown3;
                uint32 buf_count;
                [size_is(buf_count)] uint8 *buffer;
@@ -942,8 +959,8 @@ import "misc.idl", "lsa.idl", "security.idl";
                uint16 logon_count;
                uint16 country_code;
                uint16 code_page;
-               uint8  nt_password_set;
                uint8  lm_password_set;
+               uint8  nt_password_set;
                uint8  password_expired;
                uint8  unknown4;
        } samr_UserInfo21;
@@ -959,7 +976,7 @@ import "misc.idl", "lsa.idl", "security.idl";
 
        typedef struct {
                samr_CryptPassword password;
-               uint8 pw_len;
+               uint8 password_expired;
        } samr_UserInfo24;
 
        typedef [flag(NDR_PAHEX)] struct {
@@ -973,7 +990,7 @@ import "misc.idl", "lsa.idl", "security.idl";
 
        typedef struct {
                samr_CryptPasswordEx password;
-               uint8 pw_len;
+               uint8 password_expired;
        } samr_UserInfo26;
 
        typedef [switch_type(uint16)] union {
@@ -1135,7 +1152,7 @@ import "misc.idl", "lsa.idl", "security.idl";
          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 
+         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
@@ -1330,7 +1347,7 @@ import "misc.idl", "lsa.idl", "security.idl";
        /************************/
        /* Function    0x3a     */
        /*
-         seems to be an exact alias for samr_SetUserInfo() 
+         seems to be an exact alias for samr_SetUserInfo()
        */
        [public] NTSTATUS samr_SetUserInfo2(
                [in,ref]                   policy_handle *user_handle,
@@ -1434,10 +1451,9 @@ import "misc.idl", "lsa.idl", "security.idl";
        NTSTATUS samr_RidToSid(
                [in,ref]    policy_handle *domain_handle,
                [in]        uint32        rid,
-               [out,ref]   dom_sid2      *sid
+               [out,ref]   dom_sid2      **sid
                );
 
-
        /************************/
        /* Function    0x42     */