xrootd
XrdAccAuthFile.hh
Go to the documentation of this file.
1 #ifndef __ACC_AUTHFILE__
2 #define __ACC_AUTHFILE__
3 /******************************************************************************/
4 /* */
5 /* X r d A c c A u t h F i l e . h h */
6 /* */
7 /* (c) 2003 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-AC03-76-SFO0515 with the Department of Energy */
11 /******************************************************************************/
12 
13 // $Id$
14 
15 #include <limits.h>
16 #include <netdb.h>
17 #include <sys/param.h>
18 #include "XrdSys/XrdSysError.hh"
19 #include "XrdSys/XrdSysPthread.hh"
20 #include "XrdOuc/XrdOucStream.hh"
21 #include "XrdAcc/XrdAccAuthDB.hh"
22 
23 // This class is provided for obtaining capability information from a file.
24 //
26 {
27 public:
28 
29 int Open(XrdSysError &eroute, const char *path=0);
30 
31 char getRec(char **recname);
32 
33 int getPP(char **path, char **priv);
34 
35 int Close();
36 
37 int Changed(const char *dbpath);
38 
41 
42 private:
43 
44 int Bail(int retc, const char *txt1, const char *txt2=0);
45 char *Copy(char *dp, char *sp, int dplen);
46 
47 enum DBflags {Noflags=0, inRec=1, isOpen=2, dbError=4}; // Values combined
48 
52 char *authfn;
53 char rectype;
54 time_t modtime;
56 
57 char recname_buff[MAXHOSTNAMELEN+1]; // Max record name by default
58 char path_buff[PATH_MAX+2]; // Max path name
59 };
60 #endif