mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-11-23 09:17:32 +08:00
- OpenBSD CVS Sync
- djm@cvs.openbsd.org 2011/05/15 08:09:01 [authfd.c monitor.c serverloop.c] use FD_CLOEXEC consistently; patch from zion AT x96.org
This commit is contained in:
parent
ec2eaa3daf
commit
814ace0875
@ -7,6 +7,10 @@
|
||||
fragment uses (bad main() return type).
|
||||
bz#1900 and bz#1901 reported by g.esp AT free.fr; ok dtucker@
|
||||
- (djm) [servconf.c] remove leftover droppings of AuthorizedKeysFile2
|
||||
- OpenBSD CVS Sync
|
||||
- djm@cvs.openbsd.org 2011/05/15 08:09:01
|
||||
[authfd.c monitor.c serverloop.c]
|
||||
use FD_CLOEXEC consistently; patch from zion AT x96.org
|
||||
|
||||
20110515
|
||||
- (djm) OpenBSD CVS Sync
|
||||
|
4
authfd.c
4
authfd.c
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: authfd.c,v 1.84 2010/08/31 11:54:45 djm Exp $ */
|
||||
/* $OpenBSD: authfd.c,v 1.85 2011/05/15 08:09:01 djm Exp $ */
|
||||
/*
|
||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||
@ -110,7 +110,7 @@ ssh_get_authentication_socket(void)
|
||||
return -1;
|
||||
|
||||
/* close on exec */
|
||||
if (fcntl(sock, F_SETFD, 1) == -1) {
|
||||
if (fcntl(sock, F_SETFD, FD_CLOEXEC) == -1) {
|
||||
close(sock);
|
||||
return -1;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: monitor.c,v 1.110 2010/09/09 10:45:45 djm Exp $ */
|
||||
/* $OpenBSD: monitor.c,v 1.111 2011/05/15 08:09:01 djm Exp $ */
|
||||
/*
|
||||
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
|
||||
* Copyright 2002 Markus Friedl <markus@openbsd.org>
|
||||
@ -1834,7 +1834,7 @@ mm_init_compression(struct mm_master *mm)
|
||||
/* XXX */
|
||||
|
||||
#define FD_CLOSEONEXEC(x) do { \
|
||||
if (fcntl(x, F_SETFD, 1) == -1) \
|
||||
if (fcntl(x, F_SETFD, FD_CLOEXEC) == -1) \
|
||||
fatal("fcntl(%d, F_SETFD)", x); \
|
||||
} while (0)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: serverloop.c,v 1.159 2009/05/28 16:50:16 andreas Exp $ */
|
||||
/* $OpenBSD: serverloop.c,v 1.160 2011/05/15 08:09:01 djm Exp $ */
|
||||
/*
|
||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||
@ -131,8 +131,8 @@ notify_setup(void)
|
||||
{
|
||||
if (pipe(notify_pipe) < 0) {
|
||||
error("pipe(notify_pipe) failed %s", strerror(errno));
|
||||
} else if ((fcntl(notify_pipe[0], F_SETFD, 1) == -1) ||
|
||||
(fcntl(notify_pipe[1], F_SETFD, 1) == -1)) {
|
||||
} else if ((fcntl(notify_pipe[0], F_SETFD, FD_CLOEXEC) == -1) ||
|
||||
(fcntl(notify_pipe[1], F_SETFD, FD_CLOEXEC) == -1)) {
|
||||
error("fcntl(notify_pipe, F_SETFD) failed %s", strerror(errno));
|
||||
close(notify_pipe[0]);
|
||||
close(notify_pipe[1]);
|
||||
|
Loading…
Reference in New Issue
Block a user