diff --git a/src/libpriv/rpmostree-kernel.c b/src/libpriv/rpmostree-kernel.c index 579beacf14..38f88e8255 100644 --- a/src/libpriv/rpmostree-kernel.c +++ b/src/libpriv/rpmostree-kernel.c @@ -493,7 +493,7 @@ rpmostree_run_dracut (int rootfs_dfd, O_RDWR | O_CLOEXEC, &tmpf, error)) goto out; - if (glnx_loop_write (tmpf.fd, rpmostree_dracut_wrapper, sizeof (rpmostree_dracut_wrapper)) < 0 + if (glnx_loop_write (tmpf.fd, rpmostree_dracut_wrapper, strlen (rpmostree_dracut_wrapper)) < 0 || fchmod (tmpf.fd, 0755) < 0) { glnx_set_error_from_errno (error);