Bug 866509 - Use absolute paths when executing subprocesses from authconfig
Summary: Use absolute paths when executing subprocesses from authconfig
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: authconfig
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomas Mraz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-15 14:21 UTC by Stef Walter
Modified: 2013-03-26 20:39 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-03-26 20:39:58 UTC
Type: Bug
Embargoed:


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

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...


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