summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasatake YAMATO <yamato@redhat.com>2014-05-14 01:46:04 +0900
committerDmitry V. Levin <ldv@altlinux.org>2014-05-13 23:22:47 +0000
commitb2ede14797b729659b0397431b28f34e57b5c4e7 (patch)
tree6c05fb5e997b78b9e71514897c9141fd45e2484a
parent985425a30bb5d380e160acde997770067388dc76 (diff)
downloadstrace-b2ede14797b729659b0397431b28f34e57b5c4e7.tar.gz
strace-b2ede14797b729659b0397431b28f34e57b5c4e7.tar.bz2
strace-b2ede14797b729659b0397431b28f34e57b5c4e7.tar.xz
Enhance setns syscall decoding
* process.c (sys_setns): New function. Decode the 2nd syscall argument using clone_flags. * linux/syscall.h (sys_setns): New prototype. * linux/dummy.h (sys_setns): Remove. Signed-off-by: Masatake YAMATO <yamato@redhat.com> Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
-rw-r--r--linux/dummy.h1
-rw-r--r--linux/syscall.h1
-rw-r--r--process.c11
3 files changed, 12 insertions, 1 deletions
diff --git a/linux/dummy.h b/linux/dummy.h
index 2371673..4f3e920 100644
--- a/linux/dummy.h
+++ b/linux/dummy.h
@@ -79,7 +79,6 @@
#define sys_set_robust_list sys_munmap
#define sys_setfsgid sys_setfsuid
#define sys_setgid sys_setuid
-#define sys_setns sys_inotify_rm_watch
#define sys_setregid sys_setreuid
#define sys_setresgid sys_setresuid
#define sys_swapoff sys_chdir
diff --git a/linux/syscall.h b/linux/syscall.h
index cfa9086..1943297 100644
--- a/linux/syscall.h
+++ b/linux/syscall.h
@@ -241,6 +241,7 @@ int sys_setgroups();
int sys_setgroups32();
int sys_sethostname();
int sys_setitimer();
+int sys_setns();
int sys_setpriority();
int sys_setresuid();
int sys_setreuid();
diff --git a/process.c b/process.c
index 1325319..4347a87 100644
--- a/process.c
+++ b/process.c
@@ -585,6 +585,17 @@ sys_clone(struct tcb *tcp)
}
int
+sys_setns(struct tcb *tcp)
+{
+ if (entering(tcp)) {
+ printfd(tcp, tcp->u_arg[0]);
+ tprints(", ");
+ printflags(clone_flags, tcp->u_arg[1], "CLONE_???");
+ }
+ return 0;
+}
+
+int
sys_unshare(struct tcb *tcp)
{
if (entering(tcp))