bugGNU nano - Bugs: bug #47945, if getpwuid() or gethostname()...

 
 

bug #47945: if getpwuid() or gethostname() would fail, one cannot open any file

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Tue 17 May 2016 12:28:12 PM UTC  
 
Severity: 3 - NormalStatus: Fixed
Assigned to: Benno Schulenberg <bens>Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sat 21 May 2016 12:03:01 PM UTC, comment #2:

Fixed in git, e65352b.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Wed 18 May 2016 11:38:03 AM UTC, comment #1:

In short: only when the user decides to not override an existing lock file, should editing the relevant file be abandonned. When, for whatever reason, the actual writing or overwriting of a lock file fails, this should not prevent opening and editing the file.

(The user can edit the file anyway, by reading it into an existing empty buffer, and then later saving it under the old name. But when the system is already malfunctioning, why make things even harder?)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Tue 17 May 2016 12:28:12 PM UTC, original submission:

When file locking is enabled, and one of the calls to getpwuid() and gethostname() would fail, nano refuses to open the files specified on the command line and just opens a blank buffer. I think this is wrong.

Of course: a system is severely broken when the mentioned calls fail, but when this is so, nano shouldn't make things more difficult. Of course one could start nano with --ignorercfiles, but that disables all other customization too.

Not being able to write a lock file (for whatever reason) should not be a deal breaker. Writing such a lock file is just a service, not a necessity. Putting up a warning when it fails should be enough, just like when the target directory of the file is unwritable.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bens (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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 20 Jun 2016 10:06:31 AM UTCbensOpen/ClosedOpen=>Closed
    Sat 21 May 2016 12:03:01 PM UTCbensStatusNone=>Fixed
    Wed 18 May 2016 11:38:03 AM UTCbensAssigned toNone=>bens

    Back to the top


    Powered by Savane 3.1-cleanup1