include/privileges.h

説明を見る。
00001 
00002 /* 
00003    Unix SMB/CIFS implementation.
00004    SMB parameters and setup
00005    Copyright (C) Andrew Tridgell 1992-1997
00006    Copyright (C) Luke Kenneth Casson Leighton 1996-1997
00007    Copyright (C) Paul Ashton 1997
00008    Copyright (C) Simo Sorce 2003
00009    Copyright (C) Gerald (Jerry) Carter 2005
00010    
00011    This program is free software; you can redistribute it and/or modify
00012    it under the terms of the GNU General Public License as published by
00013    the Free Software Foundation; either version 2 of the License, or
00014    (at your option) any later version.
00015    
00016    This program is distributed in the hope that it will be useful,
00017    but WITHOUT ANY WARRANTY; without even the implied warranty of
00018    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019    GNU General Public License for more details.
00020    
00021    You should have received a copy of the GNU General Public License
00022    along with this program; if not, write to the Free Software
00023    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00024 */
00025 
00026 #ifndef PRIVILEGES_H
00027 #define PRIVILEGES_H
00028 
00029 /* privilege bitmask */
00030 
00031 #define SE_PRIV_MASKSIZE 4
00032 
00033 typedef struct {
00034         uint32 mask[SE_PRIV_MASKSIZE];
00035 } SE_PRIV;
00036 
00037 
00038 /* common privilege defines */
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  * We will use our own set of privileges since it makes no sense
00047  * to implement all of the Windows set when only a portion will
00048  * be used.  Use 128-bit mask to give room to grow.
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 /* defined in lib/privilegs.c */
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  * These are used in Lsa replies (srv_lsa_nt.c)
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 /* PRIVILEGES_H */

Sambaに対してSat Aug 29 21:22:54 2009に生成されました。  doxygen 1.4.7