xrootd
Loading...
Searching...
No Matches
XrdAccAuthorize.hh
Go to the documentation of this file.
1#ifndef __ACC_AUTHORIZE__
2#define __ACC_AUTHORIZE__
3/******************************************************************************/
4/* */
5/* X r d A c c A u t h o r i z e . h h */
6/* */
7/* (c) 2000 by the Board of Trustees of the Leland Stanford, Jr., University */
8/* All Rights Reserved */
9/* Produced by Andrew Hanushevsky for Stanford University under contract */
10/* DE-AC02-76-SFO0515 with the Department of Energy */
11/* */
12/* This file is part of the XRootD software suite. */
13/* */
14/* XRootD is free software: you can redistribute it and/or modify it under */
15/* the terms of the GNU Lesser General Public License as published by the */
16/* Free Software Foundation, either version 3 of the License, or (at your */
17/* option) any later version. */
18/* */
19/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
20/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
21/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
22/* License for more details. */
23/* */
24/* You should have received a copy of the GNU Lesser General Public License */
25/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
26/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
27/* */
28/* The copyright holder's institutional names and contributor's names may not */
29/* be used to endorse or promote products derived from this software without */
30/* specific prior written permission of the institution or contributor. */
31/******************************************************************************/
32
33#include "XrdAcc/XrdAccPrivs.hh"
34
35/******************************************************************************/
36/* A c c e s s _ O p e r a t i o n */
37/******************************************************************************/
38
40
58
59/******************************************************************************/
60/* X r d A c c A u t h o r i z e */
61/******************************************************************************/
62
63class XrdOucEnv;
64class XrdSecEntity;
65class XrdSysLogger;
66
68{
69public:
70
71//------------------------------------------------------------------------------
86//------------------------------------------------------------------------------
87
88virtual XrdAccPrivs Access(const XrdSecEntity *Entity,
89 const char *path,
90 const Access_Operation oper,
91 XrdOucEnv *Env=0) = 0;
92
93//------------------------------------------------------------------------------
109//------------------------------------------------------------------------------
110
111virtual int Audit(const int accok,
112 const XrdSecEntity *Entity,
113 const char *path,
114 const Access_Operation oper,
115 XrdOucEnv *Env=0) = 0;
116
117//------------------------------------------------------------------------------
125//------------------------------------------------------------------------------
126
127virtual int Test(const XrdAccPrivs priv,
128 const Access_Operation oper) = 0;
129
130//------------------------------------------------------------------------------
132//------------------------------------------------------------------------------
133
135
136//------------------------------------------------------------------------------
138//------------------------------------------------------------------------------
139
141};
142
143/******************************************************************************/
144/* X r d A c c A u t h o r i z e O b j e c t */
145/******************************************************************************/
146
147//------------------------------------------------------------------------------
165//------------------------------------------------------------------------------
166
167typedef XrdAccAuthorize *(*XrdAccAuthorizeObject_t)(XrdSysLogger *lp,
168 const char *cfn,
169 const char *parm);
170
171
177// Alternatively:
178
179typedef XrdAccAuthorize *(*XrdAccAuthorizeObject2_t)(XrdSysLogger *lp,
180 const char *cfn,
181 const char *parm,
182 XrdOucEnv *envP);
183
184
191//------------------------------------------------------------------------------
209//------------------------------------------------------------------------------
210
211typedef XrdAccAuthorize *(*XrdAccAuthorizeObjAdd_t)(XrdSysLogger *lp,
212 const char *cfn,
213 const char *parm,
214 XrdOucEnv *envP,
215 XrdAccAuthorize *accP);
216
217
225//------------------------------------------------------------------------------
231//------------------------------------------------------------------------------
232
242#endif
Access_Operation
The following are supported operations.
Definition XrdAccAuthorize.hh:41
@ AOP_Delete
rm() or rmdir()
Definition XrdAccAuthorize.hh:45
@ AOP_Mkdir
mkdir()
Definition XrdAccAuthorize.hh:48
@ AOP_Update
open() r/w or append
Definition XrdAccAuthorize.hh:53
@ AOP_Create
open() with create
Definition XrdAccAuthorize.hh:44
@ AOP_Readdir
opendir()
Definition XrdAccAuthorize.hh:50
@ AOP_Chmod
chmod()
Definition XrdAccAuthorize.hh:42
@ AOP_Any
Special for getting privs.
Definition XrdAccAuthorize.hh:41
@ AOP_Stat
exists(), stat()
Definition XrdAccAuthorize.hh:52
@ AOP_LastOp
Definition XrdAccAuthorize.hh:56
@ AOP_Rename
mv() for source
Definition XrdAccAuthorize.hh:51
@ AOP_Read
open() r/o, prepare()
Definition XrdAccAuthorize.hh:49
@ AOP_Excl_Create
open() with O_EXCL|O_CREAT
Definition XrdAccAuthorize.hh:54
@ AOP_Insert
mv() for target
Definition XrdAccAuthorize.hh:46
@ AOP_Lock
n/a
Definition XrdAccAuthorize.hh:47
@ AOP_Chown
chown()
Definition XrdAccAuthorize.hh:43
@ AOP_Excl_Insert
mv() where destination doesn't exist.
Definition XrdAccAuthorize.hh:55
XrdAccPrivs
Definition XrdAccPrivs.hh:39
Definition XrdAccAuthorize.hh:68
virtual int Test(const XrdAccPrivs priv, const Access_Operation oper)=0
virtual int Audit(const int accok, const XrdSecEntity *Entity, const char *path, const Access_Operation oper, XrdOucEnv *Env=0)=0
virtual ~XrdAccAuthorize()
Destructor.
Definition XrdAccAuthorize.hh:140
XrdAccAuthorize()
Constructor.
Definition XrdAccAuthorize.hh:134
virtual XrdAccPrivs Access(const XrdSecEntity *Entity, const char *path, const Access_Operation oper, XrdOucEnv *Env=0)=0
Definition XrdOucEnv.hh:42
Definition XrdSecEntity.hh:65
Definition XrdSysLogger.hh:53