Compare commits

..

No commits in common. "77419ba463999a25922146ac424348adc2fe23af" and "e2357b1c8a87b610066b8b2a59517bcfb20b832e" have entirely different histories.

6 changed files with 71 additions and 86 deletions

View File

@ -118,7 +118,6 @@ PenaltyBreakString: 0
PenaltyExcessCharacter: 10
PenaltyReturnTypeOnItsOwnLine: 100
SpaceAfterCStyleCast: true
SpaceBeforeParens: ControlStatementsExceptForEachMacros
SpacesInAngles: true
TabWidth: 8
UseCRLF: false

View File

@ -291,7 +291,7 @@ int iovw_put(struct iovec_wrapper *iovw, void *data, size_t len) {
return -E2BIG;
if (!GREEDY_REALLOC(iovw->iovec, iovw->size_bytes, iovw->count + 1))
return -ENOMEM;
return log_oom();
iovw->iovec[iovw->count++] = IOVEC_MAKE(data, len);
return 0;
@ -303,7 +303,7 @@ int iovw_put_string_field(struct iovec_wrapper *iovw, const char *field, const c
x = strjoin(field, value);
if (!x)
return -ENOMEM;
return log_oom();
r = iovw_put(iovw, x, strlen(x));
if (r >= 0)

View File

@ -17,20 +17,6 @@
#if defined(__x86_64__) && defined(__ILP32__)
#define systemd_SC_arch_bias(x) ((x) | /* __X32_SYSCALL_BIT */ 0x40000000)
#elif defined(__ia64__)
# define systemd_SC_arch_bias(x) (1024 + (x))
#elif defined __alpha__
# define systemd_SC_arch_bias(x) (110 + (x))
#elif defined _MIPS_SIM
# if _MIPS_SIM == _MIPS_SIM_ABI32
# define systemd_SC_arch_bias(x) (4000 + (x))
# elif _MIPS_SIM == _MIPS_SIM_NABI32
# define systemd_SC_arch_bias(x) (6000 + (x))
# elif _MIPS_SIM == _MIPS_SIM_ABI64
# define systemd_SC_arch_bias(x) (5000 + (x))
# else
# error "Unknown MIPS ABI"
# endif
#else
#define systemd_SC_arch_bias(x) (x)
#endif
@ -65,11 +51,13 @@ static inline int missing_pivot_root(const char *new_root, const char *put_old)
# define systemd_NR_memfd_create 350
#elif defined _MIPS_SIM
# if _MIPS_SIM == _MIPS_SIM_ABI32
# define systemd_NR_memfd_create systemd_SC_arch_bias(354)
# elif _MIPS_SIM == _MIPS_SIM_NABI32
# define systemd_NR_memfd_create systemd_SC_arch_bias(318)
# elif _MIPS_SIM == _MIPS_SIM_ABI64
# define systemd_NR_memfd_create systemd_SC_arch_bias(314)
# define systemd_NR_memfd_create 4354
# endif
# if _MIPS_SIM == _MIPS_SIM_NABI32
# define systemd_NR_memfd_create 6318
# endif
# if _MIPS_SIM == _MIPS_SIM_ABI64
# define systemd_NR_memfd_create 5314
# endif
#elif defined __i386__
# define systemd_NR_memfd_create 356
@ -117,7 +105,7 @@ static inline int missing_memfd_create(const char *name, unsigned int flags) {
#elif defined(__aarch64__)
# define systemd_NR_getrandom 278
#elif defined(__ia64__)
# define systemd_NR_getrandom systemd_SC_arch_bias(318)
# define systemd_NR_getrandom 1339
#elif defined(__m68k__)
# define systemd_NR_getrandom 352
#elif defined(__s390x__)
@ -126,11 +114,13 @@ static inline int missing_memfd_create(const char *name, unsigned int flags) {
# define systemd_NR_getrandom 359
#elif defined _MIPS_SIM
# if _MIPS_SIM == _MIPS_SIM_ABI32
# define systemd_NR_getrandom systemd_SC_arch_bias(353)
# elif _MIPS_SIM == _MIPS_SIM_NABI32
# define systemd_NR_getrandom systemd_SC_arch_bias(317)
# elif _MIPS_SIM == _MIPS_SIM_ABI64
# define systemd_NR_getrandom systemd_SC_arch_bias(313)
# define systemd_NR_getrandom 4353
# endif
# if _MIPS_SIM == _MIPS_SIM_NABI32
# define systemd_NR_getrandom 6317
# endif
# if _MIPS_SIM == _MIPS_SIM_ABI64
# define systemd_NR_getrandom 5313
# endif
#elif defined(__arc__)
# define systemd_NR_getrandom 278
@ -196,14 +186,6 @@ static inline pid_t missing_gettid(void) {
# define systemd_NR_name_to_handle_at 335
#elif defined(__arc__)
# define systemd_NR_name_to_handle_at 264
#elif defined _MIPS_SIM
# if _MIPS_SIM == _MIPS_SIM_ABI32
# define systemd_NR_name_to_handle_at systemd_SC_arch_bias(339)
# elif _MIPS_SIM == _MIPS_SIM_NABI32
# define systemd_NR_name_to_handle_at systemd_SC_arch_bias(303)
# elif _MIPS_SIM == _MIPS_SIM_ABI64
# define systemd_NR_name_to_handle_at systemd_SC_arch_bias(298)
# endif
#else
# warning "name_to_handle_at number is not defined"
#endif
@ -257,14 +239,6 @@ static inline int missing_name_to_handle_at(int fd, const char *name, struct fil
# define systemd_NR_setns 339
#elif defined(__arc__)
# define systemd_NR_setns 268
#elif defined _MIPS_SIM
# if _MIPS_SIM == _MIPS_SIM_ABI32
# define systemd_NR_setns systemd_SC_arch_bias(344)
# elif _MIPS_SIM == _MIPS_SIM_NABI32
# define systemd_NR_setns systemd_SC_arch_bias(308)
# elif _MIPS_SIM == _MIPS_SIM_ABI64
# define systemd_NR_setns systemd_SC_arch_bias(303)
# endif
#else
# warning "setns() syscall number unknown for your architecture"
#endif
@ -316,11 +290,13 @@ static inline pid_t raw_getpid(void) {
# define systemd_NR_renameat2 276
#elif defined _MIPS_SIM
# if _MIPS_SIM == _MIPS_SIM_ABI32
# define systemd_NR_renameat2 systemd_SC_arch_bias(351)
# elif _MIPS_SIM == _MIPS_SIM_NABI32
# define systemd_NR_renameat2 systemd_SC_arch_bias(315)
# elif _MIPS_SIM == _MIPS_SIM_ABI64
# define systemd_NR_renameat2 systemd_SC_arch_bias(311)
# define systemd_NR_renameat2 4351
# endif
# if _MIPS_SIM == _MIPS_SIM_NABI32
# define systemd_NR_renameat2 6315
# endif
# if _MIPS_SIM == _MIPS_SIM_ABI64
# define systemd_NR_renameat2 5311
# endif
#elif defined __i386__
# define systemd_NR_renameat2 353
@ -429,14 +405,6 @@ static inline key_serial_t missing_request_key(const char *type, const char *des
# define systemd_NR_copy_file_range 379
#elif defined __arc__
# define systemd_NR_copy_file_range 285
#elif defined _MIPS_SIM
# if _MIPS_SIM == _MIPS_SIM_ABI32
# define systemd_NR_copy_file_range systemd_SC_arch_bias(360)
# elif _MIPS_SIM == _MIPS_SIM_NABI32
# define systemd_NR_copy_file_range systemd_SC_arch_bias(324)
# elif _MIPS_SIM == _MIPS_SIM_ABI64
# define systemd_NR_copy_file_range systemd_SC_arch_bias(320)
# endif
#else
# warning "copy_file_range() syscall number unknown for your architecture"
#endif
@ -489,14 +457,6 @@ static inline ssize_t missing_copy_file_range(int fd_in, loff_t *off_in,
# define systemd_NR_bpf 351
#elif defined __tilegx__
# define systemd_NR_bpf 280
#elif defined _MIPS_SIM
# if _MIPS_SIM == _MIPS_SIM_ABI32
# define systemd_NR_bpf systemd_SC_arch_bias(355)
# elif _MIPS_SIM == _MIPS_SIM_NABI32
# define systemd_NR_bpf systemd_SC_arch_bias(319)
# elif _MIPS_SIM == _MIPS_SIM_ABI64
# define systemd_NR_bpf systemd_SC_arch_bias(315)
# endif
#else
# warning "bpf() syscall number unknown for your architecture"
#endif
@ -547,11 +507,13 @@ static inline int missing_bpf(int cmd, union bpf_attr *attr, size_t size) {
# define systemd_NR_pkey_mprotect 384
# elif defined _MIPS_SIM
# if _MIPS_SIM == _MIPS_SIM_ABI32
# define systemd_NR_pkey_mprotect systemd_SC_arch_bias(363)
# elif _MIPS_SIM == _MIPS_SIM_NABI32
# define systemd_NR_pkey_mprotect systemd_SC_arch_bias(327)
# elif _MIPS_SIM == _MIPS_SIM_ABI64
# define systemd_NR_pkey_mprotect systemd_SC_arch_bias(323)
# define systemd_NR_pkey_mprotect 4363
# endif
# if _MIPS_SIM == _MIPS_SIM_NABI32
# define systemd_NR_pkey_mprotect 6327
# endif
# if _MIPS_SIM == _MIPS_SIM_ABI64
# define systemd_NR_pkey_mprotect 5323
# endif
# else
# warning "pkey_mprotect() syscall number unknown for your architecture"
@ -588,14 +550,6 @@ assert_cc(__NR_pkey_mprotect == systemd_NR_pkey_mprotect);
# define systemd_NR_statx 360
#elif defined __x86_64__
# define systemd_NR_statx systemd_SC_arch_bias(332)
#elif defined _MIPS_SIM
# if _MIPS_SIM == _MIPS_SIM_ABI32
# define systemd_NR_statx systemd_SC_arch_bias(366)
# elif _MIPS_SIM == _MIPS_SIM_NABI32
# define systemd_NR_statx systemd_SC_arch_bias(330)
# elif _MIPS_SIM == _MIPS_SIM_ABI64
# define systemd_NR_statx systemd_SC_arch_bias(326)
# endif
#else
# warning "statx() syscall number unknown for your architecture"
#endif
@ -680,7 +634,23 @@ static inline long missing_get_mempolicy(int *mode, unsigned long *nodemask,
/* ======================================================================= */
/* should be always defined, see kernel 39036cd2727395c3369b1051005da74059a85317 */
#if defined __alpha__
# define systemd_NR_pidfd_send_signal 534
#elif defined _MIPS_SIM
# if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */
# define systemd_NR_pidfd_send_signal (424 + 4000)
# endif
# if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */
# define systemd_NR_pidfd_send_signal (424 + 6000)
# endif
# if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */
# define systemd_NR_pidfd_send_signal (424 + 5000)
# endif
#elif defined __ia64__
# define systemd_NR_pidfd_send_signal (424 + 1024)
#else
# define systemd_NR_pidfd_send_signal systemd_SC_arch_bias(424)
#endif
/* may be (invalid) negative number due to libseccomp, see PR 13319 */
#if defined __NR_pidfd_send_signal && __NR_pidfd_send_signal >= 0
@ -708,7 +678,23 @@ static inline int missing_pidfd_send_signal(int fd, int sig, siginfo_t *info, un
#endif
/* should be always defined, see kernel 7615d9e1780e26e0178c93c55b73309a5dc093d7 */
#if defined __alpha__
# define systemd_NR_pidfd_open 544
#elif defined _MIPS_SIM
# if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */
# define systemd_NR_pidfd_open (434 + 4000)
# endif
# if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */
# define systemd_NR_pidfd_open (434 + 6000)
# endif
# if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */
# define systemd_NR_pidfd_open (434 + 5000)
# endif
#elif defined __ia64__
# define systemd_NR_pidfd_open (434 + 1024)
#else
# define systemd_NR_pidfd_open systemd_SC_arch_bias(434)
#endif
/* may be (invalid) negative number due to libseccomp, see PR 13319 */
#if defined __NR_pidfd_open && __NR_pidfd_open >= 0

View File

@ -422,7 +422,7 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi
.ipv6_accept_ra_use_onlink_prefix = true,
.ipv6_accept_ra_route_table = RT_TABLE_MAIN,
.ipv6_accept_ra_route_table_set = false,
.ipv6_accept_ra_start_dhcp6_client = IPV6_ACCEPT_RA_START_DHCP6_CLIENT_YES,
.ipv6_accept_ra_start_dhcp6_client = true,
.can_triple_sampling = -1,
.can_termination = -1,

View File

@ -8,6 +8,7 @@
#include "alloc-util.h"
#include "bpf-program.h"
#include "fd-util.h"
#include "log.h"
#include "memory-util.h"
#include "missing_syscall.h"
#include "path-util.h"
@ -17,7 +18,7 @@ int bpf_program_new(uint32_t prog_type, BPFProgram **ret) {
p = new0(BPFProgram, 1);
if (!p)
return -ENOMEM;
return log_oom();
p->n_ref = 1;
p->prog_type = prog_type;

View File

@ -303,8 +303,7 @@ tests += [
[['src/test/test-libcrypt-util.c'],
[],
[],
'', 'timeout=120'],
[]],
[['src/test/test-offline-passwd.c',
'src/shared/offline-passwd.c',