/
githubmirror
/
strace
Обзор
Документация
Войти
/
githubmirror
/
strace
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v7.1
src/access.c
59 строк
968 B
Dmitry V. Levin
Update copyright headers
05 авг 2025, 11:00
05 авг 2025, 11:00
7db24b3
Код
Авторство
О чём код?
/* * Copyright (c) 2014-2025 The strace developers. * All rights reserved. * * SPDX-License-Identifier: LGPL-2.1-or-later */ #include "defs.h" #include <fcntl.h> #include "xlat/access_modes.h" #include "xlat/faccessat_flags.h" static void decode_access(struct tcb *tcp, int offset) { /* pathname */ tprints_arg_name("pathname"); printpath(tcp, tcp->u_arg[offset]); /* mode */ tprints_arg_next_name("mode"); printflags(access_modes, tcp->u_arg[offset + 1], "?_OK"); } SYS_FUNC(access) { decode_access(tcp, 0); return RVAL_DECODED; } static void decode_faccessat(struct tcb *tcp) { /* dirfd */ tprints_arg_name("dirfd"); print_dirfd(tcp, tcp->u_arg[0]); tprint_arg_next(); decode_access(tcp, 1); } SYS_FUNC(faccessat) { decode_faccessat(tcp); return RVAL_DECODED; } SYS_FUNC(faccessat2) { decode_faccessat(tcp); /* flags */ tprints_arg_next_name("flags"); printflags(faccessat_flags, tcp->u_arg[3], "AT_???"); return RVAL_DECODED; }