screen-devel
[Top][All Lists]
Advanced

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

Re: [screen-devel] GNU Screen v.4.2.0


From: Maciej Żenczykowski
Subject: Re: [screen-devel] GNU Screen v.4.2.0
Date: Sun, 27 Apr 2014 21:58:51 -0700

Curious  I just reinstalled bash on my fedora 20 x86_64 system.

$ uname -a
Linux eonwe.lan 3.13.10-200.1mz.fc20.x86_64 #1 SMP Sat Apr 26 01:19:02
PDT 2014 x86_64 x86_64 x86_64 GNU/Linux

$ ls -al /proc/$$/exe
lrwxrwxrwx. 1 maze maze 0 Apr 27 21:48 /proc/10848/exe ->
/usr/bin/bash (deleted)

$ /proc/$$/exe --version
GNU bash, version 4.2.47(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

And as you can see I can still run the old marked deleted binary.

Maybe the problem is zsh?

address@hidden ls -al /proc/10848/exe
lrwxrwxrwx. 1 maze maze 0 Apr 27 21:48 /proc/10848/exe ->
/usr/bin/bash (deleted)
address@hidden /proc/10848/exe --version
GNU bash, version 4.2.47(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Hmm, not zsh.

I think it's related to some sort of permission dropping or
namespaceing or sandboxing screen is doing.

Since it fails for SCREEN:

$ ps auxww | egrep SCREEN
maze     11080  0.0  0.0 130348  1460 ?        Ss   21:54   0:00 SCREEN

$ ls -al /proc/11080/exe
ls: cannot read symbolic link /proc/11080/exe: Permission denied
lrwxrwxrwx. 1 root root 0 Apr 27 21:54 /proc/11080/exe

$ /proc/11080/exe -ls
-bash: /proc/11080/exe: Permission denied

$ sudo su -

# ls -al /proc/11080/exe
lrwxrwxrwx. 1 root root 0 Apr 27 21:54 /proc/11080/exe -> /usr/bin/screen

# ls -al /usr/bin/screen
-rwxr-sr-x. 1 root screen 487416 Apr  8 07:10 /usr/bin/screen

# /proc/11080/exe -ls
No Sockets found in /var/run/screen/S-root.


So probably the SGID 'screen' bit is screwing it up for non-root users.
But not sure why even root didn't work for you.

On Sun, Apr 27, 2014 at 7:03 PM, Axel Beckert <address@hidden> wrote:
> Hi,
>
> On Fri, Apr 25, 2014 at 10:08:32PM +0200, Axel Beckert wrote:
>> > Also people wanting to attach to older session can use a workaround:
>> > $ ps a | grep SCREEN
>> > $ /proc/$pid_from_above/exe -r
>> > to reattach
>>
>> Yes. I'm somehow annoyed that I didn't have that idea two years ago.
>> :-) May have been easier than patching or my first attempt with saving
>> the old /usr/bin/screen somewhere under /tmp/.
>>
>> Then again that's said to just work on Linux and maybe FreeBSD with
>> Linux compatibility mode...
>
> Tried that between 4.2.0 and 4.2.1 -- doesn't work on Linux (anymore),
> neither as user nor as root:
>
> $ /proc/17773/exe -r
> zsh: permission denied: /proc/17773/exe
> # /proc/17773/exe -ls
> zsh: permission denied: /proc/17773/exe
>
> :-(
>
> So I'll likely have to extend the according patch to also try to talk
> with a 4.1.0/4.2.0 screen.
>
>                 Kind regards, Axel
> --
> /~\  Plain Text Ribbon Campaign                   | Axel Beckert
> \ /  Say No to HTML in E-Mail and News            | address@hidden  (Mail)
>  X   See http://www.nonhtmlmail.org/campaign.html | address@hidden 
> (Mail+Jabber)
> / \  I love long mails: http://email.is-not-s.ms/ | http://noone.org/abe/ 
> (Web)
>



reply via email to

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