]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: honour user's umask if it is more restrictive then the ssh
authordjm@openbsd.org <djm@openbsd.org>
Thu, 6 Oct 2022 22:42:37 +0000 (22:42 +0000)
committerDamien Miller <djm@mindrot.org>
Thu, 6 Oct 2022 22:45:02 +0000 (09:45 +1100)
default (022); based on patch from Alex Henrie, ok dtucker@ deraadt@

OpenBSD-Commit-ID: fe1b9e15fc9a4f49fc338e848ce14d8727abe82d

ssh.c

diff --git a/ssh.c b/ssh.c
index 25be53d56918ec7b22d54d250998246c11a3816f..e711dbd2793a6524042789e75721e2240d5afe69 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.576 2022/09/17 10:33:18 djm Exp $ */
+/* $OpenBSD: ssh.c,v 1.577 2022/10/06 22:42:37 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -679,7 +679,7 @@ main(int ac, char **av)
         * writable only by the owner, which is ok for all files for which we
         * don't set the modes explicitly.
         */
-       umask(022);
+       umask(022 | umask(077));
 
        msetlocale();