bugGNU Screen - Bugs: bug #55512, Fix blanker to work when screen is...

 
 

bug #55512: Fix blanker to work when screen is suid root

Submitter:  Scott Shambarger <sshambar>
Submitted:  Fri 18 Jan 2019 06:53:11 PM UTC
   
 
Category:  Program Logic Severity:  3 - Normal
Priority:  * 5 - Normal Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Release:  4.6.2
Fixed Release:  None Planned Release:  None
Work Required:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 11 Feb 2019 09:01:24 PM UTC, comment #1: 

Thanks, applied to both screen-v4 and master (with some minor changes)

Amadeusz Sławiński <amade>
Group administrator
Fri 18 Jan 2019 06:53:11 PM UTC, original submission:  

I found that the blankerprg setting wasn't working when screen was suid root.  I tracked the problem down to the slave PTY for the blanker not having the permissions correctly.

I've created a patch that changes RunBlanker to use OpenDevice
(rather than OpenPTY) so that the pty permissions are setup as in ForkWindow.  I also updated the post-fork file-descriptor handling to mimic ForkWindow for ptys (fixes some leaked descriptors).

To diagnose the problem, I modified RunBlanker to create screen.blanker -DDEBUG files...(similar to screen.child files)

I also modified ReceiveMsg() to display MSG_ERROR when the screen is blocked by the blanker (so errors launching the blanker are displayed).

Patch is attached.

Scott Shambarger <sshambar>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by amade (Posted a comment)
  • -email is unavailable- added by sshambar (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-02-11 amade StatusNone Fixed
        Open/ClosedOpen Closed
    2019-01-18 sshambar Attached File- Added Fix-blanker-to-work-when-screen-is-suid-root.patch, #46015

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code