Bug 825725 - run_init always ends up with "execvp: No such file or directory" message [NEEDINFO]
run_init always ends up with "execvp: No such file or directory" message
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: policycoreutils (Show other bugs)
7.0
All Linux
high Severity medium
: rc
: ---
Assigned To: Miroslav Grepl
Michal Trunecka
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-28 05:45 EDT by Milos Malik
Modified: 2014-09-30 19:33 EDT (History)
4 users (show)

See Also:
Fixed In Version: policycoreutils-2.2.5-6.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 08:56:42 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
mtruneck: needinfo? (dwalsh)


Attachments (Terms of Use)

  None (edit)
Description Milos Malik 2012-05-28 05:45:59 EDT
Description of problem:
No matter what service I tried to start/stop/status, run_init always ended up with the same error message.

Version-Release number of selected component (if applicable):
policycoreutils-python-2.1.11-15.el7.x86_64
policycoreutils-2.1.11-15.el7.x86_64
policycoreutils-newrole-2.1.11-15.el7.x86_64

How reproducible:
always

Steps to Reproduce:
# run_init service memcached status
Authenticating root.
Password: 
execvp: No such file or directory
#

Actual results:
* run_init is not able to execute supplied command line

Expected results:
* run_init works as usual
Comment 1 Milos Malik 2012-05-28 05:48:58 EDT
This bug blocks a lot of automated selinux-policy tests, which heavily use run_init.
Comment 2 Michal Trunecka 2012-05-28 05:57:58 EDT
The bug is probably caused by this code in run_init.c:

    417     if (execvp("/usr/sbin/open_init_pty", argv)) {
    418         perror("execvp");
    419         exit(-1);
    420     }
    421     return 0;

Because it calls open_init_pty, which was removed according to this line in changelog of policycoreutils:

 * Wed Dec 21 2011 Dan Walsh <dwalsh@redhat.com> - 2.1.10-2
   Remove open_init_pty
Comment 3 Daniel Walsh 2012-05-29 11:37:59 EDT
rpm -q policycoreutils
policycoreutils-2.1.11-18.fc18.x86_64

has

	if (! access("/usr/sbin/open_init_pty", X_OK)) {
		if (execvp(argv[1], argv + 1)) {
			perror("execvp");
			exit(-1);
		}
		return 0;
	}
Comment 6 Daniel Walsh 2012-11-05 11:47:07 EST
run_init requires full paths.


run_init /sbin/service memcached status

Although for this command it does blow up.

with unconfined module disabled.

run_init should die a painful death and is not really as needed in a systemd world.
Comment 7 Daniel Walsh 2012-11-05 11:50:17 EST
I think run_init should be dropped from the distribution, since systemd eliminates the need.
Comment 8 Milos Malik 2012-11-06 02:53:54 EST
That sound good.
Comment 9 Daniel Walsh 2012-11-06 15:01:44 EST
Removed in policycoreutils-2.1.13-26.el7
Comment 10 Michal Trunecka 2013-03-19 03:46:20 EDT
What was the fix, then? Seems the run_init is still there:

# rpm -q policycoreutils
policycoreutils-2.1.14-22.el7.x86_64

# rpm -ql policycoreutils | grep run_init
/etc/pam.d/run_init
/usr/sbin/run_init
/usr/share/man/man8/run_init.8.gz
/usr/share/man/ru/man8/run_init.8.gz
Comment 11 Michal Trunecka 2014-01-28 08:48:24 EST
I see that run_init is in policycoreutils-newrole now. Is there a reason to keep it in RHEL7 then or is it still going to be removed?

policycoreutils-newrole-2.2.5-2.el7.x86_64
Comment 12 Miroslav Grepl 2014-02-03 04:11:43 EST
Ok, I am testing a fix.

# rpm -ql policycoreutils-newrole
/etc/pam.d/newrole
/usr/bin/newrole
/usr/share/man/man1/newrole.1.gz

Easy fix (Makefile+specfile) but we will need to add an announcement about this change (a doc note).
Comment 16 Ludek Smid 2014-06-13 08:56:42 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

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