upstream commit
basic pledge() for ssh-agent, more refinement needed Upstream-ID: 5b5b03c88162fce549e45e1b6dd833f20bbb5e13
This commit is contained in:
parent
f0191d7c8e
commit
d952162b3c
|
@ -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>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
|
@ -1402,6 +1402,9 @@ skip:
|
||||||
signal(SIGTERM, cleanup_handler);
|
signal(SIGTERM, cleanup_handler);
|
||||||
nalloc = 0;
|
nalloc = 0;
|
||||||
|
|
||||||
|
if (pledge("stdio unix exec", NULL) != 0)
|
||||||
|
fatal("%s: pledge: %s", __progname, strerror(errno));
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
prepare_select(&readsetp, &writesetp, &max_fd, &nalloc, &tvp);
|
prepare_select(&readsetp, &writesetp, &max_fd, &nalloc, &tvp);
|
||||||
result = select(max_fd + 1, readsetp, writesetp, NULL, tvp);
|
result = select(max_fd + 1, readsetp, writesetp, NULL, tvp);
|
||||||
|
|
Loading…
Reference in New Issue