xrootd
Loading...
Searching...
No Matches
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-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 <limits.h>
34#include <netdb.h>
35#include <sys/param.h>
36#include "XrdSys/XrdSysError.hh"
41
42// This class is provided for obtaining capability information from a file.
43//
45{
46public:
47
48int Open(XrdSysError &eroute, const char *path=0);
49
50char getRec(char **recname);
51
52char getID(char **id);
53
54int getPP(char **path, char **priv, bool &istmplt);
55
56int Close();
57
58int Changed(const char *dbpath);
59
62
63private:
64
65int Bail(int retc, const char *txt1, const char *txt2=0);
66char *Copy(char *dp, char *sp, int dplen);
67
68enum DBflags {Noflags=0, inRec=1, isOpen=2, dbError=4}; // Values combined
69
73char *authfn;
75time_t modtime;
77
78char recname_buff[MAXHOSTNAMELEN+1]; // Max record name by default
79char path_buff[MAXPATHLEN+2]; // Max path name
80};
81#endif
Definition XrdAccAuthDB.hh:86
Definition XrdAccAuthFile.hh:45
int Bail(int retc, const char *txt1, const char *txt2=0)
char getRec(char **recname)
XrdSysError * Eroute
Definition XrdAccAuthFile.hh:70
time_t modtime
Definition XrdAccAuthFile.hh:75
char * authfn
Definition XrdAccAuthFile.hh:73
char rectype
Definition XrdAccAuthFile.hh:74
char recname_buff[MAXHOSTNAMELEN+1]
Definition XrdAccAuthFile.hh:78
char path_buff[MAXPATHLEN+2]
Definition XrdAccAuthFile.hh:79
int Open(XrdSysError &eroute, const char *path=0)
int Changed(const char *dbpath)
DBflags flags
Definition XrdAccAuthFile.hh:71
XrdAccAuthFile(XrdSysError *erp)
XrdOucStream DBfile
Definition XrdAccAuthFile.hh:72
int getPP(char **path, char **priv, bool &istmplt)
char * Copy(char *dp, char *sp, int dplen)
DBflags
Definition XrdAccAuthFile.hh:68
@ Noflags
Definition XrdAccAuthFile.hh:68
@ dbError
Definition XrdAccAuthFile.hh:68
@ inRec
Definition XrdAccAuthFile.hh:68
@ isOpen
Definition XrdAccAuthFile.hh:68
XrdSysMutex DBcontext
Definition XrdAccAuthFile.hh:76
char getID(char **id)
Definition XrdOucStream.hh:47
Definition XrdSysError.hh:90
Definition XrdSysPthread.hh:165