file.c: move chown, fchown, and fchownat parsers to a separate file
* chown.c: New file. * Makefile.am (strace_SOURCES): Add it. * file.c (sys_chown, sys_fchownat, sys_fchown): Move to chown.c.
This commit is contained in:
parent
43b110b7d1
commit
2b7a53bff5
@ -23,6 +23,7 @@ strace_SOURCES = \
|
||||
cacheflush.c \
|
||||
capability.c \
|
||||
chmod.c \
|
||||
chown.c \
|
||||
count.c \
|
||||
desc.c \
|
||||
dirent.c \
|
||||
|
37
chown.c
Normal file
37
chown.c
Normal file
@ -0,0 +1,37 @@
|
||||
#include "defs.h"
|
||||
|
||||
int
|
||||
sys_chown(struct tcb *tcp)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
printpath(tcp, tcp->u_arg[0]);
|
||||
printuid(", ", tcp->u_arg[1]);
|
||||
printuid(", ", tcp->u_arg[2]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
sys_fchownat(struct tcb *tcp)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
print_dirfd(tcp, tcp->u_arg[0]);
|
||||
printpath(tcp, tcp->u_arg[1]);
|
||||
printuid(", ", tcp->u_arg[2]);
|
||||
printuid(", ", tcp->u_arg[3]);
|
||||
tprints(", ");
|
||||
printflags(at_flags, tcp->u_arg[4], "AT_???");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
sys_fchown(struct tcb *tcp)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
printfd(tcp, tcp->u_arg[0]);
|
||||
printuid(", ", tcp->u_arg[1]);
|
||||
printuid(", ", tcp->u_arg[2]);
|
||||
}
|
||||
return 0;
|
||||
}
|
36
file.c
36
file.c
@ -1388,39 +1388,3 @@ sys_renameat2(struct tcb *tcp)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
sys_chown(struct tcb *tcp)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
printpath(tcp, tcp->u_arg[0]);
|
||||
printuid(", ", tcp->u_arg[1]);
|
||||
printuid(", ", tcp->u_arg[2]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
sys_fchownat(struct tcb *tcp)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
print_dirfd(tcp, tcp->u_arg[0]);
|
||||
printpath(tcp, tcp->u_arg[1]);
|
||||
printuid(", ", tcp->u_arg[2]);
|
||||
printuid(", ", tcp->u_arg[3]);
|
||||
tprints(", ");
|
||||
printflags(at_flags, tcp->u_arg[4], "AT_???");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
sys_fchown(struct tcb *tcp)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
printfd(tcp, tcp->u_arg[0]);
|
||||
printuid(", ", tcp->u_arg[1]);
|
||||
printuid(", ", tcp->u_arg[2]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user