Signed-off-by: Sami Kerola <kerolasa@xxxxxx> --- sys-utils/setpriv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys-utils/setpriv.c b/sys-utils/setpriv.c index 18810c5..4a44106 100644 --- a/sys-utils/setpriv.c +++ b/sys-utils/setpriv.c @@ -526,7 +526,9 @@ static void do_selinux_label(const char *label) err(SETPRIV_EXIT_PRIVERR, _("write failed: %s"), _PATH_PROC_ATTR_EXEC); - close(fd); + if (close_fd(fd) != 0) + err(SETPRIV_EXIT_PRIVERR, + _("write failed: %s"), _PATH_PROC_ATTR_EXEC); } static void do_apparmor_profile(const char *label) -- 1.8.2.1 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html