This commit: commit 05cef8eafbf169a8da1d2831f5ed3d5b1b81aaad Author: Sami Kerola <kerolasa@xxxxxx> Date: Sat Apr 13 20:54:59 2013 +0100 setpriv: check writing to a file descriptor was successful broke --selinux-label. It checks whether fsyncing /proc/self/attr/exec succeeds, and it doesn't, because fsync isn't supported on that file. I have stealthily improved the error message as part of this fix. Signed-off-by: Andy Lutomirski <luto@xxxxxxxxxxxxxx> --- sys-utils/setpriv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys-utils/setpriv.c b/sys-utils/setpriv.c index 7bea626..65921be 100644 --- a/sys-utils/setpriv.c +++ b/sys-utils/setpriv.c @@ -526,9 +526,9 @@ static void do_selinux_label(const char *label) err(SETPRIV_EXIT_PRIVERR, _("write failed: %s"), _PATH_PROC_ATTR_EXEC); - if (close_fd(fd) != 0) + if (close(fd) != 0) err(SETPRIV_EXIT_PRIVERR, - _("write failed: %s"), _PATH_PROC_ATTR_EXEC); + _("close failed: %s"), _PATH_PROC_ATTR_EXEC); } static void do_apparmor_profile(const char *label) -- 1.9.0 -- 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