Skip to content

Commit ff5f68f

Browse files
committed
fmt_info_messages: don't include ttyname if it is NULL
The NULL check was commented out for testing but should have been restored. Fixes a potential protocol error message from sudo_logsrvd. --HG-- branch : 1.9
1 parent ac830c5 commit ff5f68f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

plugins/sudoers/log_client.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -917,9 +917,9 @@ fmt_info_messages(struct client_closure *closure, struct eventlog *evlog,
917917
fill_str("submithost", evlog->submithost);
918918
/* TODO - submituid */
919919
fill_str("submituser", evlog->submituser);
920-
// if (evlog->ttyname != NULL) {
920+
if (evlog->ttyname != NULL) {
921921
fill_str("ttyname", evlog->ttyname);
922-
// }
922+
}
923923

924924
/* Free unused structs. */
925925
while (info_msgs_size > n)

0 commit comments

Comments
 (0)