Compare commits
12 Commits
44c2c9a036
...
73f3600970
Author | SHA1 | Date |
---|---|---|
![]() |
73f3600970 | |
![]() |
bf5db803e7 | |
![]() |
cba44a1975 | |
![]() |
96334a84f2 | |
![]() |
e809b6a7e9 | |
![]() |
e0208363e5 | |
![]() |
790a4ee5cf | |
![]() |
63f420dedc | |
![]() |
78b6501311 | |
![]() |
92e8293413 | |
![]() |
b8e799caa8 | |
![]() |
50261211d6 |
|
@ -32,23 +32,23 @@ The following exceptions apply:
|
|||
* some sources under src/udev/ are licensed under **GPL-2.0-or-later**,
|
||||
so all udev programs (`systemd-udevd`, `udevadm`, and the udev builtins
|
||||
and test programs) are also distributed under **GPL-2.0-or-later**.
|
||||
* the header files contained in src/basic/include/linux are copied
|
||||
* the header files contained in src/basic/linux/linux are copied
|
||||
verbatim from the Linux kernel source tree and are licensed under **GPL-2.0 WITH
|
||||
Linux-syscall-note** and are used within the scope of the Linux-syscall-note
|
||||
exception provisions
|
||||
* the following sources are licensed under the **LGPL-2.0-or-later** license:
|
||||
- src/basic/utf8.c
|
||||
- src/shared/initreq.h
|
||||
* the src/basic/include/linux/bpf_insn.h header is copied from the Linux kernel
|
||||
* the src/basic/linux/bpf_insn.h header is copied from the Linux kernel
|
||||
source tree and is licensed under either **BSD-2-Clause** or **GPL-2.0-only**,
|
||||
and thus is included in the systemd build under the BSD-2-Clause license.
|
||||
* The src/basic/include/linux/wireguard.h header is copied from the Linux kernel
|
||||
* The src/basic/linux/linux/wireguard.h header is copied from the Linux kernel
|
||||
source tree and is licensed under either **MIT** or **GPL-2.0 WITH Linux-syscall-note**,
|
||||
and thus is included in the systemd build under the MIT license.
|
||||
* the following sources are licensed under the **MIT** license (in case of our
|
||||
scripts, to facilitate copying and reuse of those helpers to other projects):
|
||||
- hwdb.d/parse_hwdb.py
|
||||
- src/basic/include/linux/batman_adv.h
|
||||
- src/basic/linux/linux/batman_adv.h
|
||||
- src/basic/sparse-endian.h
|
||||
- tools/catalog-report.py
|
||||
* the following sources are licensed under the **CC0-1.0** license:
|
||||
|
|
3
NEWS
3
NEWS
|
@ -96,9 +96,6 @@ CHANGES WITH 258 in spe:
|
|||
continue to work, update to xf86-input-evdev >= 2.11.0 and
|
||||
xf86-input-libinput >= 1.5.0 before updating to systemd >= 258.
|
||||
|
||||
* The meson option 'integration-tests' has been deprecated, and will be
|
||||
removed in a future release.
|
||||
|
||||
— <place>, <date>
|
||||
|
||||
CHANGES WITH 257:
|
||||
|
|
|
@ -5,7 +5,7 @@ set -e
|
|||
# Exclude following paths from the Coccinelle transformations
|
||||
EXCLUDED_PATHS=(
|
||||
"src/boot/efi/*"
|
||||
"src/basic/include/linux/*"
|
||||
"src/basic/linux/*"
|
||||
# Symlinked to test-bus-vtable-cc.cc, which causes issues with the IN_SET macro
|
||||
"src/libsystemd/sd-bus/test-bus-vtable.c"
|
||||
"src/libsystemd/sd-journal/lookup3.c"
|
||||
|
|
|
@ -2061,8 +2061,8 @@ basic_includes = [
|
|||
'.',
|
||||
),
|
||||
include_directories(
|
||||
'src/basic/include',
|
||||
is_system : true,
|
||||
'src/basic/linux',
|
||||
is_system : true
|
||||
),
|
||||
]
|
||||
|
||||
|
|
|
@ -77,20 +77,6 @@ ENV{DDC_DEVICE}=="?*", TAG+="uaccess"
|
|||
# media player raw devices (for user-mode drivers, Android SDK, etc.)
|
||||
SUBSYSTEM=="usb", ENV{ID_MEDIA_PLAYER}=="?*", TAG+="uaccess"
|
||||
|
||||
# Android devices (ADB DbC, ADB, Fastboot)
|
||||
# Used to interact with devices over Android Debug Bridge and Fastboot protocols, see:
|
||||
# * https://developer.android.com/tools/adb
|
||||
# * https://source.android.com/docs/setup/test/running
|
||||
# * https://source.android.com/docs/setup/test/flash
|
||||
#
|
||||
# The bInterfaceClass and bInterfaceSubClass used are documented in source code here:
|
||||
# * https://android.googlesource.com/platform/packages/modules/adb/+/d0db47dcdf941673f405e1095e6ffb5e565902e5/adb.h#199
|
||||
# * https://android.googlesource.com/platform/system/core/+/7199051aaf0ddfa2849650933119307327d8669c/fastboot/fastboot.cpp#244
|
||||
#
|
||||
# Since it's using a generic vendor specific interface class, this can potentially result
|
||||
# in a rare case where non-ADB/Fastboot device ends up with an ID_DEBUG_APPLIANCE="android".
|
||||
SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="*:dc0201:*|*:ff4201:*|*:ff4203:*", ENV{ID_DEBUG_APPLIANCE}="android"
|
||||
|
||||
# software-defined radio communication devices
|
||||
ENV{ID_SOFTWARE_RADIO}=="?*", TAG+="uaccess"
|
||||
|
||||
|
@ -125,7 +111,4 @@ SUBSYSTEM=="hidraw", ENV{ID_HARDWARE_WALLET}=="1", TAG+="uaccess"
|
|||
# As defined in https://en.wikipedia.org/wiki/3Dconnexion
|
||||
SUBSYSTEM=="hidraw", ENV{ID_INPUT_3D_MOUSE}=="1", TAG+="uaccess"
|
||||
|
||||
# Debug interfaces (e.g. Android Debug Bridge)
|
||||
ENV{ID_DEBUG_APPLIANCE}=="?*", TAG+="uaccess"
|
||||
|
||||
LABEL="uaccess_end"
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include "sd-bus.h"
|
||||
|
||||
#include "memory-util.h"
|
||||
#include "time-util.h"
|
||||
#include "unit-def.h"
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ static void log_syntax_callback(const char *unit, int level, void *userdata) {
|
|||
|
||||
r = set_put_strdup(s, unit);
|
||||
if (r < 0) {
|
||||
set_free(*s);
|
||||
set_free_free(*s);
|
||||
*s = POINTER_MAX;
|
||||
}
|
||||
}
|
||||
|
@ -265,7 +265,7 @@ static int verify_unit(Unit *u, bool check_man, const char *root) {
|
|||
static void set_destroy_ignore_pointer_max(Set **s) {
|
||||
if (*s == POINTER_MAX)
|
||||
return;
|
||||
set_free(*s);
|
||||
set_free_free(*s);
|
||||
}
|
||||
|
||||
int verify_units(
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "assert-util.h"
|
||||
#include "macro.h"
|
||||
#include "memory-util.h"
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "assert-util.h"
|
||||
#include "macro.h"
|
||||
|
||||
extern int saved_argc;
|
||||
|
|
|
@ -1,84 +0,0 @@
|
|||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "assert-fundamental.h"
|
||||
#include "macro.h"
|
||||
|
||||
/* Logging for various assertions */
|
||||
|
||||
void log_set_assert_return_is_critical(bool b);
|
||||
bool log_get_assert_return_is_critical(void) _pure_;
|
||||
|
||||
_noreturn_ void log_assert_failed(const char *text, const char *file, int line, const char *func);
|
||||
_noreturn_ void log_assert_failed_unreachable(const char *file, int line, const char *func);
|
||||
void log_assert_failed_return(const char *text, const char *file, int line, const char *func);
|
||||
|
||||
#ifdef __COVERITY__
|
||||
|
||||
/* Use special definitions of assertion macros in order to prevent
|
||||
* false positives of ASSERT_SIDE_EFFECT on Coverity static analyzer
|
||||
* for uses of assert_se() and assert_return().
|
||||
*
|
||||
* These definitions make expression go through a (trivial) function
|
||||
* call to ensure they are not discarded. Also use ! or !! to ensure
|
||||
* the boolean expressions are seen as such.
|
||||
*
|
||||
* This technique has been described and recommended in:
|
||||
* https://community.synopsys.com/s/question/0D534000046Yuzb/suppressing-assertsideeffect-for-functions-that-allow-for-sideeffects
|
||||
*/
|
||||
|
||||
extern void __coverity_panic__(void);
|
||||
|
||||
static inline void __coverity_check__(int condition) {
|
||||
if (!condition)
|
||||
__coverity_panic__();
|
||||
}
|
||||
|
||||
static inline int __coverity_check_and_return__(int condition) {
|
||||
return condition;
|
||||
}
|
||||
|
||||
#define assert_message_se(expr, message) __coverity_check__(!!(expr))
|
||||
|
||||
#define assert_log(expr, message) __coverity_check_and_return__(!!(expr))
|
||||
|
||||
#else /* ! __COVERITY__ */
|
||||
|
||||
#define assert_message_se(expr, message) \
|
||||
do { \
|
||||
if (_unlikely_(!(expr))) \
|
||||
log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
|
||||
} while (false)
|
||||
|
||||
#define assert_log(expr, message) ((_likely_(expr)) \
|
||||
? (true) \
|
||||
: (log_assert_failed_return(message, PROJECT_FILE, __LINE__, __func__), false))
|
||||
|
||||
#endif /* __COVERITY__ */
|
||||
|
||||
#define assert_se(expr) assert_message_se(expr, #expr)
|
||||
|
||||
/* We override the glibc assert() here. */
|
||||
#undef assert
|
||||
#ifdef NDEBUG
|
||||
#define assert(expr) ({ if (!(expr)) __builtin_unreachable(); })
|
||||
#else
|
||||
#define assert(expr) assert_message_se(expr, #expr)
|
||||
#endif
|
||||
|
||||
#define assert_not_reached() \
|
||||
log_assert_failed_unreachable(PROJECT_FILE, __LINE__, __func__)
|
||||
|
||||
#define assert_return(expr, r) \
|
||||
do { \
|
||||
if (!assert_log(expr, #expr)) \
|
||||
return (r); \
|
||||
} while (false)
|
||||
|
||||
#define assert_return_errno(expr, r, err) \
|
||||
do { \
|
||||
if (!assert_log(expr, #expr)) { \
|
||||
errno = err; \
|
||||
return (r); \
|
||||
} \
|
||||
} while (false)
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "assert-util.h"
|
||||
#include "macro.h"
|
||||
|
||||
static inline void* safe_dlclose(void *dl) {
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "assert-util.h"
|
||||
#include "macro.h"
|
||||
|
||||
/* strerror(3) says that glibc uses a maximum length of 1024 bytes. */
|
||||
|
|
|
@ -1002,13 +1002,13 @@ int fd_verify_safe_flags_full(int fd, int extra_flags) {
|
|||
if (flags < 0)
|
||||
return -errno;
|
||||
|
||||
unexpected_flags = flags & ~(O_ACCMODE_STRICT|O_NOFOLLOW|RAW_O_LARGEFILE|extra_flags);
|
||||
unexpected_flags = flags & ~(O_ACCMODE|O_NOFOLLOW|RAW_O_LARGEFILE|extra_flags);
|
||||
if (unexpected_flags != 0)
|
||||
return log_debug_errno(SYNTHETIC_ERRNO(EREMOTEIO),
|
||||
"Unexpected flags set for extrinsic fd: 0%o",
|
||||
(unsigned) unexpected_flags);
|
||||
|
||||
return flags & (O_ACCMODE_STRICT | extra_flags); /* return the flags variable, but remove the noise */
|
||||
return flags & (O_ACCMODE | extra_flags); /* return the flags variable, but remove the noise */
|
||||
}
|
||||
|
||||
int read_nr_open(void) {
|
||||
|
@ -1133,7 +1133,7 @@ int fds_are_same_mount(int fd1, int fd2) {
|
|||
}
|
||||
|
||||
const char* accmode_to_string(int flags) {
|
||||
switch (flags & O_ACCMODE_STRICT) {
|
||||
switch (flags & O_ACCMODE) {
|
||||
case O_RDONLY:
|
||||
return "ro";
|
||||
case O_WRONLY:
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include <sys/socket.h>
|
||||
|
||||
#include "macro.h"
|
||||
#include "memory-util.h"
|
||||
#include "missing_fcntl.h"
|
||||
#include "stdio-util.h"
|
||||
|
||||
|
|
|
@ -1036,7 +1036,7 @@ int open_mkdir_at_full(int dirfd, const char *path, int flags, XOpenFlags xopen_
|
|||
|
||||
if (flags & ~(O_RDONLY|O_CLOEXEC|O_DIRECTORY|O_EXCL|O_NOATIME|O_NOFOLLOW|O_PATH))
|
||||
return -EINVAL;
|
||||
if ((flags & O_ACCMODE_STRICT) != O_RDONLY)
|
||||
if ((flags & O_ACCMODE) != O_RDONLY)
|
||||
return -EINVAL;
|
||||
|
||||
/* Note that O_DIRECTORY|O_NOFOLLOW is implied, but we allow specifying it anyway. The following
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
#include "dlfcn-util.h"
|
||||
#include "macro.h"
|
||||
#include "memory-util.h"
|
||||
|
||||
extern DLSYM_PROTOTYPE(gcry_md_close);
|
||||
extern DLSYM_PROTOTYPE(gcry_md_copy);
|
||||
|
|
|
@ -90,8 +90,6 @@ OrderedHashmap* _ordered_hashmap_new(const struct hash_ops *hash_ops HASHMAP_DE
|
|||
|
||||
#define hashmap_free_and_replace(a, b) \
|
||||
free_and_replace_full(a, b, hashmap_free)
|
||||
#define ordered_hashmap_free_and_replace(a, b) \
|
||||
free_and_replace_full(a, b, ordered_hashmap_free)
|
||||
|
||||
HashmapBase* _hashmap_free(HashmapBase *h, free_func_t default_free_key, free_func_t default_free_value);
|
||||
static inline Hashmap* hashmap_free(Hashmap *h) {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue