XRootD
Loading...
Searching...
No Matches
XrdOfsSecurity.hh File Reference
+ Include dependency graph for XrdOfsSecurity.hh:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define AUTHORIZE(usr, env, optype, action, pathp, edata)
 
#define AUTHORIZE2(usr, edata, opt1, act1, path1, env1, opt2, act2, path2, env2)
 
#define OOIDENTENV(usr, env)
 

Macro Definition Documentation

◆ AUTHORIZE

#define AUTHORIZE ( usr,
env,
optype,
action,
pathp,
edata )
Value:
if (usr && XrdOfsFS->Authorization \
&& !XrdOfsFS->Authorization->Access(usr, pathp, optype, env)) \
{XrdOfsFS->Emsg(epname, edata, EACCES, action, pathp); return SFS_ERROR;}
XrdOfs * XrdOfsFS
Definition XrdOfsFS.cc:47
#define SFS_ERROR
virtual XrdAccPrivs Access(const XrdSecEntity *Entity, const char *path, const Access_Operation oper, XrdOucEnv *Env=0)=0
static int Emsg(const char *, XrdOucErrInfo &, int, const char *x, XrdOfsHandle *hP)
Definition XrdOfs.cc:2513

Definition at line 35 of file XrdOfsSecurity.hh.

35#define AUTHORIZE(usr, env, optype, action, pathp, edata) \
36 if (usr && XrdOfsFS->Authorization \
37 && !XrdOfsFS->Authorization->Access(usr, pathp, optype, env)) \
38 {XrdOfsFS->Emsg(epname, edata, EACCES, action, pathp); return SFS_ERROR;}

Referenced by XrdOfs::chksum(), XrdOfs::chmod(), XrdOfs::exists(), XrdOfs::FAttr(), XrdOfs::fsctl(), XrdOfs::FSctl(), XrdOfs::mkdir(), XrdOfsDirectory::open(), XrdOfsFile::open(), XrdOfs::prepare(), XrdOfs::rename(), XrdOfs::stat(), XrdOfs::stat(), and XrdOfs::truncate().

◆ AUTHORIZE2

#define AUTHORIZE2 ( usr,
edata,
opt1,
act1,
path1,
env1,
opt2,
act2,
path2,
env2 )
Value:
{AUTHORIZE(usr, env1, opt1, act1, path1, edata); \
AUTHORIZE(usr, env2, opt2, act2, path2, edata); \
}
#define AUTHORIZE(usr, env, optype, action, pathp, edata)

Definition at line 40 of file XrdOfsSecurity.hh.

40#define AUTHORIZE2(usr,edata,opt1,act1,path1,env1,opt2,act2,path2,env2) \
41 {AUTHORIZE(usr, env1, opt1, act1, path1, edata); \
42 AUTHORIZE(usr, env2, opt2, act2, path2, edata); \
43 }

◆ OOIDENTENV

#define OOIDENTENV ( usr,
env )
Value:
if (usr) {if (usr->name) env.Put(SEC_USER, usr->name); \
if (usr->host) env.Put(SEC_HOST, usr->host);}
#define SEC_HOST
#define SEC_USER

Definition at line 45 of file XrdOfsSecurity.hh.

45#define OOIDENTENV(usr, env) \
46 if (usr) {if (usr->name) env.Put(SEC_USER, usr->name); \
47 if (usr->host) env.Put(SEC_HOST, usr->host);}

Referenced by XrdOfsFile::open().