Bug 4043 - (int-99468) Application Manager should not depend on "user" account
(int-99468)
: Application Manager should not depend on "user" account
Status: RESOLVED FIXED
Product: Settings and Maintenance
Application manager
: 5.0-beta
: All Windows
: Medium enhancement (vote)
: 5.0-beta2
Assigned To: unassigned
: application-manager-bugs
: http://bazaar.launchpad.net/~mer-comm...
: patch
:
:
  Show dependency tree
 
Reported: 2009-01-26 13:28 UTC by Andrew Flegg
Modified: 2009-07-14 13:37 UTC (History)
1 user (show)

See Also:


Attachments
Patch equivalent of r7 in launchpad (1.41 KB, patch)
2009-01-26 14:04 UTC, Andrew Flegg
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description Andrew Flegg (reporter) maemo.org 2009-01-26 13:28:58 UTC
INTRODUCTION
~~~~~~~~~~~~
Hildon Application Manager depends on a "user" account in three places:
  1) h-a-m.init starts the given process as `user'.
  2) postinst migrates user settings for old versions of HAM from
     /home/user/.osso/...
  3) sudoers is modified to allow `user' to call apt-worker and the various
     other scripts.

This is a problem on non-Maemo systems (such as Mer) which do not mandate a
single user account called `user'.

SOLUTION
~~~~~~~~
The diff at the above URL[1] solves all of these problems in a way compatible
with both Maemo *and* Mer, and so it would be good to have included upstream.

  #1 h-a-m.init starts the process as `nobody' - an account which is
     guaranteed to exist on both Maemo, Ubuntu, Debian and Mer.

  #2 postinst migrates settings from /home/*, rather than just /home/user.
     This isn't robust in all possible edge-cases, but handles the default
     home directory locations on Debian. Ubuntu, Maemo & Mer. Also, if no
     home directories exist, it is a no-op, rather than failing.

  #3 Instead of granting the permissions in sudoers to `user', they are
     granted to `%users' - i.e. all users in the "users" group. Since
     on Maemo `user' belongs to that group, this change is safe both on
     Maemo & Mer.

Any questions, please don't hesitate to ask: it is important for code which is
shipped on Maemo and Mer to be as close as possible (IMHO), and these small
changes do enable closer codebases between the two.

[1]
http://bazaar.launchpad.net/~mer-committers/m-r/hildon-application-manager/revision/7
Comment 1 Andrew Flegg (reporter) maemo.org 2009-01-26 14:04:12 UTC
Created an attachment (id=1116) [details]
Patch equivalent of r7 in launchpad

Adding file encompassing the diff.
Comment 2 Andre Klapper maemo.org 2009-05-20 15:34:06 UTC
FIXED in Fremantle (but after SDK beta release).
Comment 3 Andre Klapper maemo.org 2009-07-14 13:37:57 UTC
Fix should be included in Fremantle SDK beta 2 hence updating Target Milestone.
If you are the reporter of this bug: Feel free to verify the fix if possible.