bugGNU Screen - Bugs: bug #24029, Remote detach/attach on...

 
 

bug #24029: Remote detach/attach on password-ed sessions

Submitter:  Sadrul Habib Chowdhury <sadrul>
Submitted:  Sun 10 Aug 2008 03:02:35 AM UTC
   
 
Category:  Program Logic Severity:  3 - Normal
Priority:  * 5 - Normal Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Release:  None
Fixed Release:  4.1.0 Planned Release:  4.1.0
Work Required:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 12 Aug 2008 03:18:46 AM UTC, comment #3: 

Committed, with the suggested changes, in e3fc19a176c1ed2c266aca03cb5bcc17d0192630.

Sadrul Habib Chowdhury <sadrul>
Group administrator
Mon 11 Aug 2008 03:47:10 PM UTC, comment #2: 

Yeah, I like the idea of the single message too. I am not sure whether changing the messaging system will break something else inadvertently, though ... I guess we will find out soon enough! :)

Sadrul Habib Chowdhury <sadrul>
Group administrator
Sun 10 Aug 2008 09:00:27 PM UTC, comment #1: 

Of the various options, I like the single attach/detach message the best.

I agree wrt pid-checking: it's subject to a race condition, which is really a bad way to do security.

Micah Cowan <micahcowan>
Sun 10 Aug 2008 03:02:35 AM UTC, original submission:  

If a session has a password set, then it is necessary to give the password when remote-attaching to the session (with -x or -r). However, currently it doesn't prompt for a password for remote detaching (with -d).

The attached patch fixes that issue.

However, with this patch, if you want to remote detach and attach at the same time (e.g. using -dR), then it prompts for the password twice: once when detaching, once when attaching. To overcome this problem, there are several possible solutions:

  • Change the messaging system (screen.h:struct msg) a little bit:

    * by adding a field in 'msg::attach' to note that a detach-message was sent before hand, or
    * by adding a field in 'msg::attach' indicating that 'detach' should be performed before attaching. With this, instead of sending two separate messages ('detach' and 'attach') for '-dR', only one message ('detach, then attach') will be sent.

  • Remember the last pid and time of a successful password entry. Look at that pid and time and don't prompt for any password if the pid's match, and the time is not more than 2/3 seconds. This would be easiest (and smallest) fix. But I am not sure how ... 'palatable' it is (for want of a better term).


  • <Insert a better suggestion> :)
Sadrul Habib Chowdhury <sadrul>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #16266:  remote_detach_password.patch added by sadrul (10KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by micahcowan (Posted a comment)
  • -email is unavailable- added by sadrul (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-08-12 sadrul StatusNone Fixed
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.1.0
    2008-08-10 sadrul Attached File- Added remote_detach_password.patch, #16266

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code