Bug 208772

Summary: libselinux keeps "passwd -d username" not working in kickstart %post script
Product: [Fedora] Fedora Reporter: Florian La Roche <laroche>
Component: passwdAssignee: Tomas Mraz <tmraz>
Status: CLOSED WORKSFORME QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-01-22 12:48:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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