-
Notifications
You must be signed in to change notification settings - Fork 325
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
utils: return error from set_home_env() if the user was not found #1633
utils: return error from set_home_env() if the user was not found #1633
Conversation
2f7ccda
to
d0b4483
Compare
CI failure being addressed in: #1634 |
If a given user cannot be found within the container, for example, because the specific UID does not exist, then return an error and let the callers of the set_home_env() function handle the case of the missing user appropriately. Signed-off-by: Krzysztof Wilczyński <kwilczynski@redhat.com>
Signed-off-by: Krzysztof Wilczyński <kwilczynski@redhat.com>
e8c9d44
to
25efd10
Compare
Rebased against the current |
podman system tests failed. @containers/packit-build please check. |
/cc @giuseppe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
If a given user cannot be found within the container, for example, because the specific
UID
does not exist, then return an error and let the callers of theset_home_env()
function handle the case of the missing user appropriately.This will fix an issue where when the user cannot be found, the
HOME
environment variable is not set, which can cause some software not to work correctly.The two current callers already correctly handled the case when the user was not found per:
crun/src/libcrun/container.c
Lines 1199 to 1207 in bd4f773
crun/src/libcrun/container.c
Lines 3406 to 3414 in bd4f773
The above will issue a warning and correctly set the
HOME
environment variable to/
as a fall-back on error.Related: