Lines Matching refs:lc
255 login_close(login_cap_t * lc) in login_close() argument
257 if (lc) { in login_close()
258 free(lc->lc_style); in login_close()
259 free(lc->lc_class); in login_close()
260 free(lc->lc_cap); in login_close()
261 free(lc); in login_close()
293 login_cap_t *lc; in login_getclassbyname() local
295 if ((lc = calloc(1, sizeof(login_cap_t))) != NULL) { in login_getclassbyname()
335 switch (cgetent(&lc->lc_cap, login_dbarray, name)) { in login_getclassbyname()
353 if (cgetent(&lc->lc_cap, login_dbarray, name) != 0 && r >= 0) in login_getclassbyname()
357 if ((lc->lc_class = strdup(name)) != NULL) { in login_getclassbyname()
363 return lc; in login_getclassbyname()
386 free(lc); in login_getclassbyname()
459 login_getcapstr(login_cap_t *lc, const char *cap, const char *def, const char *error) in login_getcapstr() argument
464 if (lc == NULL || cap == NULL || lc->lc_cap == NULL || *cap == '\0') in login_getcapstr()
467 if ((ret = cgetstr(lc->lc_cap, cap, &res)) == -1) in login_getcapstr()
481 login_getcaplist(login_cap_t *lc, const char *cap, const char *chars) in login_getcaplist() argument
487 if ((lstring = login_getcapstr(lc, cap, NULL, NULL)) != NULL) in login_getcaplist()
502 login_getpath(login_cap_t *lc, const char *cap, const char *error) in login_getpath() argument
508 str = login_getcapstr(lc, cap, NULL, NULL); in login_getpath()
634 login_getcaptime(login_cap_t *lc, const char *cap, rlim_t def, rlim_t error) in login_getcaptime() argument
641 if (lc == NULL || lc->lc_cap == NULL) in login_getcaptime()
650 if ((r = cgetstr(lc->lc_cap, cap, &res)) == -1) in login_getcaptime()
674 lc->lc_class, cap, oval); in login_getcaptime()
723 login_getcapnum(login_cap_t *lc, const char *cap, rlim_t def, rlim_t error) in login_getcapnum() argument
729 if (lc == NULL || lc->lc_cap == NULL) in login_getcapnum()
735 r = cgetstr(lc->lc_cap, cap, &res); in login_getcapnum()
739 if ((r = cgetnum(lc->lc_cap, cap, &lval)) == -1) in login_getcapnum()
755 lc->lc_class, cap, res); in login_getcapnum()
779 login_getcapenum(login_cap_t *lc, const char *cap, const char * const *values) in login_getcapenum() argument
785 if (lc == NULL || lc->lc_cap == NULL || cap == NULL || *cap == '\0') in login_getcapenum()
788 ret = cgetstr(lc->lc_cap, cap, &cand); in login_getcapenum()
820 login_getcapsize(login_cap_t *lc, const char *cap, rlim_t def, rlim_t error) in login_getcapsize() argument
826 if (lc == NULL || lc->lc_cap == NULL) in login_getcapsize()
829 if ((r = cgetstr(lc->lc_cap, cap, &res)) == -1) in login_getcapsize()
847 lc->lc_class, cap, oval); in login_getcapsize()
891 login_getcapbool(login_cap_t *lc, const char *cap, int def) in login_getcapbool() argument
893 if (lc == NULL || lc->lc_cap == NULL) in login_getcapbool()
895 return (cgetcap(lc->lc_cap, cap, ':') != NULL); in login_getcapbool()
920 login_getstyle(login_cap_t *lc, const char *style, const char *auth) in login_getstyle() argument
931 authtypes = login_getcaplist(lc, realauth, NULL); in login_getstyle()
935 authtypes = login_getcaplist(lc, "auth", NULL); in login_getstyle()
951 lc->lc_style = NULL; in login_getstyle()
953 lc->lc_style = auths; in login_getstyle()
955 if (lc->lc_style != NULL) in login_getstyle()
956 lc->lc_style = strdup(lc->lc_style); in login_getstyle()
958 return lc->lc_style; in login_getstyle()