bugGNU nano - Bugs: bug #45343, get_homedir() never returns NULL;...

 
 

bug #45343: get_homedir() never returns NULL; nano never says "Wah!"

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Wed 17 Jun 2015 06:12:07 PM UTC  
 
Severity: 2 - MinorStatus: 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 20 Jun 2015 09:07:58 AM UTC, comment #2:

The patch went into SVN, r5259.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Thu 18 Jun 2015 05:56:27 PM UTC, comment #1:

Attached patch fixes problem.

(file #34257)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Wed 17 Jun 2015 06:12:07 PM UTC, original submission:

When one unsets the HOME environment variable, and makes the home directory field in /etc/passwd for the current user empty, then get_homedir() will not return NULL but the empty string. This means that nano will never say that it can't find its home directory, but will silently try to open /.nanorc -- which will, of course, most likely not exist.

Suggested change: when homedir is the empty string, get_homedir() should return NULL instead.

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:
   

Attached Files

 

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
    Sat 20 Jun 2015 12:53:52 PM UTCbensOpen/ClosedOpen=>Closed
    Sat 20 Jun 2015 09:07:58 AM UTCbensStatusNone=>Fixed
    Thu 18 Jun 2015 05:56:27 PM UTCbensAttached File-=>Added only-set-homedir-when-not-empty.patch, #34257

    Back to the top


    Powered by Savane 3.1-cleanup1