Bug 20283 - avahi-autoipd system user’s home directory /var/lib/avahi-autoipd is not created
Summary: avahi-autoipd system user’s home directory /var/lib/avahi-autoipd is not created
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Shlomi Fish
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-14 03:06 CET by Davy Defaud
Modified: 2017-05-07 14:10 CEST (History)
1 user (show)

See Also:
Source RPM: avahi-0.6.32-1.mga6.src.rpm
CVE:
Status comment:


Attachments

Description Davy Defaud 2017-02-14 03:06:57 CET
Description of problem:
Despite the following scriptlet in the spec file, I donât have /var/lib/avahi-autoipd created as the home directory of the avahi-autoipd system user:

%pre
%_pre_useradd %{name} %{_var}/run/%{name}-daemon /bin/false
%_pre_useradd %{name}-autoipd %{_var}/lib/%{name}-autoipd /bin/false
# Correct home directories if users already exists (mga#10004)
if [ "`grep -E '^%{name}:' < /etc/passwd | cut -f6 -d:`" = %{_var}/avahi ]; then
    %{_sbindir}/usermod -d %{_var}/run/%{name}-daemon %{name}
fi
if [ "`grep -E '^%{name}-autoipd:' < /etc/passwd | cut -f6 -d:`" = %{_var}/avahi ]; then
    %{_sbindir}/usermod -d %{_var}/lib/%{name}-autoipd %{name}-autoipd
fi
Comment 1 Davy Defaud 2017-02-14 03:26:11 CET
I think the problem is a bad copy/paste for usermod of the avahi-autoipd user.
It should be:
if [ "`grep -E '^%{name}-autoipd:' < /etc/passwd | cut -f6 -d:`" = %{_var}/lib/%{name}-autoipd ];

Even better, every %{_var}/lib in the spec file could be replaced by %{_sharedstatedir}.
Comment 2 Marja Van Waes 2017-02-14 22:41:31 CET
Assigning to the registered maintainer.

CC: (none) => marja11
Assignee: bugsquad => shlomif

Davy Defaud 2017-05-07 14:10:36 CEST

Summary: avahi-autoipd system userâs home directory /var/lib/avahi-autoipd is not created => avahi-autoipd system user’s home directory /var/lib/avahi-autoipd is not created


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