getpwnam() and parsing /etc/passwd gives wrong value for HOME to snaps
Bug #1636229 reported by
ILIV
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snappy |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Hi,
psql, which is part of PostgreSQL, writes to ~/.psql_history on exit. The hidden file is basically equivalent of the .bash_history system file.
However, the home: plug/interface currently prohibits writing to hidden files:
iliv@xenial:~$ postgresql94.psql -h 127.0.0.1 -d postgres -p 5433
psql (9.4.9)
...
postgres=# \q
could not save history to file "/home/
I doubt PostgreSQL is going to change this behavior so I was wondering if snapcraft would be willing to reconsider the way home: plug/interface works.
affects: | snapcraft → snappy |
To post a comment you must log in.
The HOME environment variable is set to '$HOME/ snap/name/ revision' so that snaps don't need to use the transitional 'home' interface and have full access to all hidden directories in HOME. I would expect psql to write its history file write the file to $HOME/snap/ name/revision/ .psql_history if it is honoring the HOME environment variable (which it should, since HOME could be set to any number of places outside of /home/).
Is HOME not being set correctly for you?