diff options
author | des <des@FreeBSD.org> | 2008-10-20 16:48:18 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2008-10-20 16:48:18 +0000 |
commit | acbcfa5fb2a5926adcfc63feb08c0a0e895087fb (patch) | |
tree | 6661a00f525f14cfce7b3188f32e94dbbcf9300b /lib | |
parent | e4785f6af46f6a5f0dc78c7eeb246a7d300652bb (diff) | |
download | FreeBSD-src-acbcfa5fb2a5926adcfc63feb08c0a0e895087fb.zip FreeBSD-src-acbcfa5fb2a5926adcfc63feb08c0a0e895087fb.tar.gz |
include and whitespace cleanup.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libutil/login_class.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/libutil/login_class.c b/lib/libutil/login_class.c index 6e81fcf..8b1d9ab 100644 --- a/lib/libutil/login_class.c +++ b/lib/libutil/login_class.c @@ -25,14 +25,16 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <sys/types.h> #include <sys/param.h> -#include <sys/stat.h> -#include <sys/time.h> -#include <sys/resource.h> #include <sys/cpuset.h> #include <sys/mac.h> +#include <sys/resource.h> #include <sys/rtprio.h> +#include <sys/stat.h> +#include <sys/time.h> + +#include <ctype.h> +#include <err.h> #include <errno.h> #include <fcntl.h> #include <login_cap.h> @@ -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; } - |