Lines Matching defs:lcc
1172 LocalClientCredRec *lcc;
1205 lcc = *lccp;
1210 FreeLocalClientCreds(lcc);
1213 lcc->euid = ucred_geteuid(peercred);
1214 if (lcc->euid != -1)
1215 lcc->fieldsSet |= LCC_UID_SET;
1216 lcc->egid = ucred_getegid(peercred);
1217 if (lcc->egid != -1)
1218 lcc->fieldsSet |= LCC_GID_SET;
1219 lcc->pid = ucred_getpid(peercred);
1220 if (lcc->pid != -1)
1221 lcc->fieldsSet |= LCC_PID_SET;
1223 lcc->zoneid = ucred_getzoneid(peercred);
1224 if (lcc->zoneid != -1)
1225 lcc->fieldsSet |= LCC_ZID_SET;
1227 lcc->nSuppGids = ucred_getgroups(peercred, &gids);
1228 if (lcc->nSuppGids > 0) {
1229 lcc->pSuppGids = calloc(lcc->nSuppGids, sizeof(int));
1230 if (lcc->pSuppGids == NULL) {
1231 lcc->nSuppGids = 0;
1236 for (i = 0; i < lcc->nSuppGids; i++) {
1237 (lcc->pSuppGids)[i] = (int) gids[i];
1242 lcc->nSuppGids = 0;
1248 FreeLocalClientCreds(lcc);
1251 lcc->euid = peercred.uid;
1252 lcc->egid = peercred.gid;
1253 lcc->pid = peercred.pid;
1254 lcc->fieldsSet = LCC_UID_SET | LCC_GID_SET | LCC_PID_SET;
1258 FreeLocalClientCreds(lcc);
1261 lcc->euid = uid;
1262 lcc->egid = gid;
1263 lcc->fieldsSet = LCC_UID_SET | LCC_GID_SET;
1269 lcc->pid = pid;
1270 lcc->fieldsSet |= LCC_PID_SET;
1283 FreeLocalClientCreds(LocalClientCredRec * lcc)
1285 if (lcc != NULL) {
1286 if (lcc->nSuppGids > 0) {
1287 free(lcc->pSuppGids);
1289 free(lcc);
2101 LocalClientCredRec *lcc;
2104 if (GetLocalClientCreds(client, &lcc) == -1) {
2109 if ((lcc->fieldsSet & LCC_ZID_SET) && (lcc->zoneid != getzoneid())) {
2110 FreeLocalClientCreds(lcc);
2116 FreeLocalClientCreds(lcc);
2121 if ((lcc->fieldsSet & LCC_UID_SET) && (lcc->euid == siAddrId)) {
2122 FreeLocalClientCreds(lcc);
2127 if ((lcc->fieldsSet & LCC_GID_SET) && (lcc->egid == siAddrId)) {
2128 FreeLocalClientCreds(lcc);
2131 if (lcc->pSuppGids != NULL) {
2134 for (i = 0; i < lcc->nSuppGids; i++) {
2135 if (lcc->pSuppGids[i] == siAddrId) {
2136 FreeLocalClientCreds(lcc);
2142 FreeLocalClientCreds(lcc);