MCPcopy Create free account
hub / github.com/F-Stack/f-stack / login_getcapstr

Function login_getcapstr

tools/libutil/login_cap.c:359–371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

357 */
358
359const char *
360login_getcapstr(login_cap_t *lc, const char *cap, const char *def, const char *error)
361{
362 char *res;
363 int ret;
364
365 if (lc == NULL || cap == NULL || lc->lc_cap == NULL || *cap == '\0')
366 return def;
367
368 if ((ret = cgetstr(lc->lc_cap, cap, &res)) == -1)
369 return def;
370 return (ret >= 0) ? res : error;
371}
372
373
374/*

Callers 7

auth_checknologinFunction · 0.85
setclassenvironmentFunction · 0.85
setclasscpumaskFunction · 0.85
setusercontextFunction · 0.85
login_getcaplistFunction · 0.85
login_getpathFunction · 0.85
login_setcryptfmtFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected