Skip to contentSkip to conversation

run_init requires full path.

DISCUSSION Daniel J Walsh 2 participants 2 messages Sep 20, 2006 SELinux security module

lore
Share & tools
lore
#0 lore raw

Why does run_init require me to have the full path? Is there a security reason for this?

The basic problem is run_init, does a chdir("/") before execing the app.

So if I want to run a test script
run_init test.sh or
run_init ./test.sh

does not work.

I end up having to do
run_init pwd/test.sh

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#1 lore raw
Quoted 5 lines · Daniel J Walsh

Why does run_init require me to have the full path? Is there a security reason for this?

The basic problem is run_init, does a chdir("/") before execing the app.

Quoted 8 lines

So if I want to run a test script
run_init test.sh or
run_init ./test.sh

does not work.

I end up having to do
run_init pwd/test.sh

See:
http://marc.theaimsgroup.com/?l=selinux&m=102077444021285&w=2

Otherwise, it is quite common to run into audit noise when the init script or daemon tries to access the cwd.

Signature · 8 lines
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.