From: Todd C. Miller Date: Wed, 14 Jul 2010 18:17:56 +0000 (-0400) Subject: Handle getcwd() failure. X-Git-Tag: SUDO_1_8_0~384 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=482f9cfc83e968437fb1db6d92e5bf620be2be7f;p=sudo Handle getcwd() failure. --- diff --git a/plugins/sudoers/sudoers.c b/plugins/sudoers/sudoers.c index 5b1dcbc22..356e2ef52 100644 --- a/plugins/sudoers/sudoers.c +++ b/plugins/sudoers/sudoers.c @@ -1327,6 +1327,8 @@ deserialize_info(char * const settings[], char * const user_info[]) continue; } } + if (user_cwd == NULL) + user_cwd = "unknown"; if (user_tty == NULL) user_tty = "unknown"; /* user_ttypath remains NULL */