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

Exit code should be non-zero for inexistent user #6

Open
elifarley opened this issue Jul 21, 2016 · 1 comment · May be fixed by #27
Open

Exit code should be non-zero for inexistent user #6

elifarley opened this issue Jul 21, 2016 · 1 comment · May be fixed by #27

Comments

@elifarley
Copy link

The command su-exec inexistent_user id -un erroneously reports root and has 0 as exit code.

elifarley added a commit to elifarley/container-entrypoint that referenced this issue Jul 21, 2016
)

The command "su-exec inexistent_user id -un" erroneously reports "root"
@tianon
Copy link
Contributor

tianon commented Dec 6, 2016

Can confirm: 😢

bash-4.3# su-exec logstash id
uid=0(root) gid=0(root) groups=0(root),0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)

knackaron added a commit to knackworks/su-exec that referenced this issue Mar 29, 2019
0

user fakeuser does not exist
1

fixes ncopa#6
knackaron added a commit to knackworks/su-exec that referenced this issue Mar 29, 2019
$ ./su-exec realuser id; echo $?
uid=12345(realuser) ...
0

$ ./su-exec fakeuser id; echo $?
user fakeuser does not exist
1

fixes ncopa#6
@knackaron knackaron linked a pull request Mar 29, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants