Bug 866509 - Use absolute paths when executing subprocesses from authconfig
Use absolute paths when executing subprocesses from authconfig
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: authconfig (Show other bugs)
18
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tomas Mraz
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-15 10:21 EDT by Stef Walter
Modified: 2013-03-26 16:39 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-26 16:39:58 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Patch to fix the problem (2.09 KB, patch)
2012-10-15 10:24 EDT, Stef Walter
no flags Details | Diff

  None (edit)
Description Stef Walter 2012-10-15 10:21:07 EDT
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 10:24:40 EDT
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 11:57:22 EDT
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 12:18:53 EDT
(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 12:32:33 EDT
Why not just set it in the realmd systemd unit file with the 'Environment=' configuration setting?
Comment 5 Stef Walter 2012-10-15 14:31:33 EDT
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...

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