Lines Matching refs:cap

360 login_getcapstr(login_cap_t *lc, const char *cap, const char *def, const char *error)
365 if (lc == NULL || cap == NULL || lc->lc_cap == NULL || *cap == '\0')
368 if ((ret = cgetstr(lc->lc_cap, cap, &res)) == -1)
382 login_getcaplist(login_cap_t *lc, const char *cap, const char *chars)
388 if ((lstring = login_getcapstr(lc, cap, NULL, NULL)) != NULL)
396 * From the login_cap_t <lc>, get the capability <cap> which is
403 login_getpath(login_cap_t *lc, const char *cap, const char *error)
409 str = login_getcapstr(lc, cap, NULL, NULL);
528 * From the login_cap_t <lc>, get the capability <cap>, which is
529 * formatted as a time (e.g., "<cap>=10h3m2s"). If <cap> is not
535 login_getcaptime(login_cap_t *lc, const char *cap, rlim_t def, rlim_t error)
546 * Look for <cap> in lc_cap.
551 if ((r = cgetstr(lc->lc_cap, cap, &res)) == -1)
577 lc->lc_class, cap, oval);
618 * From the login_cap_t <lc>, extract the numerical value <cap>.
626 login_getcapnum(login_cap_t *lc, const char *cap, rlim_t def, rlim_t error)
638 if ((r = cgetstr(lc->lc_cap, cap, &res)) == -1) {
641 if ((r = cgetnum(lc->lc_cap, cap, &lval)) == -1)
659 lc->lc_class, cap, res);
671 * From the login_cap_t <lc>, extract the capability <cap>, which is
672 * formatted as a size (e.g., "<cap>=10M"); it can also be "infinity".
678 login_getcapsize(login_cap_t *lc, const char *cap, rlim_t def, rlim_t error)
687 if ((r = cgetstr(lc->lc_cap, cap, &res)) == -1)
707 lc->lc_class, cap, oval);
746 * of <cap>. Return <def> if <lc>->lc_cap is NULL, otherwise return
747 * the whether or not <cap> exists there.
751 login_getcapbool(login_cap_t *lc, const char *cap, int def)
755 return (cgetcap(lc->lc_cap, cap, ':') != NULL);