]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream commit
authordoug@openbsd.org <doug@openbsd.org>
Fri, 11 Dec 2015 17:41:37 +0000 (17:41 +0000)
committerDamien Miller <djm@mindrot.org>
Fri, 18 Dec 2015 03:50:49 +0000 (14:50 +1100)
Add "id" to ssh-agent pledge for subprocess support.

Found the hard way by Jan Johansson when using ssh-agent with X.  Also,
rearranged proc/exec and retval to match other pledge calls in the tree.

ok djm@

Upstream-ID: 914255f6850e5e7fa830a2de6c38605333b584db

ssh-agent.c

index 709c5b70367b4957f42dedcddd1a37b7becc5153..2048a11c41d7a6875c33afa8d9efa1be0e5274d1 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-agent.c,v 1.210 2015/12/11 02:29:03 dtucker Exp $ */
+/* $OpenBSD: ssh-agent.c,v 1.211 2015/12/11 17:41:37 doug Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1415,7 +1415,7 @@ skip:
        signal(SIGTERM, cleanup_handler);
        nalloc = 0;
 
-       if (pledge("stdio cpath unix exec proc", NULL) != 0)
+       if (pledge("stdio cpath unix id proc exec", NULL) == -1)
                fatal("%s: pledge: %s", __progname, strerror(errno));
 
        while (1) {