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

 
 

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

Submitted by:  Sadrul Habib Chowdhury <sadrul>
Submitted on:  Sun 10 Aug 2008 03:02:35 AM UTC  
 
Category: Program LogicSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: ClosedRelease: None
Fixed Release: 4.1.0Planned Release: 4.1.0
Work Required: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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

Committed, with the suggested changes, in e3fc19a176c1ed2c266aca03cb5bcc17d0192630.

Sadrul Habib Chowdhury <sadrul>
Project 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>
Project 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>
Project Administrator

 

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

Attach File(s):
   
   
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
  • -unavailable- added by micahcowan (Posted a comment)
  • -unavailable- added by sadrul (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 12 Aug 2008 03:18:46 AM UTCsadrulStatusNone=>Fixed
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.1.0
    Sun 10 Aug 2008 03:02:35 AM UTCsadrulAttached File-=>Added remote_detach_password.patch, #16266

    Back to the top


    Powered by Savane 3.1-cleanup1