Commit 0be2602f authored by Ramon Nou's avatar Ramon Nou
Browse files

added fchmodat2 (for docker image)

parent 9ca523e4
Loading
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -54,6 +54,9 @@ extern "C" {
#include <printf.h>
}

#ifndef SYS_fchmodat2
#define SYS_fchmodat2 452
#endif

#ifdef BYPASS_SYSCALL
int (*intercept_hook_point)(long syscall_number, long arg0, long arg1,
@@ -863,6 +866,13 @@ hook(long syscall_number, long arg0, long arg1, long arg2, long arg3, long arg4,
                                                static_cast<int>(arg3));
            break;

        case SYS_fchmodat2:
            *result = gkfs::hook::hook_fchmodat(static_cast<unsigned int>(arg0),
                                                reinterpret_cast<char*>(arg1),
                                                static_cast<mode_t>(arg2),
                                                static_cast<int>(arg3));
            break;

        case SYS_flock:
            *result = gkfs::hook::hook_flock(static_cast<unsigned int>(arg0),
                                             static_cast<unsigned int>(arg1));