Bug 687914 - oprofile user without $HOME
Summary: oprofile user without $HOME
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: oprofile
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: William Cohen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-15 17:37 UTC by Account closed by user
Modified: 2011-05-03 04:50 UTC (History)
2 users (show)

Fixed In Version: oprofile-0.9.6-20.fc14
Clone Of:
Environment:
Last Closed: 2011-03-31 18:59:53 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Avoid using /home/oprofile as home for user oprofile (1.31 KB, patch)
2011-03-15 18:37 UTC, William Cohen
no flags Details | Diff
Remove the %homedir in the patch (1.32 KB, patch)
2011-03-15 19:22 UTC, William Cohen
no flags Details | Diff

Description Account closed by user 2011-03-15 17:37:58 UTC
# pwck 
user 'adm': directory '/var/adm' does not exist
user 'uucp': directory '/var/spool/uucp' does not exist
user 'gopher': directory '/var/gopher' does not exist
user 'avahi-autoipd': directory '/var/lib/avahi-autoipd' does not exist
user 'oprofile': directory '/home/oprofile' does not exist
user 'saslauth': directory '/var/empty/saslauth' does not exist
user 'mailnull': directory '/var/spool/mqueue' does not exist
user 'smmsp': directory '/var/spool/mqueue' does not exist
user 'pulse': directory '/var/run/pulse' does not exist
pwck: no changes


no $HOME for oprofile user:
"user 'oprofile': directory '/home/oprofile' does not exist"

Comment 1 Bill Nottingham 2011-03-15 17:46:15 UTC
In general, system packages should stay out of the /home space.

Comment 2 William Cohen 2011-03-15 18:34:34 UTC
I see the problem line in oprofile.spec:

useradd -r -g oprofile -d /home/oprofile -r -u 16 -s /sbin/nologin \
    -c "Special user account to be used by OProfile" oprofile

What would be the preferred directory to use? Looking at:

https://fedoraproject.org/wiki/PackagingDrafts/UserCreation

So that should be:

useradd -r -g oprofile -d %homedir -r -u 16 -s /sbin/nologin \
    -c "Special user account to be used by OProfile" oprofile

Shouldn't there be an entry in the following oprofile?


https://fedoraproject.org/wiki/PackageUserRegistry

Comment 3 William Cohen 2011-03-15 18:37:49 UTC
Created attachment 485578 [details]
Avoid using /home/oprofile as home for user oprofile

So something like the attached patch to correct the problem?

Comment 4 Bill Nottingham 2011-03-15 19:02:13 UTC
I'm not seeing where %homedir is defined. Am I missing something?

Comment 5 William Cohen 2011-03-15 19:22:25 UTC
Created attachment 485587 [details]
Remove the %homedir in the patch

The %homedir was from the code snippet on . When testing things out I realize that it %homedir wasn't a predefined macro. This patch corrects that.

The other question I had was the 'test "$1" != 0 || " in the %postun. Are those required?

Comment 6 Bill Nottingham 2011-03-15 20:28:28 UTC
Yes, they're needed - otherwise it will fire when you're upgrading the package and the old version gets removed. New patch looks good.

Comment 7 Bill Nottingham 2011-03-15 20:29:01 UTC
https://fedoraproject.org/wiki/Packaging:UsersAndGroups has more info.

Comment 8 William Cohen 2011-03-15 20:58:26 UTC
Patch now in the oprofile.spec and rebuilt in oprofile-0.9.6-18, so this should no longer be an issue.

Comment 9 Fedora Update System 2011-04-07 15:54:45 UTC
oprofile-0.9.6-20.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/oprofile-0.9.6-20.fc13

Comment 10 Fedora Update System 2011-04-07 15:56:39 UTC
oprofile-0.9.6-20.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/oprofile-0.9.6-20.fc14

Comment 11 Fedora Update System 2011-04-07 15:57:31 UTC
oprofile-0.9.6-20.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/oprofile-0.9.6-20.fc15

Comment 12 Fedora Update System 2011-05-02 22:26:28 UTC
oprofile-0.9.6-20.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2011-05-02 22:29:13 UTC
oprofile-0.9.6-20.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2011-05-03 04:50:32 UTC
oprofile-0.9.6-20.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.


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