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 non-zero when user does not exist #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

knackaron
Copy link

$ ./su-exec realuser id; echo $?
uid=12345(realuser) ...
0

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

fixes #6

$ ./su-exec realuser id; echo $?
uid=12345(realuser) ...
0

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

fixes ncopa#6
@tianon
Copy link
Contributor

tianon commented Aug 21, 2019

See also #26 for a more complete implementation (that handles the group edge cases as well).

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

Successfully merging this pull request may close these issues.

Exit code should be non-zero for inexistent user
2 participants