38 #include <sys/types.h>
54 #define XRDSECSSSENDO "XrdSecsssENDORSEMENT"
66 typedef std::map<std::string, XrdSecsssEnt*>
EntityMap;
89 if (isOK) *isOK =
false;
90 else std::cerr <<
"SecsssID: Already instantiated; new instance"
91 " ineffective!\n" <<std::flush;
115 else defaultID = genID(isStatic);
127 if (isOK) *isOK =
true;
135 XrdSecsssID::~XrdSecsssID() {
if (defaultID) defaultID->
Delete();}
141 int XrdSecsssID::Find(
const char *lid,
char *&dP,
142 const char *myIP,
int dataOpts)
144 EntityMap::iterator it;
153 {
if (!(fP = defaultID))
155 }
else fP = it->second;
159 n = fP->
RR_Data(dP, myIP, dataOpts);
171 static const int pgSz = 256;
172 char pBuff[pgSz], gBuff[pgSz];
177 ? (
char *)
"nobody" : pBuff;
179 ? (
char *)
"nogroup" : gBuff;
211 if (!idP) idP = genID(sType);
225 bool doRep,
bool defer)
227 EntityMap::iterator it;
232 if (isStatic)
return false;
238 it =
Registry.find(std::string(lid));
240 else {idP = it->second;
251 std::pair<EntityMap::iterator, bool> ret;
252 std::pair<std::string, XrdSecsssEnt*> psp;
254 psp = {std::string(lid), idP};
266 ret.first->second = idP;
static int UserName(uid_t uID, char *uName, int uNsz)
static int GroupName(gid_t gID, char *gName, int gNsz)
void Delete()
Delete this entity object.
int RR_Data(char *&dP, const char *hostIP, int dataOpts)
bool Register(const char *lgnid, const XrdSecEntity *Ident, bool doReplace=false, bool defer=false)
XrdSecsssID(authType aType=idStatic, const XrdSecEntity *Ident=0, XrdSecsssCon *Tracker=0, bool *isOK=0)
std::map< std::string, XrdSecsssEnt * > EntityMap