[GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.
[sfrench/samba-autobuild/.git] / source3 / include / rpc_samr.h
index 910ccee113580028afdbc6dd4cdc5a2165cabf84..2273fba2e6c523fd96dd83a8b55ecf7bd4d28340 100644 (file)
@@ -4,13 +4,13 @@
    Copyright (C) Andrew Tridgell              1992-2000
    Copyright (C) Luke Kenneth Casson Leighton 1996-2000
    Copyright (C) Paul Ashton                  1997-2000
-   Copyright (C) Jean François Micouleau      1998-2001
+   Copyright (C) Jean François Micouleau      1998-2001
    Copyright (C) Jim McDonough <jmcd@us.ibm.com> 2002
    
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
@@ -19,8 +19,7 @@
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef _RPC_SAMR_H /* _RPC_SAMR_H */
@@ -121,7 +120,7 @@ SamrTestPrivateFunctionsUser
 #define SAMR_QUERY_USERGROUPS  0x27
 
 #define SAMR_QUERY_DISPINFO    0x28
-#define SAMR_UNKNOWN_29        0x29
+#define SAMR_GET_DISPENUM_INDEX 0x29
 #define SAMR_UNKNOWN_2a        0x2a
 #define SAMR_UNKNOWN_2b        0x2b
 #define SAMR_GET_USRDOM_PWINFO 0x2c
@@ -174,7 +173,7 @@ typedef struct sam_user_info_23
        UNIHDR hdr_profile_path; /* profile path unicode string header */
        UNIHDR hdr_acct_desc  ;  /* user description */
        UNIHDR hdr_workstations; /* comma-separated workstations user can log in from */
-       UNIHDR hdr_unknown_str ; /* don't know what this is, yet. */
+       UNIHDR hdr_comment;
        UNIHDR hdr_munged_dial ; /* munged path name and dial-back tel number */
 
        uint8 lm_pwd[16];    /* lm user passwords */
@@ -211,7 +210,7 @@ typedef struct sam_user_info_23
        UNISTR2 uni_profile_path; /* profile path unicode string */
        UNISTR2 uni_acct_desc  ;  /* user description unicode string */
        UNISTR2 uni_workstations; /* login from workstations unicode string */
-       UNISTR2 uni_unknown_str ; /* don't know what this is, yet. */
+       UNISTR2 uni_comment;
        UNISTR2 uni_munged_dial ; /* munged path name and dial-back tel no */
 
        LOGON_HRS logon_hrs;
@@ -222,7 +221,7 @@ typedef struct sam_user_info_23
 typedef struct sam_user_info_24
 {
        uint8 pass[516];
-       uint16 pw_len;
+       uint8 pw_len;
 } SAM_USER_INFO_24;
 
 /*
@@ -250,7 +249,7 @@ typedef struct sam_user_info_25
        UNIHDR hdr_profile_path; /* profile path unicode string header */
        UNIHDR hdr_acct_desc  ;  /* user description */
        UNIHDR hdr_workstations; /* comma-separated workstations user can log in from */
-       UNIHDR hdr_unknown_str ; /* don't know what this is, yet. */
+       UNIHDR hdr_comment;
        UNIHDR hdr_munged_dial ; /* munged path name and dial-back tel number */
 
        uint8 lm_pwd[16];    /* lm user passwords */
@@ -262,7 +261,19 @@ typedef struct sam_user_info_25
        uint32 acb_info; /* account info (ACB_xxxx bit-mask) */
        uint32 fields_present;
 
-       uint32 unknown_5[5];
+       uint16 logon_divs; /* 0x0000 00a8 which is 168 which is num hrs in a week */
+       /* uint8 pad[2] */
+       uint32 ptr_logon_hrs; /* pointer to logon hours */
+
+       /* Was unknown_5. */
+       uint16 bad_password_count;
+       uint16 logon_count;
+
+       uint8 padding1[6];
+               
+       uint8 passmustchange; /* 0x00 must change = 0x01 */
+
+       uint8 padding2;
 
        uint8 pass[532];
 
@@ -274,8 +285,9 @@ typedef struct sam_user_info_25
        UNISTR2 uni_profile_path; /* profile path unicode string */
        UNISTR2 uni_acct_desc  ;  /* user description unicode string */
        UNISTR2 uni_workstations; /* login from workstations unicode string */
-       UNISTR2 uni_unknown_str ; /* don't know what this is, yet. */
+       UNISTR2 uni_comment;
        UNISTR2 uni_munged_dial ; /* munged path name and dial-back tel no */
+       LOGON_HRS logon_hrs;
 } SAM_USER_INFO_25;
 
 /* SAM_USER_INFO_26 */
@@ -304,7 +316,7 @@ typedef struct sam_user_info_21
        UNIHDR hdr_profile_path; /* profile path unicode string header */
        UNIHDR hdr_acct_desc  ;  /* user description */
        UNIHDR hdr_workstations; /* comma-separated workstations user can log in from */
-       UNIHDR hdr_unknown_str ; /* don't know what this is, yet. */
+       UNIHDR hdr_comment;
        UNIHDR hdr_munged_dial ; /* munged path name and dial-back tel number */
 
        uint8 lm_pwd[16];    /* lm user passwords */
@@ -340,7 +352,7 @@ typedef struct sam_user_info_21
        UNISTR2 uni_profile_path; /* profile path unicode string */
        UNISTR2 uni_acct_desc  ;  /* user description unicode string */
        UNISTR2 uni_workstations; /* login from workstations unicode string */
-       UNISTR2 uni_unknown_str ; /* don't know what this is, yet. */
+       UNISTR2 uni_comment;
        UNISTR2 uni_munged_dial ; /* munged path name and dial-back tel number */
 
        LOGON_HRS logon_hrs;
@@ -553,7 +565,7 @@ typedef struct sam_unknown_info_2_inf
           pointer is referring to
         */
 
-       UINT64_S seq_num;
+       uint64 seq_num;
        
        uint32 unknown_4; /* 0x0000 0001 */
        uint32 server_role;
@@ -605,7 +617,7 @@ typedef struct sam_unknown_info_7_info
 
 typedef struct sam_unknown_info_8_info
 {
-       UINT64_S seq_num;
+       uint64 seq_num;
        NTTIME domain_create_time;
 
 } SAM_UNK_INFO_8;
@@ -626,7 +638,7 @@ typedef struct sam_unknown_info_12_inf
 
 typedef struct sam_unknown_info_13_info
 {
-       UINT64_S seq_num;
+       uint64 seq_num;
        NTTIME domain_create_time;
        uint32 unknown1;
        uint32 unknown2;
@@ -1047,6 +1059,22 @@ typedef struct r_samr_query_dispinfo_info
 
 } SAMR_R_QUERY_DISPINFO;
 
+/* SAMR_Q_GET_DISPENUM_INDEX */
+typedef struct q_samr_get_dispenum_index
+{
+       POLICY_HND domain_pol;
+       uint16 switch_level;
+       LSA_STRING name;
+
+} SAMR_Q_GET_DISPENUM_INDEX;
+
+/* SAMR_R_GET_DISPENUM_INDEX */
+typedef struct r_samr_get_dispenum_index
+{
+       uint32 idx;
+       NTSTATUS status;
+       
+} SAMR_R_GET_DISPENUM_INDEX;
 
 /* SAMR_Q_DELETE_DOM_GROUP - delete domain group */
 typedef struct q_samr_delete_dom_group_info