Bug 208772 - libselinux keeps "passwd -d username" not working in kickstart %post script
Summary: libselinux keeps "passwd -d username" not working in kickstart %post script
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: passwd
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tomas Mraz
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-10-01 21:02 UTC by Florian La Roche
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-01-22 12:48:01 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Florian La Roche 2006-10-01 21:02:39 UTC
Description of problem:

A kickstart "%post" script executes "passwd -d username" and fails
if selinux is disabled. Strace shows that selinux is not only reading
/etc/sysconfig/selinux, but also /proc/mounts and other files instead
of continuing normally with selinux disabled.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Daniel Walsh 2006-10-02 18:44:04 UTC
Are you sure this is an SELinux problem.  is_selinux_enabled() is attempting to
check the /proc/mounts to see if it is enabled.  is_selinux_enabled() will
return 0 if it not enabled, or -1 if it can't tell.  The passwd code looks to
correctly handle the code if is_selinux_enabled() does not return > 0.  So I
don't think this is an SELinux error.  Changing to passwd.

Comment 2 Tomas Mraz 2006-10-02 18:59:10 UTC
passwd-0.73 should now correctly proceed when is_selinux_enabled() returns 0 or
-1; I don't understand how could this be a passwd problem.

Could you please attach the strace here?


Comment 3 Florian La Roche 2006-10-05 05:53:04 UTC
This should give the strace output (no machine available right now to show
this);

%post
strace -o /tmp/selinux-passwd passwd -d root

Comment 4 Florian La Roche 2007-01-22 12:48:01 UTC
Should not be in new, probably fixed already.

regards,

Florian La Roche



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