Bug 866509

Summary: Use absolute paths when executing subprocesses from authconfig
Product: [Fedora] Fedora Reporter: Stef Walter <stefw>
Component: authconfigAssignee: Tomas Mraz <tmraz>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: tmraz
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-26 20:39:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to fix the problem none

Description Stef Walter 2012-10-15 14:21:07 UTC
Description of problem:

Several of the system() calls in authconfig do not use absolute paths for the commands they invoke. This causes messages like this one from realmd:

 * /usr/sbin/authconfig --update --enablesssd --enablesssdauth --enablemkhomedir
sh: getsebool: command not found
sh: getsebool: command not found

realmd has been invoked by systemd as a system service and presumably does not have /usr/sbin (the location of getsebool) in its $PATH.

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

Installed Packages
Name        : authconfig
Arch        : x86_64
Version     : 6.2.4
Release     : 2.fc18

How reproducible:

Every time.

Comment 1 Stef Walter 2012-10-15 14:24:40 UTC
Created attachment 627460 [details]
Patch to fix the problem

Patch which fixes the problem with using non-absolute paths.

Comment 2 Tomas Mraz 2012-10-15 15:57:22 UTC
I'm not sure it is the right thing to do given the recent push for moving things from sbin to bin. I'd propose to add the /sbin and /usr/sbin to the $PATH in the realmd environment.

Comment 3 Stef Walter 2012-10-15 16:18:53 UTC
(In reply to comment #2)
> I'm not sure it is the right thing to do given the recent push for moving
> things from sbin to bin. 

Perhaps. But there are more commands being run with absolute paths in authconfig than not. Looks like it was just a few added later to support selinux that don't have absolute paths.

> I'd propose to add the /sbin and /usr/sbin to the
> $PATH in the realmd environment.

Yes, I've done that as a work around: https://bugs.freedesktop.org/show_bug.cgi?id=56004

Does that patch look good?

Comment 4 Tomas Mraz 2012-10-15 16:32:33 UTC
Why not just set it in the realmd systemd unit file with the 'Environment=' configuration setting?

Comment 5 Stef Walter 2012-10-15 18:31:33 UTC
I haven't been using systemd activation for realmd. Just been installing a dbus system bus file. I should look into a systemd unit file for realmd. Probably post Fedora 18 though...