Ok here it is my latest work on privileges
[ira/wip.git] / source3 / include / privileges.h
1 /* 
2    Unix SMB/CIFS implementation.
3    SMB parameters and setup
4    Copyright (C) Andrew Tridgell 1992-1997
5    Copyright (C) Luke Kenneth Casson Leighton 1996-1997
6    Copyright (C) Paul Ashton 1997
7    
8    This program is free software; you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation; either version 2 of the License, or
11    (at your option) any later version.
12    
13    This program is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17    
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22
23 #ifndef PRIVILEGES_H
24 #define PRIVILEGES_H
25
26 #define PRIV_ALL_INDEX          30
27
28 #define SE_NONE                         0
29 #define SE_ASSIGN_PRIMARY_TOKEN         1
30 #define SE_CREATE_TOKEN                 2
31 #define SE_LOCK_MEMORY                  3
32 #define SE_INCREASE_QUOTA               4
33 #define SE_UNSOLICITED_INPUT            5
34 #define SE_MACHINE_ACCOUNT              6
35 #define SE_TCB                          7
36 #define SE_SECURITY                     8
37 #define SE_TAKE_OWNERSHIP               9
38 #define SE_LOAD_DRIVER                  10
39 #define SE_SYSTEM_PROFILE               11
40 #define SE_SYSTEM_TIME                  12
41 #define SE_PROF_SINGLE_PROCESS          13
42 #define SE_INC_BASE_PRIORITY            14
43 #define SE_CREATE_PAGEFILE              15
44 #define SE_CREATE_PERMANENT             16
45 #define SE_BACKUP                       17
46 #define SE_RESTORE                      18
47 #define SE_SHUTDOWN                     19
48 #define SE_DEBUG                        20
49 #define SE_AUDIT                        21
50 #define SE_SYSTEM_ENVIRONMENT           22
51 #define SE_CHANGE_NOTIFY                23
52 #define SE_REMOTE_SHUTDOWN              24
53 #define SE_UNDOCK                       25
54 #define SE_SYNC_AGENT                   26
55 #define SE_ENABLE_DELEGATION            27
56 #define SE_PRINT_OPERATOR               28
57 #define SE_ADD_USERS                    29
58 #define SE_ALL_PRIVS                    0xffff
59
60 #define PR_NONE                0x0000
61 #define PR_LOG_ON_LOCALLY      0x0001
62 #define PR_ACCESS_FROM_NETWORK 0x0002
63 #define PR_LOG_ON_BATCH_JOB    0x0004
64 #define PR_LOG_ON_SERVICE      0x0010
65
66 #ifndef _BOOL
67 typedef int BOOL;
68 #define _BOOL       /* So we don't typedef BOOL again in vfs.h */
69 #endif
70
71 typedef struct LUID
72 {
73         uint32 low;
74         uint32 high;
75 } LUID;
76
77 typedef struct LUID_ATTR
78 {
79         LUID luid;
80         uint32 attr;
81 } LUID_ATTR;
82
83 typedef struct privilege_set
84 {
85         TALLOC_CTX *mem_ctx;
86         BOOL ext_ctx;
87         uint32 count;
88         uint32 control;
89         LUID_ATTR *set;
90 } PRIVILEGE_SET;
91
92 typedef struct _PRIVS {
93         uint32 se_priv;
94         const char *priv;
95         const char *description;
96 } PRIVS;
97
98
99 #endif /* PRIVILEGES_H */