/* Unix SMB/CIFS implementation. SMB parameters and setup Copyright (C) Andrew Tridgell 1992-2000 Copyright (C) Luke Kenneth Casson Leighton 1996-2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef _RPC_SECDES_H /* _RPC_SECDES_H */ #define _RPC_SECDES_H /* for ADS */ #define SEC_RIGHTS_FULL_CTRL 0xf01ff /* A type to describe the mapping of generic access rights to object specific access rights. */ struct generic_mapping { uint32 generic_read; uint32 generic_write; uint32 generic_execute; uint32 generic_all; }; struct standard_mapping { uint32 std_read; uint32 std_write; uint32 std_execute; uint32 std_all; }; /* Generic access rights */ #define GENERIC_RIGHT_ALL_ACCESS 0x10000000 #define GENERIC_RIGHT_EXECUTE_ACCESS 0x20000000 #define GENERIC_RIGHT_WRITE_ACCESS 0x40000000 #define GENERIC_RIGHT_READ_ACCESS 0x80000000 /* Standard access rights. */ #define STD_RIGHT_DELETE_ACCESS 0x00010000 #define STD_RIGHT_READ_CONTROL_ACCESS 0x00020000 #define STD_RIGHT_WRITE_DAC_ACCESS 0x00040000 #define STD_RIGHT_WRITE_OWNER_ACCESS 0x00080000 #define STD_RIGHT_SYNCHRONIZE_ACCESS 0x00100000 #define STD_RIGHT_ALL_ACCESS 0x001F0000 /* File Object specific access rights */ #define SA_RIGHT_FILE_READ_DATA 0x00000001 #define SA_RIGHT_FILE_WRITE_DATA 0x00000002 #define SA_RIGHT_FILE_APPEND_DATA 0x00000004 #define SA_RIGHT_FILE_READ_EA 0x00000008 #define SA_RIGHT_FILE_WRITE_EA 0x00000010 #define SA_RIGHT_FILE_EXECUTE 0x00000020 #define SA_RIGHT_FILE_DELETE_CHILD 0x00000040 #define SA_RIGHT_FILE_READ_ATTRIBUTES 0x00000080 #define SA_RIGHT_FILE_WRITE_ATTRIBUTES 0x00000100 #define SA_RIGHT_FILE_ALL_ACCESS 0x000001FF #define GENERIC_RIGHTS_FILE_ALL_ACCESS \ (STANDARD_RIGHTS_REQUIRED_ACCESS| \ STD_RIGHT_SYNCHRONIZE_ACCESS | \ SA_RIGHT_FILE_ALL_ACCESS) #define GENERIC_RIGHTS_FILE_READ \ (STANDARD_RIGHTS_READ_ACCESS | \ STD_RIGHT_SYNCHRONIZE_ACCESS | \ SA_RIGHT_FILE_READ_DATA | \ SA_RIGHT_FILE_READ_ATTRIBUTES | \ SA_RIGHT_FILE_READ_EA) #define GENERIC_RIGHTS_FILE_WRITE \ (STANDARD_RIGHTS_WRITE_ACCESS | \ STD_RIGHT_SYNCHRONIZE_ACCESS | \ SA_RIGHT_FILE_WRITE_DATA | \ SA_RIGHT_FILE_WRITE_ATTRIBUTES | \ SA_RIGHT_FILE_WRITE_EA | \ SA_RIGHT_FILE_APPEND_DATA) #define GENERIC_RIGHTS_FILE_EXECUTE \ (STANDARD_RIGHTS_EXECUTE_ACCESS | \ STD_RIGHT_SYNCHRONIZE_ACCESS | \ SA_RIGHT_FILE_READ_ATTRIBUTES | \ SA_RIGHT_FILE_EXECUTE) #define GENERIC_RIGHTS_FILE_MODIFY \ (STANDARD_RIGHTS_MODIFY_ACCESS | \ STD_RIGHT_SYNCHRONIZE_ACCESS | \ STD_RIGHT_DELETE_ACCESS | \ SA_RIGHT_FILE_WRITE_ATTRIBUTES | \ SA_RIGHT_FILE_READ_ATTRIBUTES | \ SA_RIGHT_FILE_EXECUTE | \ SA_RIGHT_FILE_WRITE_EA | \ SA_RIGHT_FILE_READ_EA | \ SA_RIGHT_FILE_APPEND_DATA | \ SA_RIGHT_FILE_WRITE_DATA | \ SA_RIGHT_FILE_READ_DATA) #endif /* _RPC_SECDES_H */