summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaj Morton <tajmorton@gmail.com>2020-10-20 15:23:46 +0200
committerAlexander Naumov <alexander_naumov@opensuse.org>2020-10-20 15:23:46 +0200
commitae27fef9fb9dfe2517f1c333dec848f4df278120 (patch)
tree51754a29bafcd1a4998a8461d5ecc4970057ab8b
parent30c9a2a6c190647e35d1ce7b4758de9081f06d10 (diff)
downloadscreen-ae27fef9fb9dfe2517f1c333dec848f4df278120.tar.gz
bugfix: option -X ignores specified user in multiuser env
bug #37437 Thanks to Taj Morton
-rw-r--r--src/screen.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/screen.c b/src/screen.c
index 7dcb9af..f25f7fb 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -1191,7 +1191,14 @@ int main(int ac, char** av)
eexit(0);
}
signal(SIG_BYE, AttacherFinit); /* prevent races */
+
if (cmdflag) {
+
+#ifdef MULTIUSER
+ if (multi)
+ real_uid = multi_uid;
+#endif
+
/* attach_tty is not mandatory */
SetTtyname(false, &st);
if (!*av)