r4847: Hand over a acb_mask to pdb_setsampwent in load_sampwd_entries().
[Samba/gebeck_regimport.git] / source3 / include / privileges.h
blob85087f624f91c24be5923ce6baa5c33695b9d056
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 Copyright (C) Simo Sorce 2003
8 Copyright (C) Gerald (Jerry) Carter 2004
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 #ifndef PRIVILEGES_H
26 #define PRIVILEGES_H
28 /* common privilege defines */
30 #define SE_END { { 0x00000000, 0x00000000, 0x00000000, 0x00000000 } }
31 #define SE_NONE { { 0x00000000, 0x00000000, 0x00000000, 0x00000000 } }
32 #define SE_ALL_PRIVS { { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF } }
35 /*
36 * We will use our own set of privileges since it makes no sense
37 * to implement all of the Windows set when only a portion will
38 * be used. Use 128-bit mask to give room to grow.
41 #define SE_NETWORK_LOGON { { 0x00000001, 0x00000000, 0x00000000, 0x00000000 } }
42 #define SE_INTERACTIVE_LOGON { { 0x00000002, 0x00000000, 0x00000000, 0x00000000 } }
43 #define SE_BATCH_LOGON { { 0x00000004, 0x00000000, 0x00000000, 0x00000000 } }
44 #define SE_SERVICE_LOGON { { 0x00000008, 0x00000000, 0x00000000, 0x00000000 } }
45 #define SE_MACHINE_ACCOUNT { { 0x00000010, 0x00000000, 0x00000000, 0x00000000 } }
46 #define SE_PRINT_OPERATOR { { 0x00000020, 0x00000000, 0x00000000, 0x00000000 } }
47 #define SE_ADD_USERS { { 0x00000040, 0x00000000, 0x00000000, 0x00000000 } }
48 #define SE_DISK_OPERATOR { { 0x00000080, 0x00000000, 0x00000000, 0x00000000 } }
49 #define SE_REMOTE_SHUTDOWN { { 0x00000100, 0x00000000, 0x00000000, 0x00000000 } }
51 #if 0 /* not needed currently */
53 #define SE_ASSIGN_PRIMARY_TOKEN
54 #define SE_CREATE_TOKEN
55 #define SE_LOCK_MEMORY
56 #define SE_INCREASE_QUOTA
57 #define SE_UNSOLICITED_INPUT
58 #define SE_TCB
59 #define SE_SECURITY
60 #define SE_TAKE_OWNERSHIP
61 #define SE_LOAD_DRIVER
62 #define SE_SYSTEM_PROFILE
63 #define SE_SYSTEM_TIME
64 #define SE_PROF_SINGLE_PROCESS
65 #define SE_INC_BASE_PRIORITY
66 #define SE_CREATE_PAGEFILE
67 #define SE_CREATE_PERMANENT
68 #define SE_BACKUP
69 #define SE_RESTORE
70 #define SE_SHUTDOWN
71 #define SE_DEBUG
72 #define SE_AUDIT
73 #define SE_SYSTEM_ENVIRONMENT
74 #define SE_CHANGE_NOTIFY
75 #define SE_REMOTE_SHUTDOWN
76 #define SE_UNDOCK
77 #define SE_SYNC_AGENT
78 #define SE_ENABLE_DELEGATION
80 #endif /* not needed currently */
83 * These are used in Lsa replies (srv_lsa_nt.c)
85 #define PR_NONE 0x0000
86 #define PR_LOG_ON_LOCALLY 0x0001
87 #define PR_ACCESS_FROM_NETWORK 0x0002
88 #define PR_LOG_ON_BATCH_JOB 0x0004
89 #define PR_LOG_ON_SERVICE 0x0010
92 #ifndef _BOOL
93 typedef int BOOL;
94 #define _BOOL /* So we don't typedef BOOL again in vfs.h */
95 #endif
97 typedef struct LUID
99 uint32 low;
100 uint32 high;
101 } LUID;
103 typedef struct LUID_ATTR
105 LUID luid;
106 uint32 attr;
107 } LUID_ATTR;
109 typedef struct privilege_set
111 TALLOC_CTX *mem_ctx;
112 BOOL ext_ctx;
113 uint32 count;
114 uint32 control;
115 LUID_ATTR *set;
116 } PRIVILEGE_SET;
118 #define SE_PRIV_MASKSIZE 4
120 typedef struct {
121 uint32 mask[SE_PRIV_MASKSIZE];
122 } SE_PRIV;
124 typedef struct _PRIVS {
125 SE_PRIV se_priv;
126 const char *name;
127 const char *description;
128 } PRIVS;
130 #endif /* PRIVILEGES_H */