diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2015-12-01 23:29:25 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2015-12-01 23:29:25 +0000 |
commit | cbf97ee3c1be98eb39c06261ea1a5275537acfe7 (patch) | |
tree | 0c082fe108bf437515dfcc456e69b06dc440a060 /usr.bin | |
parent | d3ddfc1cee9de72bf58b5ae955bf8264bff5c826 (diff) |
basic pledge() for ssh-agent, more refinement needed
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/ssh-agent.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/ssh/ssh-agent.c b/usr.bin/ssh/ssh-agent.c index ed3ddb7e27c..14370d78202 100644 --- a/usr.bin/ssh/ssh-agent.c +++ b/usr.bin/ssh/ssh-agent.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-agent.c,v 1.204 2015/07/08 20:24:02 markus Exp $ */ +/* $OpenBSD: ssh-agent.c,v 1.205 2015/12/01 23:29:24 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1371,6 +1371,9 @@ skip: signal(SIGTERM, cleanup_handler); nalloc = 0; + if (pledge("stdio unix exec", NULL) != 0) + fatal("%s: pledge: %s", __progname, strerror(errno)); + while (1) { prepare_select(&readsetp, &writesetp, &max_fd, &nalloc, &tvp); result = select(max_fd + 1, readsetp, writesetp, NULL, tvp); |