shelltoolbox guesses home dir (sometimes)

Bug #1034603 reported by Benji York
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lpsetup
Triaged
Low
Unassigned

Bug Description

shelltoolbox's get_user_home function guesses the user's home directory
if getpwname raises a KeyError. If guessing is really necessary it
should at least check that the guessed directory exists (and perhaps
that it is writeable by the user in question).

Benji York (benji)
Changed in lpsetup:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Benji York (benji) wrote :

The reason it guesses is that we sometimes need to know the home dir of a user that has not been created yet.

We decided that it should return None instead and the code consuming the home dir will check for None and re-query for the user's home dir at that point, generating an error if one can not be found.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.