[pve-devel] applied: [PATCH common 1/2] tools: add fchmodat syscall

Fabian Grünbichler f.gruenbichler at proxmox.com
Thu Jan 15 11:28:01 CET 2026


thanks!

On December 16, 2025 7:08 pm, Filip Schauer wrote:
> The fchmodat syscall changes the mode of a file relative to a file
> descriptor.
> 
> Signed-off-by: Filip Schauer <f.schauer at proxmox.com>
> ---
>  src/PVE/Syscall.pm |  1 +
>  src/PVE/Tools.pm   | 11 +++++++++++
>  2 files changed, 12 insertions(+)
> 
> diff --git a/src/PVE/Syscall.pm b/src/PVE/Syscall.pm
> index 68e16fe..606cc56 100644
> --- a/src/PVE/Syscall.pm
> +++ b/src/PVE/Syscall.pm
> @@ -22,6 +22,7 @@ BEGIN {
>          setresuid => &SYS_setresuid,
>          fallocate => &SYS_fallocate,
>          fchownat => &SYS_fchownat,
> +        fchmodat => &SYS_fchmodat,
>          mount => &SYS_mount,
>          renameat2 => &SYS_renameat2,
>          open_tree => &SYS_open_tree,
> diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm
> index 3c6f2fb..a7bb3da 100644
> --- a/src/PVE/Tools.pm
> +++ b/src/PVE/Tools.pm
> @@ -1505,6 +1505,17 @@ sub fchownat($$$$$) {
>      ) == 0;
>  }
>  
> +sub fchmodat($$$$) {
> +    my ($dirfd, $pathname, $mode, $flags) = @_;
> +    return syscall(
> +        PVE::Syscall::fchmodat,
> +        int($dirfd),
> +        $pathname,
> +        int($mode),
> +        int($flags),
> +    ) == 0;
> +}
> +
>  my $salt_starter = time();
>  
>  sub encrypt_pw {
> -- 
> 2.47.3
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 
> 




More information about the pve-devel mailing list