[CRIU] [PATCH 07/10] Add syscalls needed for fowners dump/restore

Cyrill Gorcunov gorcunov at openvz.org
Mon Mar 12 16:55:20 EDT 2012


Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 include/syscall-codes.h |    2 ++
 include/syscall.h       |   11 +++++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/include/syscall-codes.h b/include/syscall-codes.h
index 86adf75..9114a9a 100644
--- a/include/syscall-codes.h
+++ b/include/syscall-codes.h
@@ -34,9 +34,11 @@
 #define __NR_exit		60
 #define __NR_wait4		61
 #define __NR_kill		62
+#define __NR_fcntl		72
 #define __NR_flock		73
 #define __NR_unlink		87
 #define __NR_setresuid		117
+#define __NR_getresuid		118
 #define __NR_setresgid		119
 #define __NR_setfsuid		122
 #define __NR_setfsgid		123
diff --git a/include/syscall.h b/include/syscall.h
index 31a5d9a..5b56561 100644
--- a/include/syscall.h
+++ b/include/syscall.h
@@ -298,6 +298,12 @@ static always_inline long sys_flock(unsigned long fd, unsigned long cmd)
 	return syscall2(__NR_flock, fd, cmd);
 }
 
+static long always_inline
+sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	return syscall3(__NR_fcntl, (long)fd, (long)cmd, arg);
+}
+
 static void always_inline local_sleep(long seconds)
 {
 	struct timespec req, rem;
@@ -335,6 +341,11 @@ static long sys_setresuid(int uid, int euid, int suid)
 	return syscall3(__NR_setresuid, (long)uid, (long)euid, (long)suid);
 }
 
+static long sys_getresuid(int *uid, int *euid, int *suid)
+{
+	return syscall3(__NR_getresuid, (long)uid, (long)euid, (long)suid);
+}
+
 static long sys_setresgid(int gid, int egid, int sgid)
 {
 	return syscall3(__NR_setresgid, (long)gid, (long)egid, (long)sgid);
-- 
1.7.7.6



More information about the CRIU mailing list