mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-29 05:17:54 +00:00
Don't print garbage at the end of the custom lecture.
This commit is contained in:
parent
ab437ae6c3
commit
f190bcf94b
@ -212,7 +212,7 @@ lecture(int status)
|
||||
|
||||
if (def_lecture_file && (fp = fopen(def_lecture_file, "r")) != NULL) {
|
||||
while ((nread = fread(buf, sizeof(char), sizeof(buf) - 1, fp)) != 0) {
|
||||
buf[sizeof(buf) - 1] = '\0';
|
||||
buf[nread] = '\0';
|
||||
msg.msg_type = SUDO_CONV_ERROR_MSG;
|
||||
msg.msg = buf;
|
||||
sudo_conv(1, &msg, &repl);
|
||||
|
Loading…
x
Reference in New Issue
Block a user