mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-29 05:17:54 +00:00
cvtsudoers_ldif: display warning on write error
This commit is contained in:
parent
7e4632691b
commit
2c06aa321b
@ -783,13 +783,17 @@ convert_sudoers_ldif(const struct sudoers_parse_tree *parse_tree,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret = true;
|
||||
|
||||
cleanup:
|
||||
if (seen_users != NULL)
|
||||
rbdestroy(seen_users, seen_user_free);
|
||||
|
||||
(void)fflush(output_fp);
|
||||
if (!ferror(output_fp))
|
||||
ret = true;
|
||||
if (ferror(output_fp)) {
|
||||
sudo_warn("%s", output_file);
|
||||
ret = false;
|
||||
}
|
||||
if (output_fp != stdout)
|
||||
fclose(output_fp);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user