screen-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[screen-devel] [bug #37437] -X option ignores specified user in multiuse


From: Taj Morton
Subject: [screen-devel] [bug #37437] -X option ignores specified user in multiuser environment
Date: Sun, 18 Oct 2020 19:23:50 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36

Follow-up Comment #7, bug #37437 (project screen):

Hi Alexander,

I just confirmed that the bug is still present in `screen-v4`, and have
generated a new patch that I verified fixes the issue.


diff --git a/src/screen.c b/src/screen.c
index 7dcb9af..f4e6258 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -1185,20 +1185,25 @@ int main(int ac, char** av)
       else
         exit(9 + (fo || oth ? 1 : 0) + fo);
     }
     if (fo == 0)
       Panic(0, "No Sockets found in %s.\n", SockPath);
     Msg(0, "%d Socket%s in %s.", fo, fo > 1 ? "s" : "", SockPath);
     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)
       Panic(0, "Please specify a command.");
     SET_GUID();
     SendCmdMessage(sty, SockMatch, av, queryflag >= 0);
     exit(0);
   }
   else if (rflag || xflag) {
     debug("screen -r: - is there anybody out there?\n");


This diff was generated at revision 30c9a2a6c190647e35d1ce7b4758de9081f06d10.

Let me know if there's a more-preferred way to submit patches. :)
- Taj

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?37437>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]