summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--sshd.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 5b1cb2966..30e8d2c44 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,9 @@
4 - dtucker@cvs.openbsd.org 2008/06/14 15:49:48 4 - dtucker@cvs.openbsd.org 2008/06/14 15:49:48
5 [sshd.c] 5 [sshd.c]
6 wrap long line at 80 chars 6 wrap long line at 80 chars
7 - dtucker@cvs.openbsd.org 2008/06/14 17:07:11
8 [sshd.c]
9 ensure default umask disallows at least group and world write; ok djm@
7 10
820080614 1120080614
9 - (djm) [openbsd-compat/sigact.c] Avoid NULL derefs in ancient sigaction 12 - (djm) [openbsd-compat/sigact.c] Avoid NULL derefs in ancient sigaction
@@ -4376,4 +4379,4 @@
4376 OpenServer 6 and add osr5bigcrypt support so when someone migrates 4379 OpenServer 6 and add osr5bigcrypt support so when someone migrates
4377 passwords between UnixWare and OpenServer they will still work. OK dtucker@ 4380 passwords between UnixWare and OpenServer they will still work. OK dtucker@
4378 4381
4379$Id: ChangeLog,v 1.5013 2008/06/15 21:50:24 djm Exp $ 4382$Id: ChangeLog,v 1.5014 2008/06/15 21:50:58 djm Exp $
diff --git a/sshd.c b/sshd.c
index 5b89231f1..8ebbbee7b 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshd.c,v 1.361 2008/06/14 15:49:48 dtucker Exp $ */ 1/* $OpenBSD: sshd.c,v 1.362 2008/06/14 17:07:11 dtucker Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1245,6 +1245,7 @@ main(int ac, char **av)
1245 int remote_port; 1245 int remote_port;
1246 char *line, *p, *cp; 1246 char *line, *p, *cp;
1247 int config_s[2] = { -1 , -1 }; 1247 int config_s[2] = { -1 , -1 };
1248 mode_t new_umask;
1248 Key *key; 1249 Key *key;
1249 Authctxt *authctxt; 1250 Authctxt *authctxt;
1250 1251
@@ -1610,6 +1611,10 @@ main(int ac, char **av)
1610 rexec_argv[rexec_argc + 1] = NULL; 1611 rexec_argv[rexec_argc + 1] = NULL;
1611 } 1612 }
1612 1613
1614 /* Ensure that umask disallows at least group and world write */
1615 new_umask = umask(0077) | 0022;
1616 (void) umask(new_umask);
1617
1613 /* Initialize the log (it is reinitialized below in case we forked). */ 1618 /* Initialize the log (it is reinitialized below in case we forked). */
1614 if (debug_flag && (!inetd_flag || rexeced_flag)) 1619 if (debug_flag && (!inetd_flag || rexeced_flag))
1615 log_stderr = 1; 1620 log_stderr = 1;