diff options
author | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2015-10-19 22:07:38 +0000 |
---|---|---|
committer | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2015-10-19 22:07:38 +0000 |
commit | 4253fd8a4d8567187accda27e999d8b2ba8d5bbe (patch) | |
tree | ed8c99f6618b8b1deb9338214dbe0f2c826b4aff /usr.sbin/radiusd/radiusd.c | |
parent | b64d10496c1217c1e32fe4a15266b5ffbfa81512 (diff) |
Add pledge(2) for radiusctl(8) and radiusd(8).
- radiusd: "stdio inet"
- radiusd_radius: "stdio inet"
- radiusd_bsdauth:
- "stdio proc" for the non-priviledged process
- "stdio getpw rpath proc exec" for the priviledged process
- radiusctl: "stdio dns inet"
"go ahead" deraadt
Diffstat (limited to 'usr.sbin/radiusd/radiusd.c')
-rw-r--r-- | usr.sbin/radiusd/radiusd.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.sbin/radiusd/radiusd.c b/usr.sbin/radiusd/radiusd.c index dd8b7785dd0..5f8e0672f98 100644 --- a/usr.sbin/radiusd/radiusd.c +++ b/usr.sbin/radiusd/radiusd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: radiusd.c,v 1.8 2015/10/19 06:56:58 yasuoka Exp $ */ +/* $OpenBSD: radiusd.c,v 1.9 2015/10/19 22:07:37 yasuoka Exp $ */ /* * Copyright (c) 2013 Internet Initiative Japan Inc. @@ -175,6 +175,14 @@ main(int argc, char *argv[]) if (radiusd_start(radiusd) != 0) errx(EX_DATAERR, "start failed"); +#ifdef RADIUSD_DEBUG + if (pledge("stdio inet proc abort", NULL) == -1) + err(EXIT_FAILURE, "pledge"); +#else + if (pledge("stdio inet", NULL) == -1) + err(EXIT_FAILURE, "pledge"); +#endif + if (event_loop(0) < 0) radiusd_stop(radiusd); |