56 {bL += strlen(key) + strlen(val) + 8;
69 copyAttrs() : bP(0), bL(0), calcSz(false) {}
78 char *XrdSecsssEnt::myHostName = 0;
79 int XrdSecsssEnt::myHostNLen = 0;
90 if (
conTrack) Contacts.insert(hostID);
120 if (!eData && !Serialize())
return 0;
124 if (dataOpts & v2Client)
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);
166 bool XrdSecsssEnt::Serialize()
171 bool incCreds =
false;
175 if (!eP)
return false;
185 iLen = (eP->name ? strlen(eP->name) + 4 : 0)
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)
190 + (eP->endorsements ? strlen(eP->endorsements) + 4 : 0);
198 if (!rBuff[0]) rBuff[0] = 0xff;
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;
244 if (!tLen || !(eData = (
char *)malloc(tLen)))
return 0;
259 if (eP->endorsements)
289 eP->eaAPI->List(theAttr);
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.
virtual void Cleanup(const std::set< std::string > &Contacts, const XrdSecEntity &Entity)=0
void Delete()
Delete this entity object.
static void setHostName(const char *hnP)
void AddContact(const std::string &hostID)
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