From: deraadt Date: Wed, 23 Mar 2022 02:18:22 +0000 (+0000) Subject: Now that libc setusercontext() handling of setrtable is repaired, su(8) X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=336e7bcb5fd24f9a3e35d289e185cd5a49e4915e;p=openbsd Now that libc setusercontext() handling of setrtable is repaired, su(8) can set LOGIN_SETRTABLE once again. ok millert --- diff --git a/usr.bin/su/su.c b/usr.bin/su/su.c index fb748b8cd81..d4fac439274 100644 --- a/usr.bin/su/su.c +++ b/usr.bin/su/su.c @@ -1,4 +1,4 @@ -/* $OpenBSD: su.c,v 1.87 2022/03/19 10:28:38 sthen Exp $ */ +/* $OpenBSD: su.c,v 1.88 2022/03/23 02:18:22 deraadt Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. @@ -355,6 +355,8 @@ main(int argc, char **argv) flags &= ~LOGIN_SETLOGIN; } else { flags = LOGIN_SETRESOURCES|LOGIN_SETGROUP|LOGIN_SETUSER; + if (!asme) + flags |= LOGIN_SETRTABLE; if (asthem) flags |= LOGIN_SETENV|LOGIN_SETPRIORITY|LOGIN_SETUMASK; }