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

Add a log message when the user is not found #1261

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cherokee/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -2032,6 +2032,7 @@ cherokee_connection_build_local_directory_userdir (cherokee_connection_t *co
*/
ret = cherokee_getpwnam (conn->userdir.buf, &pwd, tmp, sizeof(tmp));
if ((ret != ret_ok) || (pwd.pw_dir == NULL)) {
LOG_ERROR (CHEROKEE_ERROR_CONNECTION_NO_USER, conn->userdir.buf);
conn->error_code = http_not_found;
return ret_error;
}
Expand Down
3 changes: 3 additions & 0 deletions cherokee/error_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,9 @@
title = "Could not get virtual server: '%s'",
desc = CODING_BUG)

e('CONNECTION_NO_USER',
title = "User '%s' not found in the system",
desc = "The server is trying to build the local directory string. However, it seems that the user does not exist in the system.")

# cherokee/ncpus.c
#
Expand Down