Sanity check sessid before using it.

This commit is contained in:
Todd C. Miller
2009-09-03 23:27:24 +00:00
parent f80fa34e74
commit c1fe4492f4

View File

@@ -171,6 +171,9 @@ build_idpath(pathbuf)
struct stat sb; struct stat sb;
int i, len; int i, len;
if (sudo_user.sessid[0] == '\0')
log_error(0, "tried to build a session id path without a session id");
/* /*
* Path is of the form /var/log/sudo-session/00/00/01. * Path is of the form /var/log/sudo-session/00/00/01.
*/ */