From 482f9cfc83e968437fb1db6d92e5bf620be2be7f Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 14 Jul 2010 14:17:56 -0400 Subject: [PATCH] Handle getcwd() failure. --- plugins/sudoers/sudoers.c | 2 ++ 1 file changed, 2 insertions(+) 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 */