Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong PATH order #641

Open
sulincix opened this issue Jul 28, 2023 · 0 comments
Open

Wrong PATH order #641

sulincix opened this issue Jul 28, 2023 · 0 comments

Comments

@sulincix
Copy link

sulincix commented Jul 28, 2023

I created this test server and explain:

$ cat /etc/init.d/test 
#!/sbin/openrc-run

name="test service"
start() {
    echo $PATH
}

$ rc-service test start
/lib/rc/sbin:/lib/rc/bin:/bin:/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Issue:

I have 2 seperated login command on system. /bin/login provided by busybox and does not use pam. /usr/bin/login provided by shadow and uses pam. I am starting agetty manually and agetty uses shadows login but Openrc service uses busybox login.

Also sysctl service crashed because uses /bin/sysctl from busybox instead of /usr/sbin/sysctl

We must fix order at https://github.com/OpenRC/openrc/blob/master/src/openrc-init/openrc-init.c#L45 and https://github.com/OpenRC/openrc/blob/master/sh/functions.sh.in#L91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant