00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef PRIVILEGES_H
00027 #define PRIVILEGES_H
00028
00029
00030
00031 #define SE_PRIV_MASKSIZE 4
00032
00033 typedef struct {
00034 uint32 mask[SE_PRIV_MASKSIZE];
00035 } SE_PRIV;
00036
00037
00038
00039
00040 #define SE_END { { 0x00000000, 0x00000000, 0x00000000, 0x00000000 } }
00041 #define SE_NONE { { 0x00000000, 0x00000000, 0x00000000, 0x00000000 } }
00042 #define SE_ALL_PRIVS { { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF } }
00043
00044
00045
00046
00047
00048
00049
00050
00051 #define SE_NETWORK_LOGON { { 0x00000001, 0x00000000, 0x00000000, 0x00000000 } }
00052 #define SE_INTERACTIVE_LOGON { { 0x00000002, 0x00000000, 0x00000000, 0x00000000 } }
00053 #define SE_BATCH_LOGON { { 0x00000004, 0x00000000, 0x00000000, 0x00000000 } }
00054 #define SE_SERVICE_LOGON { { 0x00000008, 0x00000000, 0x00000000, 0x00000000 } }
00055 #define SE_MACHINE_ACCOUNT { { 0x00000010, 0x00000000, 0x00000000, 0x00000000 } }
00056 #define SE_PRINT_OPERATOR { { 0x00000020, 0x00000000, 0x00000000, 0x00000000 } }
00057 #define SE_ADD_USERS { { 0x00000040, 0x00000000, 0x00000000, 0x00000000 } }
00058 #define SE_DISK_OPERATOR { { 0x00000080, 0x00000000, 0x00000000, 0x00000000 } }
00059 #define SE_REMOTE_SHUTDOWN { { 0x00000100, 0x00000000, 0x00000000, 0x00000000 } }
00060 #define SE_BACKUP { { 0x00000200, 0x00000000, 0x00000000, 0x00000000 } }
00061 #define SE_RESTORE { { 0x00000400, 0x00000000, 0x00000000, 0x00000000 } }
00062 #define SE_TAKE_OWNERSHIP { { 0x00000800, 0x00000000, 0x00000000, 0x00000000 } }
00063
00064
00065
00066 extern const SE_PRIV se_priv_none;
00067 extern const SE_PRIV se_machine_account;
00068 extern const SE_PRIV se_print_operator;
00069 extern const SE_PRIV se_add_users;
00070 extern const SE_PRIV se_disk_operators;
00071 extern const SE_PRIV se_remote_shutdown;
00072 extern const SE_PRIV se_restore;
00073 extern const SE_PRIV se_take_ownership;
00074
00075
00076
00077
00078
00079 #define PR_NONE 0x0000
00080 #define PR_LOG_ON_LOCALLY 0x0001
00081 #define PR_ACCESS_FROM_NETWORK 0x0002
00082 #define PR_LOG_ON_BATCH_JOB 0x0004
00083 #define PR_LOG_ON_SERVICE 0x0010
00084
00085
00086 typedef struct {
00087 uint32 high;
00088 uint32 low;
00089 } LUID;
00090
00091 typedef struct {
00092 LUID luid;
00093 uint32 attr;
00094 } LUID_ATTR;
00095
00096 #ifndef _UPPER_BOOL
00097 typedef int BOOL;
00098 #define _UPPER_BOOL
00099 #endif
00100
00101 typedef struct {
00102 TALLOC_CTX *mem_ctx;
00103 BOOL ext_ctx;
00104 uint32 count;
00105 uint32 control;
00106 LUID_ATTR *set;
00107 } PRIVILEGE_SET;
00108
00109 typedef struct {
00110 SE_PRIV se_priv;
00111 const char *name;
00112 const char *description;
00113 LUID luid;
00114 } PRIVS;
00115
00116 #endif