summaryrefslogtreecommitdiff
path: root/sshpty.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2015-07-30 23:09:15 +0000
committerColin Watson <cjwatson@debian.org>2015-08-19 18:05:58 +0100
commit12577aa167c76d517bfe78f603fe805f190d8d05 (patch)
tree52cfd564c52377ca5726a847c4ea0d1663a35c75 /sshpty.c
parent810eecd6b2e03770f21e46b5cb8ce8c7fcd46da8 (diff)
Fix pty permissions
Origin: upstream, https://anongit.mindrot.org/openssh.git/commit/?id=6f941396b6835ad18018845f515b0c4fe20be21a Forwarded: not-needed Last-Update: 2015-08-19 Patch-Name: backport-fix-pty-permissions.patch
Diffstat (limited to 'sshpty.c')
-rw-r--r--sshpty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sshpty.c b/sshpty.c
index 0e32b392b..e89efb74a 100644
--- a/sshpty.c
+++ b/sshpty.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshpty.c,v 1.29 2014/09/03 18:55:07 djm Exp $ */ 1/* $OpenBSD: sshpty.c,v 1.30 2015/07/30 23:09:15 djm 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
@@ -197,7 +197,7 @@ pty_setowner(struct passwd *pw, const char *tty, const char *role)
197 /* Determine the group to make the owner of the tty. */ 197 /* Determine the group to make the owner of the tty. */
198 grp = getgrnam("tty"); 198 grp = getgrnam("tty");
199 gid = (grp != NULL) ? grp->gr_gid : pw->pw_gid; 199 gid = (grp != NULL) ? grp->gr_gid : pw->pw_gid;
200 mode = (grp != NULL) ? 0622 : 0600; 200 mode = (grp != NULL) ? 0620 : 0600;
201 201
202 /* 202 /*
203 * Change owner and mode of the tty as required. 203 * Change owner and mode of the tty as required.