Now fw_nftables_add_masquerade() should return EOPNOTSUPP or so if
unprivileged. It is not necessary to skip whole tests earlier.
/* SPDX-License-Identifier: LGPL-2.1-or-later */
-#include <stdlib.h>
-#include <unistd.h>
-
#include "sd-netlink.h"
#include "firewall-util.h"
static int intro(void) {
int r;
- if (getuid() != 0)
- return log_tests_skipped("not root");
-
ASSERT_OK_ERRNO(setenv("SYSTEMD_FIREWALL_UTIL_NFT_TABLE_NAME", "io.systemd-test.nat", /* overwrite = */ true));
ASSERT_OK_ERRNO(setenv("SYSTEMD_FIREWALL_UTIL_DNAT_MAP_NAME", "test_map_port_ipport", /* overwrite = */ true));