summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6bd0783)
and constant AT_EMPTY_PATH for chowning a directory/file opened via
openat(2), for example when walking/creating a directory tree without
following symlinks.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
mkdirat => &SYS_mkdirat,
faccessat => &SYS_faccessat,
setresuid => &SYS_setresuid,
mkdirat => &SYS_mkdirat,
faccessat => &SYS_faccessat,
setresuid => &SYS_setresuid,
+ fchownat => &SYS_fchownat,
use constant {O_PATH => 0x00200000,
O_TMPFILE => 0x00410000}; # This includes O_DIRECTORY
use constant {O_PATH => 0x00200000,
O_TMPFILE => 0x00410000}; # This includes O_DIRECTORY
+use constant {AT_EMPTY_PATH => 0x1000};
+
sub run_with_timeout {
my ($timeout, $code, @param) = @_;
sub run_with_timeout {
my ($timeout, $code, @param) = @_;
return syscall(PVE::Syscall::mkdirat, $dirfd, $name, $mode) == 0;
}
return syscall(PVE::Syscall::mkdirat, $dirfd, $name, $mode) == 0;
}
+sub fchownat($$$$$) {
+ my ($dirfd, $pathname, $owner, $group, $flags) = @_;
+ return syscall(PVE::Syscall::fchownat, $dirfd, $pathname, $owner, $group, $flags) == 0;
+}
+
my $salt_starter = time();
sub encrypt_pw {
my $salt_starter = time();
sub encrypt_pw {