Re: [systemd-devel] fchmod_opath() - why is this not in the kernel?

2018-12-04 Thread Lennart Poettering
On Mo, 03.12.18 21:06, Mike Gilbert (flop...@gentoo.org) wrote:

> The fchmod_opath() function in systemd seems like a hacky workaround
> for a limitation in the kernel -- you can't call fchmod() on an fd
> opened with O_PATH, and fchmodat() doesn't support the AT_EMPTY_PATH
> flag.
>
> Has any attempt been made to add this functionality in the kernel? If
> someone has already tried and failed, I will refrain from making an
> attempt myself.

They opened up a couple of syscalls to O_PATH over time. Hence maybe
this actually does work on current kernels, it's worth checking
again. But even if, this wouldn't be good enough for us, since we need
to support older kernels for a while again.

And no, I have not heard of or was involved in any attempt to fix the
kernel in this regard.

Lennart

--
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] fchmod_opath() - why is this not in the kernel?

2018-12-03 Thread Mike Gilbert
The fchmod_opath() function in systemd seems like a hacky workaround
for a limitation in the kernel -- you can't call fchmod() on an fd
opened with O_PATH, and fchmodat() doesn't support the AT_EMPTY_PATH
flag.

Has any attempt been made to add this functionality in the kernel? If
someone has already tried and failed, I will refrain from making an
attempt myself.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel