Now that libc setusercontext() handling of setrtable is repaired, su(8)
authorderaadt <deraadt@openbsd.org>
Wed, 23 Mar 2022 02:18:22 +0000 (02:18 +0000)
committerderaadt <deraadt@openbsd.org>
Wed, 23 Mar 2022 02:18:22 +0000 (02:18 +0000)
can set LOGIN_SETRTABLE once again.
ok millert

usr.bin/su/su.c

index fb748b8..d4fac43 100644 (file)
@@ -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;
        }