blob: 6935fbfec1eb11abf144239070ef3811cf7f36d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
/*
* Copyright (c) 2014-2021 The strace developers.
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include "defs.h"
static void
decode_chmod(struct tcb *tcp, const int offset)
{
/* pathname */
printpath(tcp, tcp->u_arg[offset]);
tprint_arg_next();
/* mode */
print_numeric_umode_t(tcp->u_arg[offset + 1]);
}
SYS_FUNC(chmod)
{
decode_chmod(tcp, 0);
return RVAL_DECODED;
}
SYS_FUNC(fchmodat)
{
/* dirfd */
print_dirfd(tcp, tcp->u_arg[0]);
tprint_arg_next();
decode_chmod(tcp, 1);
return RVAL_DECODED;
}
SYS_FUNC(fchmod)
{
/* fd */
printfd(tcp, tcp->u_arg[0]);
tprint_arg_next();
/* mode */
print_numeric_umode_t(tcp->u_arg[1]);
return RVAL_DECODED;
}
|