access.h
Go to the documentation of this file.
1 /* Copyright (C) 2000-2004 Thomas Bopp, Thorsten Hampel, Ludger Merkens
2  *
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2 of the License, or
6  * (at your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * $Id: access.h,v 1.1 2008/03/31 13:39:57 exodusd Exp $
18  */
19 
20 #ifndef _ACCESS_H
21 #define _ACCESS_H
22 
23 #define ACCESS_READ(o1,o2) (_Security->AccessReadObj(o1, o2))
24 #define ACCESS_WRITE(o1, o2) (_Security->AccessWriteObj(o1, o2))
25 
26 #define FAIL -1
27 #define ACCESS_DENIED 0
28 #define ACCESS_GRANTED 1
29 #define ACCESS_BLOCKED 2
30 
31 #define SANCTION_READ 1
32 #define SANCTION_EXECUTE 2
33 #define SANCTION_MOVE 4
34 #define SANCTION_WRITE 8
35 #define SANCTION_INSERT 16
36 #define SANCTION_ANNOTATE 32
37 
38 #define SANCTION_SANCTION (1<<8)
39 #define SANCTION_LOCAL (1<<9)
40 #define SANCTION_ALL (1<<15)-1
41 #define SANCTION_SHIFT_DENY 16
42 #define SANCTION_COMPLETE (0xffffffff)
43 #define SANCTION_POSITIVE (0xffff0000)
44 #define SANCTION_NEGATIVE (0x0000ffff)
45 
46 #define SANCTION_READ_ROLE (SANCTION_READ|SANCTION_EXECUTE|SANCTION_ANNOTATE)
47 
48 #endif