From 37e94bd191701a08e0081b2027cfbede6d76a21c Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Sun, 4 Jun 2023 08:13:23 +0200 Subject: treewide: Change to GPLv2, add LICENSES, missing headers As discussed with Alice -- 'reuse lint' passes now. Signed-off-by: Stefano Brivio --- cooker/calls/fs.c | 2 +- cooker/calls/fs.h | 2 +- cooker/calls/ioctl.c | 310 ++++++++++++++++++++++++------------------------- cooker/calls/ioctl.h | 2 +- cooker/calls/net.c | 4 +- cooker/calls/net.h | 2 +- cooker/calls/process.c | 2 +- cooker/calls/process.h | 2 +- 8 files changed, 163 insertions(+), 163 deletions(-) (limited to 'cooker/calls') diff --git a/cooker/calls/fs.c b/cooker/calls/fs.c index 924907d..013dacf 100644 --- a/cooker/calls/fs.c +++ b/cooker/calls/fs.c @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-3.0-or-later +// SPDX-License-Identifier: GPL-2.0-or-later /* seitan - Syscall Expressive Interpreter, Transformer and Notifier * diff --git a/cooker/calls/fs.h b/cooker/calls/fs.h index 2e3c06b..ad2f218 100644 --- a/cooker/calls/fs.h +++ b/cooker/calls/fs.h @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: GPL-3.0-or-later +/* SPDX-License-Identifier: GPL-2.0-or-later * Copyright 2023 Red Hat GmbH * Author: Stefano Brivio */ diff --git a/cooker/calls/ioctl.c b/cooker/calls/ioctl.c index a60b834..c9f01d0 100644 --- a/cooker/calls/ioctl.c +++ b/cooker/calls/ioctl.c @@ -1,155 +1,155 @@ -// SPDX-License-Identifier: GPL-3.0-or-later - -/* seitan - Syscall Expressive Interpreter, Transformer and Notifier - * - * cooker/calls/ioctl.c - Description of known ioctl(2) requests - * - * Copyright 2023 Red Hat GmbH - * Authors: Alice Frosi - * Stefano Brivio - */ - -/* -fd = ioctl_ns(fd, request) -n = ioctl_tty(fd, cmd, argp) -e = ioctl_iflags(fd, cmd, attr) -*/ - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include "../cooker.h" -#include "../calls.h" - -static struct num request[] = { - { "FS_IOC_GETFLAGS", FS_IOC_GETFLAGS }, /* ioctl_iflags */ - { "FS_IOC_SETFLAGS", FS_IOC_SETFLAGS }, - - { "NS_GET_USERNS", NS_GET_USERNS }, /* ioctl_ns*/ - { "NS_GET_PARENT", NS_GET_PARENT }, - - { "TCGETS", TCGETS }, /* ioctl_tty */ - { "TCSETS", TCSETS }, - { "TCSETSW", TCSETSW }, - { "TCSETSF", TCSETSF }, - - { "TUNSETIFF", TUNSETIFF }, /* no man page? */ - - { 0 }, -}; - -static struct num attr[] = { - { "FS_APPEND_FL", FS_APPEND_FL }, - { "FS_COMPR_FL", FS_COMPR_FL }, - { "FS_DIRSYNC_FL", FS_DIRSYNC_FL }, - { "FS_IMMUTABLE_FL", FS_IMMUTABLE_FL }, - { "FS_JOURNAL_DATA_FL", FS_JOURNAL_DATA_FL }, - { "FS_NOATIME_FL", FS_NOATIME_FL }, - { "FS_NOCOW_FL", FS_NOCOW_FL }, - { "FS_NODUMP_FL", FS_NODUMP_FL }, - { "FS_NOTAIL_FL", FS_NOTAIL_FL }, - { "FS_PROJINHERIT_FL", FS_PROJINHERIT_FL }, - { "FS_SECRM_FL", FS_SECRM_FL }, - { "FS_SYNC_FL", FS_SYNC_FL }, - { "FS_TOPDIR_FL", FS_TOPDIR_FL }, - { "FS_UNRM_FL", FS_UNRM_FL }, -}; - -static struct num tun_ifr_flags[] = { - { "IFF_TUN", IFF_TUN }, - { 0 }, -}; - -static struct field tun_ifr[] = { /* netdevice(7) */ - { - "name", STRING, 0, - offsetof(struct ifreq, ifr_name), - IFNAMSIZ, { 0 }, - }, - { - "flags", INT, /* One allowed at a time? */ 0, - offsetof(struct ifreq, ifr_flags), - 0, { .d_num = tun_ifr_flags }, - }, -}; - -static struct select_num ioctl_request_arg[] = { - { FS_IOC_GETFLAGS, - { 2, - { - "argp", INT, FLAGS, - sizeof(int), 0, - { .d_num = attr } - } - } - }, - { FS_IOC_SETFLAGS, - { 2, - { - "argp", INT, FLAGS, - sizeof(int), 0, - { .d_num = attr } - } - } - }, - { TUNSETIFF, - { 2, - { - "ifr", STRUCT, 0, - sizeof(struct ifreq), 0, - { .d_struct = tun_ifr } - } - } - }, - { 0 }, -}; - -static struct field ioctl_request = { - "request", INT, 0, 0, 0, { .d_num = request }, -}; - -static struct select ioctl_request_select = { - &ioctl_request, { .d_num = ioctl_request_arg } -}; - -static struct arg ioctl_args[] = { - { 0, - { - "path", FDPATH, 0, 0, 0, - { 0 } - } - }, - { 0, - { - "fd", INT, 0, 0, 0, - { 0 } - } - }, - { 1, - { - "request", SELECT, 0, 0, 0, - { .d_select = &ioctl_request_select } - } - }, - { 2, - { - "arg", SELECTED, 0, -1, 0, - { 0 } - } - }, - { 0 }, -}; - -struct call syscalls_ioctl[] = { - { __NR_ioctl, "ioctl", ioctl_args }, - { 0 }, -}; +// SPDX-License-Identifier: GPL-2.0-or-later + +/* seitan - Syscall Expressive Interpreter, Transformer and Notifier + * + * cooker/calls/ioctl.c - Description of known ioctl(2) requests + * + * Copyright 2023 Red Hat GmbH + * Authors: Alice Frosi + * Stefano Brivio + */ + +/* +fd = ioctl_ns(fd, request) +n = ioctl_tty(fd, cmd, argp) +e = ioctl_iflags(fd, cmd, attr) +*/ + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +#include "../cooker.h" +#include "../calls.h" + +static struct num request[] = { + { "FS_IOC_GETFLAGS", FS_IOC_GETFLAGS }, /* ioctl_iflags */ + { "FS_IOC_SETFLAGS", FS_IOC_SETFLAGS }, + + { "NS_GET_USERNS", NS_GET_USERNS }, /* ioctl_ns*/ + { "NS_GET_PARENT", NS_GET_PARENT }, + + { "TCGETS", TCGETS }, /* ioctl_tty */ + { "TCSETS", TCSETS }, + { "TCSETSW", TCSETSW }, + { "TCSETSF", TCSETSF }, + + { "TUNSETIFF", TUNSETIFF }, /* no man page? */ + + { 0 }, +}; + +static struct num attr[] = { + { "FS_APPEND_FL", FS_APPEND_FL }, + { "FS_COMPR_FL", FS_COMPR_FL }, + { "FS_DIRSYNC_FL", FS_DIRSYNC_FL }, + { "FS_IMMUTABLE_FL", FS_IMMUTABLE_FL }, + { "FS_JOURNAL_DATA_FL", FS_JOURNAL_DATA_FL }, + { "FS_NOATIME_FL", FS_NOATIME_FL }, + { "FS_NOCOW_FL", FS_NOCOW_FL }, + { "FS_NODUMP_FL", FS_NODUMP_FL }, + { "FS_NOTAIL_FL", FS_NOTAIL_FL }, + { "FS_PROJINHERIT_FL", FS_PROJINHERIT_FL }, + { "FS_SECRM_FL", FS_SECRM_FL }, + { "FS_SYNC_FL", FS_SYNC_FL }, + { "FS_TOPDIR_FL", FS_TOPDIR_FL }, + { "FS_UNRM_FL", FS_UNRM_FL }, +}; + +static struct num tun_ifr_flags[] = { + { "IFF_TUN", IFF_TUN }, + { 0 }, +}; + +static struct field tun_ifr[] = { /* netdevice(7) */ + { + "name", STRING, 0, + offsetof(struct ifreq, ifr_name), + IFNAMSIZ, { 0 }, + }, + { + "flags", INT, /* One allowed at a time? */ 0, + offsetof(struct ifreq, ifr_flags), + 0, { .d_num = tun_ifr_flags }, + }, +}; + +static struct select_num ioctl_request_arg[] = { + { FS_IOC_GETFLAGS, + { 2, + { + "argp", INT, FLAGS, + sizeof(int), 0, + { .d_num = attr } + } + } + }, + { FS_IOC_SETFLAGS, + { 2, + { + "argp", INT, FLAGS, + sizeof(int), 0, + { .d_num = attr } + } + } + }, + { TUNSETIFF, + { 2, + { + "ifr", STRUCT, 0, + sizeof(struct ifreq), 0, + { .d_struct = tun_ifr } + } + } + }, + { 0 }, +}; + +static struct field ioctl_request = { + "request", INT, 0, 0, 0, { .d_num = request }, +}; + +static struct select ioctl_request_select = { + &ioctl_request, { .d_num = ioctl_request_arg } +}; + +static struct arg ioctl_args[] = { + { 0, + { + "path", FDPATH, 0, 0, 0, + { 0 } + } + }, + { 0, + { + "fd", INT, 0, 0, 0, + { 0 } + } + }, + { 1, + { + "request", SELECT, 0, 0, 0, + { .d_select = &ioctl_request_select } + } + }, + { 2, + { + "arg", SELECTED, 0, -1, 0, + { 0 } + } + }, + { 0 }, +}; + +struct call syscalls_ioctl[] = { + { __NR_ioctl, "ioctl", ioctl_args }, + { 0 }, +}; diff --git a/cooker/calls/ioctl.h b/cooker/calls/ioctl.h index a06a9bc..7072111 100644 --- a/cooker/calls/ioctl.h +++ b/cooker/calls/ioctl.h @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: GPL-3.0-or-later +/* SPDX-License-Identifier: GPL-2.0-or-later * Copyright 2023 Red Hat GmbH * Author: Stefano Brivio */ diff --git a/cooker/calls/net.c b/cooker/calls/net.c index 52ebc1e..746a08e 100644 --- a/cooker/calls/net.c +++ b/cooker/calls/net.c @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-3.0-or-later +// SPDX-License-Identifier: GPL-2.0-or-later /* seitan - Syscall Expressive Interpreter, Transformer and Notifier * @@ -228,7 +228,7 @@ static struct arg connect_args[] = { { "addr", SELECT, 0, 0, - sizeof(struct sockaddr_storage), + sizeof(struct sockaddr_un), { .d_select = &connect_addr_select }, }, }, diff --git a/cooker/calls/net.h b/cooker/calls/net.h index 105bf4a..7eb852d 100644 --- a/cooker/calls/net.h +++ b/cooker/calls/net.h @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: GPL-3.0-or-later +/* SPDX-License-Identifier: GPL-2.0-or-later * Copyright 2023 Red Hat GmbH * Author: Stefano Brivio */ diff --git a/cooker/calls/process.c b/cooker/calls/process.c index b133629..b7a92f0 100644 --- a/cooker/calls/process.c +++ b/cooker/calls/process.c @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-3.0-or-later +// SPDX-License-Identifier: GPL-2.0-or-later /* seitan - Syscall Expressive Interpreter, Transformer and Notifier * diff --git a/cooker/calls/process.h b/cooker/calls/process.h index 5e214ef..c7d81bb 100644 --- a/cooker/calls/process.h +++ b/cooker/calls/process.h @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: GPL-3.0-or-later +/* SPDX-License-Identifier: GPL-2.0-or-later * Copyright 2023 Red Hat GmbH * Author: Stefano Brivio */ -- cgit v1.2.3