summaryrefslogtreecommitdiff
path: root/security/sudo/files/patch-fix_bz208198
blob: 8ef2e1efea9e15ac9bb5b851d047c36b131d4e14 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
--- plugins/sudoers/pwutil.c	Thu Apr 28 15:27:53 2016 -0600
+++ plugins/sudoers/pwutil.c	Wed May 04 08:55:21 2016 -0600
@@ -139,8 +139,8 @@
 	item = node->data;
 	sudo_debug_printf(SUDO_DEBUG_DEBUG,
 	    "%s: uid %u [%s] -> user %s [%s] (cache hit)", __func__,
-	    (unsigned int)uid, key.registry, item->d.pw->pw_name,
-	    item->registry);
+	    (unsigned int)uid, key.registry,
+	    item->d.pw ? item->d.pw->pw_name : "unknown", item->registry);
 	goto done;
     }
     /*
@@ -202,8 +202,8 @@
     if ((node = rbfind(pwcache_byname, &key)) != NULL) {
 	item = node->data;
 	sudo_debug_printf(SUDO_DEBUG_DEBUG,
-	    "%s: user %s [%s] -> uid %u [%s] (cache hit)", __func__, name,
-	    key.registry, (unsigned int)item->d.pw->pw_uid, item->registry);
+	    "%s: user %s [%s] -> uid %d [%s] (cache hit)", __func__, name,
+	    key.registry, item->d.pw ? (int)item->d.pw->pw_uid : -1, item->registry);
 	goto done;
     }
     /*
@@ -461,8 +461,8 @@
 	item = node->data;
 	sudo_debug_printf(SUDO_DEBUG_DEBUG,
 	    "%s: gid %u [%s] -> group %s [%s] (cache hit)", __func__,
-	    (unsigned int)gid, key.registry, item->d.gr->gr_name,
-	    item->registry);
+	    (unsigned int)gid, key.registry,
+	    item->d.gr ? item->d.gr->gr_name : "unknown", item->registry);
 	goto done;
     }
     /*