Set user_tty to "unknown" if there is no tty, like sudo 1.7 does
(it is used when logging). Note that user_ttypath will still be NULL if there is no tty.
This commit is contained in:
@@ -1314,6 +1314,8 @@ deserialize_info(char * const settings[], char * const user_info[])
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (user_tty == NULL)
|
||||||
|
user_tty = "unknown"; /* user_ttypath remains NULL */
|
||||||
|
|
||||||
#undef MATCHES
|
#undef MATCHES
|
||||||
return flags;
|
return flags;
|
||||||
|
Reference in New Issue
Block a user