summaryrefslogtreecommitdiffstats
path: root/sys-utils/setpriv.c
diff options
context:
space:
mode:
authorAndy Lutomirski2014-05-01 07:10:13 +0200
committerKarel Zak2014-05-06 11:27:52 +0200
commitcc89383b3207f14671ad4266bb945347d5c1b609 (patch)
tree6d6da9b1525cf43023ffe5ffecdb40dda199c5bc /sys-utils/setpriv.c
parenttextual: remove square brackets from around three dots (diff)
downloadkernel-qcow2-util-linux-cc89383b3207f14671ad4266bb945347d5c1b609.tar.gz
kernel-qcow2-util-linux-cc89383b3207f14671ad4266bb945347d5c1b609.tar.xz
kernel-qcow2-util-linux-cc89383b3207f14671ad4266bb945347d5c1b609.zip
setpriv: Fix --selinux-label
This commit: commit 05cef8eafbf169a8da1d2831f5ed3d5b1b81aaad Author: Sami Kerola <kerolasa@iki.fi> 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@amacapital.net>
Diffstat (limited to 'sys-utils/setpriv.c')
-rw-r--r--sys-utils/setpriv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys-utils/setpriv.c b/sys-utils/setpriv.c
index 7bea62649..65921be18 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)