cvtsudoers_ldif: display warning on write error
This commit is contained in:
@@ -783,13 +783,17 @@ convert_sudoers_ldif(const struct sudoers_parse_tree *parse_tree,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (seen_users != NULL)
|
if (seen_users != NULL)
|
||||||
rbdestroy(seen_users, seen_user_free);
|
rbdestroy(seen_users, seen_user_free);
|
||||||
|
|
||||||
(void)fflush(output_fp);
|
(void)fflush(output_fp);
|
||||||
if (!ferror(output_fp))
|
if (ferror(output_fp)) {
|
||||||
ret = true;
|
sudo_warn("%s", output_file);
|
||||||
|
ret = false;
|
||||||
|
}
|
||||||
if (output_fp != stdout)
|
if (output_fp != stdout)
|
||||||
fclose(output_fp);
|
fclose(output_fp);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user