~/.bazaar created owned by root (when run under sudo)
Bug #376388 reported by
Morgan Collett
This bug affects 4 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Medium
|
Parth Malwankar | ||
bzr (Ubuntu) |
Fix Released
|
Low
|
Unassigned | ||
etckeeper (Ubuntu) |
Fix Released
|
Medium
|
Thierry Carrez |
Bug Description
Binary package hint: etckeeper
Installing and using etckeeper on a new jaunty server without a ~/.bazaar causes the user to have their .bazaar owned by root.
Steps to reproduce:
On a new jaunty server with no ~/.bazaar:
$ sudo apt-get install etckeeper
$ sudo etckeeper init
$ sudo etckeeper commit "Initial commit"
$ ls -ld .bazaar
drwxr-xr-x 2 root root 4096 2009-05-13 21:13 .bazaar/
This causes setting bzr whoami after this to fail.
Related branches
lp://staging/~parthm/bzr/376388-dot-bazaar-ownership
Merged
into
lp://staging/bzr
- Martin Pool: Approve
- Vincent Ladeuil: Needs Fixing
- Martin Packman (community): Needs Fixing
-
Diff: 221 lines (+112/-3)7 files modifiedNEWS (+5/-0)
bzrlib/config.py (+3/-2)
bzrlib/osutils.py (+47/-0)
bzrlib/tests/features.py (+10/-0)
bzrlib/tests/test_osutils.py (+41/-0)
bzrlib/trace.py (+4/-1)
doc/developers/testing.txt (+2/-0)
lp://staging/~parthm/bzr/376388-dot-bazaar-ownership-regression-2.2
- Vincent Ladeuil: Approve
- John A Meinel: Needs Fixing
-
Diff: 60 lines (+21/-2)2 files modifiedbzrlib/config.py (+3/-1)
bzrlib/tests/test_config.py (+18/-1)
Changed in bzr (Ubuntu): | |
status: | New → Confirmed |
Changed in bzr: | |
status: | New → Triaged |
importance: | Undecided → Low |
importance: | Low → Medium |
Changed in etckeeper (Ubuntu): | |
assignee: | nobody → Thierry Carrez (ttx) |
status: | Confirmed → In Progress |
Changed in bzr (Ubuntu): | |
importance: | Undecided → Low |
Changed in bzr: | |
status: | In Progress → Fix Released |
To post a comment you must log in.
This is caused by bzr not really supporting to be run under sudo. py:ensure_ config_ dir_exists it creates $HOME/.bazaar without dropping rights to the $SUDO_USER. Unfortunately the same could be said for all other config-writing functions. I'm not exactly sure where (and how) it would be best to fix that.
In config.
Adding a bzr task to this bug to drag bzr developers into the discussion. The fix for this one could also be discussed at the bzr/etckeeper session at UDS (server track).