From: zrj Date: Fri, 19 Apr 2019 10:32:55 +0000 (+0300) Subject: kernel/tty: Use GID_TTY for non root users by default. X-Git-Tag: v5.7.0~272 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/fec1d8b08b4953148d7ede7423128058386b2bd0 kernel/tty: Use GID_TTY for non root users by default. Previous behaviour defaulting to GID_WHEEL was confusing OpenSSH tests. --- diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index ba51065aad..975a9c8431 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -665,7 +665,7 @@ ptcopen(struct dev_open_args *ap) pti->pt_ucntl = 0; pti->devs->si_uid = ap->a_cred->cr_uid; - pti->devs->si_gid = 0; + pti->devs->si_gid = ap->a_cred->cr_uid ? GID_TTY : 0; pti->devs->si_perms = 0600; pti->devc->si_uid = ap->a_cred->cr_uid; pti->devc->si_gid = 0;