56 {bL += strlen(key) + strlen(val) + 8;
69 copyAttrs() : bP(0), bL(0), calcSz(false) {}
78char *XrdSecsssEnt::myHostName = 0;
79int XrdSecsssEnt::myHostNLen = 0;
90 if (
conTrack) Contacts.insert(hostID);
120 if (!
eData && !Serialize())
return 0;
126 if (dataOpts &
addCreds) cpyLen += credLen;
127 }
else cpyLen =
iLen;
132 n = strlen(hostIP) + 4;
133 if (hostIP) totLen += n;
134 totLen += myHostNLen;
138 if (!(dP = (
char *)malloc(totLen)))
return 0;
151 {memcpy(bP, myHostName, myHostNLen); bP += myHostNLen;}
155 memcpy(bP,
eData, cpyLen);
166bool XrdSecsssEnt::Serialize()
171 bool incCreds =
false;
175 if (!eP)
return false;
186 + (eP->
vorg ? strlen(eP->
vorg) + 4 : 0)
187 + (eP->
role ? strlen(eP->
role) + 4 : 0)
188 + (eP->
grps ? strlen(eP->
grps) + 4 : 0)
189 + (eP->
caps ? strlen(eP->
caps) + 4 : 0)
198 if (!rBuff[0]) rBuff[0] =
'\xff';
207 theAttr.calcSz =
true;
208 eP->eaAPI->List(theAttr);
209 theAttr.calcSz =
false;
214 tLen += strlen(eP->prot) + 4;
218 if (eP->tident)
tLen += strlen(eP->tident) + 4;
225 if (*(eP->prot) && strcmp(
"sss", eP->prot))
227 tLen += strlen(uName) + 4;
230 tLen += strlen(gName) + 4;
238 {
tLen += eP->credslen + 3;
259 if (eP->endorsements)
289 eP->eaAPI->List(theAttr);
321 {
if (myHostName) free(myHostName);
322 myHostName = bP = (
char *)malloc(n+4);
static const int XrdSecsssRR_Data_HdrLen
static int Pack(struct iovec **, const char *, unsigned short &buff)
static int UserName(uid_t uID, char *uName, int uNsz)
static int GroupName(gid_t gID, char *gName, int gNsz)
@ Stop
Stop the iteration.
@ Next
Proceed to the next key-value pair.
char * vorg
Entity's virtual organization(s)
char * caps
Entity's capabilities.
char * grps
Entity's group name(s)
char * name
Entity's name.
char * role
Entity's role(s)
char * endorsements
Protocol specific endorsements.
void Delete()
Delete this entity object.
static void setHostName(const char *hnP)
static const int v2Client
Data for a v2 client wanted.
void AddContact(const std::string &hostID)
static const int addCreds
Add v2 data plus creds.
int RR_Data(char *&dP, const char *hostIP, int dataOpts)
static void genKey(char *Buff, int blen)
static const char theHost
static const char theUser
static const char theAKey
static const char theCaps
static const char theAuth
static const char theRole
static const char theName
static const char theGrps
static const char theRand
static const char theEndo
static const char theAVal
static const char theVorg
static const char theGrup
static const char theCred