summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-09-26 18:37:55 +0000
committerGerald Carter <jerry@samba.org>2002-09-26 18:37:55 +0000
commitd9729d81a993234db850fa733fd4591e1a5ae56e (patch)
tree84128097753fd2afdc2d212700069edaf16d831c /source3/include
parentd18b17ea31d579388ded36881619deeda6a93fa9 (diff)
downloadsamba-d9729d81a993234db850fa733fd4591e1a5ae56e.tar.gz
samba-d9729d81a993234db850fa733fd4591e1a5ae56e.tar.bz2
samba-d9729d81a993234db850fa733fd4591e1a5ae56e.zip
syncing up with HEAD again....
(This used to be commit e026b84815ad1a5fa981c24fff197fefa73b4928)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/passdb.h28
-rw-r--r--source3/include/rpc_samr.h102
2 files changed, 70 insertions, 60 deletions
diff --git a/source3/include/passdb.h b/source3/include/passdb.h
index 7a791ddac4..0c694987fe 100644
--- a/source3/include/passdb.h
+++ b/source3/include/passdb.h
@@ -49,21 +49,21 @@ typedef struct pdb_context
/* These functions are wrappers for the functions listed above.
They may do extra things like re-reading a SAM_ACCOUNT on update */
- BOOL (*pdb_setsampwent)(struct pdb_context *, BOOL update);
+ NTSTATUS (*pdb_setsampwent)(struct pdb_context *, BOOL update);
void (*pdb_endsampwent)(struct pdb_context *);
- BOOL (*pdb_getsampwent)(struct pdb_context *, SAM_ACCOUNT *user);
+ NTSTATUS (*pdb_getsampwent)(struct pdb_context *, SAM_ACCOUNT *user);
- BOOL (*pdb_getsampwnam)(struct pdb_context *, SAM_ACCOUNT *sam_acct, const char *username);
+ NTSTATUS (*pdb_getsampwnam)(struct pdb_context *, SAM_ACCOUNT *sam_acct, const char *username);
- BOOL (*pdb_getsampwsid)(struct pdb_context *, SAM_ACCOUNT *sam_acct, const DOM_SID *sid);
+ NTSTATUS (*pdb_getsampwsid)(struct pdb_context *, SAM_ACCOUNT *sam_acct, const DOM_SID *sid);
- BOOL (*pdb_add_sam_account)(struct pdb_context *, SAM_ACCOUNT *sampass);
+ NTSTATUS (*pdb_add_sam_account)(struct pdb_context *, SAM_ACCOUNT *sampass);
- BOOL (*pdb_update_sam_account)(struct pdb_context *, SAM_ACCOUNT *sampass);
+ NTSTATUS (*pdb_update_sam_account)(struct pdb_context *, SAM_ACCOUNT *sampass);
- BOOL (*pdb_delete_sam_account)(struct pdb_context *, SAM_ACCOUNT *username);
+ NTSTATUS (*pdb_delete_sam_account)(struct pdb_context *, SAM_ACCOUNT *username);
void (*free_fn)(struct pdb_context **);
@@ -80,21 +80,21 @@ typedef struct pdb_methods
struct pdb_methods *next;
struct pdb_methods *prev;
- BOOL (*setsampwent)(struct pdb_methods *, BOOL update);
+ NTSTATUS (*setsampwent)(struct pdb_methods *, BOOL update);
void (*endsampwent)(struct pdb_methods *);
- BOOL (*getsampwent)(struct pdb_methods *, SAM_ACCOUNT *user);
+ NTSTATUS (*getsampwent)(struct pdb_methods *, SAM_ACCOUNT *user);
- BOOL (*getsampwnam)(struct pdb_methods *, SAM_ACCOUNT *sam_acct, const char *username);
+ NTSTATUS (*getsampwnam)(struct pdb_methods *, SAM_ACCOUNT *sam_acct, const char *username);
- BOOL (*getsampwsid)(struct pdb_methods *, SAM_ACCOUNT *sam_acct, const DOM_SID *Sid);
+ NTSTATUS (*getsampwsid)(struct pdb_methods *, SAM_ACCOUNT *sam_acct, const DOM_SID *Sid);
- BOOL (*add_sam_account)(struct pdb_methods *, SAM_ACCOUNT *sampass);
+ NTSTATUS (*add_sam_account)(struct pdb_methods *, SAM_ACCOUNT *sampass);
- BOOL (*update_sam_account)(struct pdb_methods *, SAM_ACCOUNT *sampass);
+ NTSTATUS (*update_sam_account)(struct pdb_methods *, SAM_ACCOUNT *sampass);
- BOOL (*delete_sam_account)(struct pdb_methods *, SAM_ACCOUNT *username);
+ NTSTATUS (*delete_sam_account)(struct pdb_methods *, SAM_ACCOUNT *username);
void *private_data; /* Private data of some kind */
diff --git a/source3/include/rpc_samr.h b/source3/include/rpc_samr.h
index 11438ae067..6b537715b8 100644
--- a/source3/include/rpc_samr.h
+++ b/source3/include/rpc_samr.h
@@ -177,49 +177,49 @@ SamrTestPrivateFunctionsUser
SAMR_ACCESS_UNKNOWN_1 )
/* Access bits to Domain-objects */
-
-#define DOMAIN_ACCESS_LOOKUP_INFO_1 0x00000001
-#define DOMAIN_ACCESS_SET_INFO_1 0x00000002
-#define DOMAIN_ACCESS_LOOKUP_INFO_2 0x00000004
-#define DOMAIN_ACCESS_SET_INFO_2 0x00000008
-#define DOMAIN_ACCESS_CREATE_USER 0x00000010
-#define DOMAIN_ACCESS_CREATE_GROUP 0x00000020
-#define DOMAIN_ACCESS_CREATE_ALIAS 0x00000040
-#define DOMAIN_ACCESS_UNKNOWN_80 0x00000080
-#define DOMAIN_ACCESS_ENUM_ACCOUNTS 0x00000100
-#define DOMAIN_ACCESS_OPEN_ACCOUNT 0x00000200
-#define DOMAIN_ACCESS_SET_INFO_3 0x00000400
-
-#define DOMAIN_ALL_ACCESS ( STANDARD_RIGHTS_REQUIRED_ACCESS | \
- DOMAIN_ACCESS_SET_INFO_3 | \
- DOMAIN_ACCESS_OPEN_ACCOUNT | \
- DOMAIN_ACCESS_ENUM_ACCOUNTS | \
- DOMAIN_ACCESS_UNKNOWN_80 | \
- DOMAIN_ACCESS_CREATE_ALIAS | \
- DOMAIN_ACCESS_CREATE_GROUP | \
- DOMAIN_ACCESS_CREATE_USER | \
- DOMAIN_ACCESS_SET_INFO_2 | \
- DOMAIN_ACCESS_LOOKUP_INFO_2 | \
- DOMAIN_ACCESS_SET_INFO_1 | \
- DOMAIN_ACCESS_LOOKUP_INFO_1 )
-
-#define DOMAIN_READ ( STANDARD_RIGHTS_READ_ACCESS | \
- DOMAIN_ACCESS_UNKNOWN_80 | \
- DOMAIN_ACCESS_LOOKUP_INFO_2 )
-
-#define DOMAIN_WRITE ( STANDARD_RIGHTS_WRITE_ACCESS | \
- DOMAIN_ACCESS_SET_INFO_3 | \
- DOMAIN_ACCESS_CREATE_ALIAS | \
- DOMAIN_ACCESS_CREATE_GROUP | \
- DOMAIN_ACCESS_CREATE_USER | \
- DOMAIN_ACCESS_SET_INFO_2 | \
- DOMAIN_ACCESS_SET_INFO_1 )
-
-#define DOMAIN_EXECUTE ( STANDARD_RIGHTS_EXECUTE_ACCESS | \
- DOMAIN_ACCESS_OPEN_ACCOUNT | \
- DOMAIN_ACCESS_ENUM_ACCOUNTS | \
- DOMAIN_ACCESS_LOOKUP_INFO_1 )
-
+
+#define DOMAIN_ACCESS_LOOKUP_INFO_1 0x000000001
+#define DOMAIN_ACCESS_SET_INFO_1 0x000000002
+#define DOMAIN_ACCESS_LOOKUP_INFO_2 0x000000004
+#define DOMAIN_ACCESS_SET_INFO_2 0x000000008
+#define DOMAIN_ACCESS_CREATE_USER 0x000000010
+#define DOMAIN_ACCESS_CREATE_GROUP 0x000000020
+#define DOMAIN_ACCESS_CREATE_ALIAS 0x000000040
+#define DOMAIN_ACCESS_LOOKUP_ALIAS_BY_MEM 0x000000080
+#define DOMAIN_ACCESS_ENUM_ACCOUNTS 0x000000100
+#define DOMAIN_ACCESS_OPEN_ACCOUNT 0x000000200
+#define DOMAIN_ACCESS_SET_INFO_3 0x000000400
+
+#define DOMAIN_ALL_ACCESS ( STANDARD_RIGHTS_REQUIRED_ACCESS | \
+ DOMAIN_ACCESS_SET_INFO_3 | \
+ DOMAIN_ACCESS_OPEN_ACCOUNT | \
+ DOMAIN_ACCESS_ENUM_ACCOUNTS | \
+ DOMAIN_ACCESS_LOOKUP_ALIAS_BY_MEM | \
+ DOMAIN_ACCESS_CREATE_ALIAS | \
+ DOMAIN_ACCESS_CREATE_GROUP | \
+ DOMAIN_ACCESS_CREATE_USER | \
+ DOMAIN_ACCESS_SET_INFO_2 | \
+ DOMAIN_ACCESS_LOOKUP_INFO_2 | \
+ DOMAIN_ACCESS_SET_INFO_1 | \
+ DOMAIN_ACCESS_LOOKUP_INFO_1 )
+
+#define DOMAIN_READ ( STANDARD_RIGHTS_READ_ACCESS | \
+ DOMAIN_ACCESS_LOOKUP_ALIAS_BY_MEM | \
+ DOMAIN_ACCESS_LOOKUP_INFO_2 )
+
+#define DOMAIN_WRITE ( STANDARD_RIGHTS_WRITE_ACCESS | \
+ DOMAIN_ACCESS_SET_INFO_3 | \
+ DOMAIN_ACCESS_CREATE_ALIAS | \
+ DOMAIN_ACCESS_CREATE_GROUP | \
+ DOMAIN_ACCESS_CREATE_USER | \
+ DOMAIN_ACCESS_SET_INFO_2 | \
+ DOMAIN_ACCESS_SET_INFO_1 )
+
+#define DOMAIN_EXECUTE ( STANDARD_RIGHTS_EXECUTE_ACCESS | \
+ DOMAIN_ACCESS_OPEN_ACCOUNT | \
+ DOMAIN_ACCESS_ENUM_ACCOUNTS | \
+ DOMAIN_ACCESS_LOOKUP_INFO_1 )
+
/* Access bits to User-objects */
#define USER_ACCESS_GET_NAME_ETC 0x00000001
@@ -366,10 +366,14 @@ typedef struct sam_user_info_23
/* uint8 pad[2] */
uint32 ptr_logon_hrs; /* pointer to logon hours */
- uint8 padding1[8];
-
uint32 unknown_5; /* 0x0001 0000 */
+ uint8 padding1[6];
+
+ uint8 passmustchange; /* 0x00 must change = 0x01 */
+
+ uint8 padding2;
+
uint8 pass[516];
UNISTR2 uni_user_name; /* NULL - username unicode string */
@@ -487,7 +491,11 @@ typedef struct sam_user_info_21
uint32 unknown_5; /* 0x0002 0000 */
- uint8 padding1[8];
+ uint8 padding1[6];
+
+ uint8 passmustchange; /* 0x00 must change = 0x01 */
+
+ uint8 padding2;
UNISTR2 uni_user_name; /* username unicode string */
UNISTR2 uni_full_name; /* user's full name unicode string */
@@ -507,6 +515,8 @@ typedef struct sam_user_info_21
} SAM_USER_INFO_21;
+#define PASS_MUST_CHANGE_AT_NEXT_LOGON 0x01
+#define PASS_DONT_CHANGE_AT_NEXT_LOGON 0x00
/* SAM_USER_INFO_20 */
typedef struct sam_user_info_20