diff options
author | rwatson <rwatson@FreeBSD.org> | 2003-01-08 17:10:11 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2003-01-08 17:10:11 +0000 |
commit | 45a362319313bfe4e2ef698d107d34b2db70b769 (patch) | |
tree | e8d09659b44fd96649742fca0a890f2be93fad99 /usr.sbin/inetd | |
parent | 7033484c0c007cfaa421cb6421a69de8e604d27d (diff) | |
download | FreeBSD-src-45a362319313bfe4e2ef698d107d34b2db70b769.zip FreeBSD-src-45a362319313bfe4e2ef698d107d34b2db70b769.tar.gz |
For now, set only the resource limits and process priority associated
with a class, rather than all aspects of the class when switching
classes for an inetd service. Because we hard-code /daemon in the
current inetd implementation, using SETALL has unfortunate side-effects
involving the MAC code, and potentially other credential related
settings in the future. This change maintains the DoS-resistent
aspects of the class behavior, which is all that is promised in the
inetd man page.
A larger set of diffs providing more pluggability and configurability
was deferred for this more simple approach in the short term.
Reviewed by: ache
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories
Diffstat (limited to 'usr.sbin/inetd')
-rw-r--r-- | usr.sbin/inetd/inetd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c index ad847fb..d47691e 100644 --- a/usr.sbin/inetd/inetd.c +++ b/usr.sbin/inetd/inetd.c @@ -812,7 +812,8 @@ main(int argc, char **argv) } #ifdef LOGIN_CAP if (setusercontext(lc, pwd, pwd->pw_uid, - LOGIN_SETALL) != 0) { + LOGIN_SETRESOURCES | LOGIN_SETPRIORITY) + != 0) { syslog(LOG_ERR, "%s: can't setusercontext(..%s..): %m", sep->se_service, sep->se_user); |