]> granicus.if.org Git - sudo/commitdiff
Sanity check sessid before using it.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 3 Sep 2009 23:27:24 +0000 (23:27 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 3 Sep 2009 23:27:24 +0000 (23:27 +0000)
script.c

index 0b69fef7f0debbbf2596e0ed95e0d6d617e72805..a0ac86f7442f7130d9a166870c9c1db1ec98a901 100644 (file)
--- a/script.c
+++ b/script.c
@@ -171,6 +171,9 @@ build_idpath(pathbuf)
     struct stat sb;
     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.
      */