diff options
Diffstat (limited to 'source3/include/smb.h')
-rw-r--r-- | source3/include/smb.h | 87 |
1 files changed, 29 insertions, 58 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h index 42b8113e59..1ef69c5fc9 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -569,59 +569,25 @@ typedef struct { /* * bit flags representing initialized fields in SAM_ACCOUNT */ -enum pdb_elements { - PDB_UNINIT, - PDB_UID, - PDB_GID, - PDB_SMBHOME, - PDB_PROFILE, - PDB_DRIVE, - PDB_LOGONSCRIPT, - PDB_LOGONTIME, - PDB_LOGOFFTIME, - PDB_KICKOFFTIME, - PDB_CANCHANGETIME, - PDB_MUSTCHANGETIME, - PDB_PLAINTEXT_PW, - PDB_USERNAME, - PDB_FULLNAME, - PDB_DOMAIN, - PDB_NTUSERNAME, - PDB_HOURSLEN, - PDB_LOGONDIVS, - PDB_USERSID, - PDB_GROUPSID, - PDB_ACCTCTRL, - PDB_PASSLASTSET, - PDB_UNIXHOMEDIR, - PDB_ACCTDESC, - PDB_WORKSTATIONS, - PDB_UNKNOWNSTR, - PDB_MUNGEDDIAL, - PDB_HOURS, - PDB_UNKNOWN3, - PDB_UNKNOWN5, - PDB_UNKNOWN6, - PDB_LMPASSWD, - PDB_NTPASSWD, - - /* this must be the last element */ - PDB_COUNT, -}; - -enum pdb_value_state { - PDB_DEFAULT=0, - PDB_SET, - PDB_CHANGED -}; +#define FLAG_SAM_UNINIT 0x00000000 +#define FLAG_SAM_UID 0x00000001 +#define FLAG_SAM_GID 0x00000002 +#define FLAG_SAM_SMBHOME 0x00000004 +#define FLAG_SAM_PROFILE 0x00000008 +#define FLAG_SAM_DRIVE 0x00000010 +#define FLAG_SAM_LOGONSCRIPT 0x00000020 +#define FLAG_SAM_LOGONTIME 0x00000040 +#define FLAG_SAM_LOGOFFTIME 0x00000080 +#define FLAG_SAM_KICKOFFTIME 0x00000100 +#define FLAG_SAM_CANCHANGETIME 0x00000200 +#define FLAG_SAM_MUSTCHANGETIME 0x00000400 +#define FLAG_SAM_PLAINTEXT_PW 0x00000800 #define IS_SAM_UNIX_USER(x) \ - (( pdb_get_init_flags(x, PDB_UID) != PDB_DEFAULT ) \ - && ( pdb_get_init_flags(x,PDB_GID) != PDB_DEFAULT )) + ((pdb_get_init_flag(x) & FLAG_SAM_UID) \ + && (pdb_get_init_flag(x) & FLAG_SAM_GID)) -#define IS_SAM_SET(x, flag) (pdb_get_init_flags(x, flag) == PDB_SET) -#define IS_SAM_CHANGED(x, flag) (pdb_get_init_flags(x, flag) == PDB_CHANGED) -#define IS_SAM_DEFAULT(x, flag) (pdb_get_init_flags(x, flag) == PDB_DEFAULT) +#define IS_SAM_SET(x, flag) ((x)->private.init_flag & (flag)) typedef struct sam_passwd { @@ -633,9 +599,8 @@ typedef struct sam_passwd struct user_data { /* initiailization flags */ - struct bitmap *change_flags; - struct bitmap *set_flags; - + uint32 init_flag; + time_t logon_time; /* logon time */ time_t logoff_time; /* logoff time */ time_t kickoff_time; /* kickoff time */ @@ -1099,14 +1064,23 @@ struct bitmap { #define DESIRED_ACCESS_PIPE 0x2019f /* Generic access masks & rights. */ +#define SPECIFIC_RIGHTS_MASK 0x00FFFFL +#define STANDARD_RIGHTS_MASK 0xFF0000L #define DELETE_ACCESS (1L<<16) /* 0x00010000 */ #define READ_CONTROL_ACCESS (1L<<17) /* 0x00020000 */ #define WRITE_DAC_ACCESS (1L<<18) /* 0x00040000 */ #define WRITE_OWNER_ACCESS (1L<<19) /* 0x00080000 */ #define SYNCHRONIZE_ACCESS (1L<<20) /* 0x00100000 */ -#define SYSTEM_SECURITY_ACCESS (1L<<24) /* 0x01000000 */ -#define MAXIMUM_ALLOWED_ACCESS (1L<<25) /* 0x02000000 */ +/* Combinations of standard masks. */ +#define STANDARD_RIGHTS_ALL_ACCESS (DELETE_ACCESS|READ_CONTROL_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS|SYNCHRONIZE_ACCESS) /* 0x001f0000 */ +#define STANDARD_RIGHTS_EXECUTE_ACCESS (READ_CONTROL_ACCESS) /* 0x00020000 */ +#define STANDARD_RIGHTS_READ_ACCESS (READ_CONTROL_ACCESS) /* 0x00200000 */ +#define STANDARD_RIGHTS_REQUIRED_ACCESS (DELETE_ACCESS|READ_CONTROL_ACCESS|WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS) /* 0x000f0000 */ +#define STANDARD_RIGHTS_WRITE_ACCESS (READ_CONTROL_ACCESS) /* 0x00020000 */ + +#define SYSTEM_SECURITY_ACCESS (1L<<24) /* 0x01000000 */ +#define MAXIMUM_ALLOWED_ACCESS (1L<<25) /* 0x02000000 */ #define GENERIC_ALL_ACCESS (1<<28) /* 0x10000000 */ #define GENERIC_EXECUTE_ACCESS (1<<29) /* 0x20000000 */ #define GENERIC_WRITE_ACCESS (1<<30) /* 0x40000000 */ @@ -1697,7 +1671,4 @@ typedef struct { extern struct poptOption popt_common_debug[]; extern struct poptOption popt_common_configfile[]; -/* Module support */ -typedef NTSTATUS (init_module_function) (void); - #endif /* _SMB_H */ |