diff --git a/lib/libutil/login_class.c b/lib/libutil/login_class.c index 6e81fcfcaaaa..8b1d9ab0e2b4 100644 --- a/lib/libutil/login_class.c +++ b/lib/libutil/login_class.c @@ -25,14 +25,16 @@ #include __FBSDID("$FreeBSD$"); -#include #include -#include -#include -#include #include #include +#include #include +#include +#include + +#include +#include #include #include #include @@ -92,7 +94,7 @@ setclassresources(login_cap_t *lc) if (getrlimit(lr->why, &rlim) != 0) syslog(LOG_ERR, "getting %s resource limit: %m", lr->what); else { - char name_cur[40]; + char name_cur[40]; char name_max[40]; rlim_t rcur = rlim.rlim_cur; rlim_t rmax = rlim.rlim_max; @@ -104,7 +106,7 @@ setclassresources(login_cap_t *lc) rmax = (*lr->who)(lc, lr->what, rmax, rmax); rlim.rlim_cur = (*lr->who)(lc, name_cur, rcur, rcur); rlim.rlim_max = (*lr->who)(lc, name_max, rmax, rmax); - + if (setrlimit(lr->why, &rlim) == -1) syslog(LOG_WARNING, "set class '%s' resource limit %s: %m", lc->lc_class, lr->what); } @@ -534,4 +536,3 @@ setusercontext(login_cap_t *lc, const struct passwd *pwd, uid_t uid, unsigned in return 0; } -