[openssh-commits] [openssh] 03/03: upstream: fatal() if getgrnam() cannot find "tty"

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Jul 5 11:15:39 AEST 2019


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 8b4cc4bdc8a70bf209a274fa2b2a49c1e3c8d8a2
Author: deraadt at openbsd.org <deraadt at openbsd.org>
Date:   Thu Jul 4 16:20:10 2019 +0000

    upstream: fatal() if getgrnam() cannot find "tty"
    
    OpenBSD-Commit-ID: d148c1c052fa0ed7d105b5428b5c1bab91630048
---
 sshpty.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sshpty.c b/sshpty.c
index a625e474..9ad8e95c 100644
--- a/sshpty.c
+++ b/sshpty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshpty.c,v 1.33 2019/07/04 16:16:51 deraadt Exp $ */
+/* $OpenBSD: sshpty.c,v 1.34 2019/07/04 16:20:10 deraadt Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -171,6 +171,8 @@ pty_setowner(struct passwd *pw, const char *tty)
 
 	/* Determine the group to make the owner of the tty. */
 	grp = getgrnam("tty");
+	if (grp == NULL)
+		fatal("no tty group");
 	gid = (grp != NULL) ? grp->gr_gid : pw->pw_gid;
 	mode = (grp != NULL) ? 0620 : 0600;
 

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list