shelltoolbox guesses home dir (sometimes)
Bug #1034603 reported by
Benji York
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).
Changed in lpsetup: | |
importance: | Undecided → Low |
status: | New → Triaged |
To post a comment you must log in.
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.