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

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

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

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

Fixed in git, e65352b.

Benno Schulenberg <bens>
Group administrator
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>
Group administrator
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>
Group administrator

 

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

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (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.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-06-20 bens Open/ClosedOpen Closed
    2016-05-21 bens StatusNone Fixed
    2016-05-18 bens Assigned toNone bens

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code