diff options
author | djm@openbsd.org <djm@openbsd.org> | 2022-10-06 22:42:37 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2022-10-07 09:45:02 +1100 |
commit | 5ee2b8ccfcf4b606f450eb0ff2305e311f68b0be (patch) | |
tree | 57e241880a9603520f1958a9c515eb4dace4f924 | |
parent | a75cffc2700cebd3e2dd9093f7f7388d2be95cb7 (diff) | |
download | openssh-git-5ee2b8ccfcf4b606f450eb0ff2305e311f68b0be.tar.gz |
upstream: honour user's umask if it is more restrictive then the ssh
default (022); based on patch from Alex Henrie, ok dtucker@ deraadt@
OpenBSD-Commit-ID: fe1b9e15fc9a4f49fc338e848ce14d8727abe82d
-rw-r--r-- | ssh.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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(); |