Bug 208772 - libselinux keeps "passwd -d username" not working in kickstart %post script
libselinux keeps "passwd -d username" not working in kickstart %post script
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: passwd (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tomas Mraz
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-01 17:02 EDT by Florian La Roche
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-01-22 07:48:01 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Florian La Roche 2006-10-01 17:02:39 EDT
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 14:44:04 EDT
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 14:59:10 EDT
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 01:53:04 EDT
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 07:48:01 EST
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.