r148: Ensure we do not dereference a null pointer when we return the user
[Samba/gebeck_regimport.git] / source3 / include / privileges.h
blobb7e1b44c2aff91c2debfc11159808344da288fa0
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
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.
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.
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.
23 #ifndef PRIVILEGES_H
24 #define PRIVILEGES_H
26 #define PRIV_ALL_INDEX 5
28 #define SE_PRIV_NONE 0x0000
29 #define SE_PRIV_ADD_MACHINES 0x0006
30 #define SE_PRIV_SEC_PRIV 0x0008
31 #define SE_PRIV_TAKE_OWNER 0x0009
32 #define SE_PRIV_ADD_USERS 0xff01
33 #define SE_PRIV_PRINT_OPERATOR 0xff03
34 #define SE_PRIV_ALL 0xffff
36 #define PR_NONE 0x0000
37 #define PR_LOG_ON_LOCALLY 0x0001
38 #define PR_ACCESS_FROM_NETWORK 0x0002
39 #define PR_LOG_ON_BATCH_JOB 0x0004
40 #define PR_LOG_ON_SERVICE 0x0010
42 typedef struct LUID
44 uint32 low;
45 uint32 high;
46 } LUID;
48 typedef struct LUID_ATTR
50 LUID luid;
51 uint32 attr;
52 } LUID_ATTR ;
54 typedef struct privilege_set
56 TALLOC_CTX *mem_ctx;
57 BOOL ext_ctx;
58 uint32 count;
59 uint32 control;
60 LUID_ATTR *set;
61 } PRIVILEGE_SET;
63 typedef struct _PRIVS {
64 uint32 se_priv;
65 const char *priv;
66 const char *description;
67 } PRIVS;
70 #endif /* PRIVILEGES_H */