summaryrefslogtreecommitdiff
path: root/src/basic
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/alloc-util.c2
-rw-r--r--src/basic/alloc-util.h2
-rw-r--r--src/basic/audit-util.c2
-rw-r--r--src/basic/audit-util.h2
-rw-r--r--src/basic/build.h2
-rw-r--r--src/basic/bus-label.c2
-rw-r--r--src/basic/bus-label.h2
-rw-r--r--src/basic/cap-list.c2
-rw-r--r--src/basic/cap-list.h2
-rw-r--r--src/basic/capability-util.c2
-rw-r--r--src/basic/capability-util.h2
-rw-r--r--src/basic/cgroup-util.c2
-rw-r--r--src/basic/cgroup-util.h2
-rw-r--r--src/basic/conf-files.c2
-rw-r--r--src/basic/conf-files.h2
-rw-r--r--src/basic/copy.c105
-rw-r--r--src/basic/copy.h2
-rw-r--r--src/basic/def.h2
-rw-r--r--src/basic/dirent-util.c2
-rw-r--r--src/basic/dirent-util.h2
-rw-r--r--src/basic/env-util.c2
-rw-r--r--src/basic/env-util.h2
-rw-r--r--src/basic/errno-list.c2
-rw-r--r--src/basic/errno-list.h2
-rw-r--r--src/basic/escape.c2
-rw-r--r--src/basic/escape.h2
-rw-r--r--src/basic/exec-util.c2
-rw-r--r--src/basic/exec-util.h2
-rw-r--r--src/basic/extract-word.c2
-rw-r--r--src/basic/extract-word.h2
-rw-r--r--src/basic/fd-util.c2
-rw-r--r--src/basic/fd-util.h2
-rw-r--r--src/basic/fileio-label.c2
-rw-r--r--src/basic/fileio-label.h2
-rw-r--r--src/basic/fileio.c24
-rw-r--r--src/basic/fileio.h2
-rw-r--r--src/basic/format-util.h2
-rw-r--r--src/basic/fs-util.c18
-rw-r--r--src/basic/fs-util.h3
-rw-r--r--src/basic/hash-funcs.c2
-rw-r--r--src/basic/hash-funcs.h2
-rw-r--r--src/basic/hashmap.c2
-rw-r--r--src/basic/hashmap.h2
-rw-r--r--src/basic/hexdecoct.c2
-rw-r--r--src/basic/hexdecoct.h2
-rw-r--r--src/basic/hostname-util.c2
-rw-r--r--src/basic/hostname-util.h2
-rw-r--r--src/basic/io-util.c2
-rw-r--r--src/basic/io-util.h2
-rw-r--r--src/basic/khash.c2
-rw-r--r--src/basic/khash.h2
-rw-r--r--src/basic/label.c2
-rw-r--r--src/basic/label.h2
-rw-r--r--src/basic/list.h2
-rw-r--r--src/basic/locale-util.c2
-rw-r--r--src/basic/locale-util.h2
-rw-r--r--src/basic/log.c2
-rw-r--r--src/basic/log.h2
-rw-r--r--src/basic/login-util.c2
-rw-r--r--src/basic/login-util.h2
-rw-r--r--src/basic/macro.h2
-rw-r--r--src/basic/memfd-util.c2
-rw-r--r--src/basic/memfd-util.h2
-rw-r--r--src/basic/mempool.c2
-rw-r--r--src/basic/mempool.h2
-rw-r--r--src/basic/missing.h2
-rw-r--r--src/basic/missing_syscall.h2
-rw-r--r--src/basic/mkdir-label.c2
-rw-r--r--src/basic/mkdir.c2
-rw-r--r--src/basic/mkdir.h2
-rw-r--r--src/basic/mount-util.c2
-rw-r--r--src/basic/mount-util.h2
-rw-r--r--src/basic/parse-util.c2
-rw-r--r--src/basic/parse-util.h2
-rw-r--r--src/basic/path-util.c2
-rw-r--r--src/basic/path-util.h2
-rw-r--r--src/basic/prioq.c2
-rw-r--r--src/basic/prioq.h2
-rw-r--r--src/basic/proc-cmdline.c2
-rw-r--r--src/basic/proc-cmdline.h2
-rw-r--r--src/basic/process-util.c2
-rw-r--r--src/basic/process-util.h2
-rw-r--r--src/basic/random-util.c2
-rw-r--r--src/basic/random-util.h2
-rw-r--r--src/basic/raw-clone.h2
-rw-r--r--src/basic/refcnt.h2
-rw-r--r--src/basic/rm-rf.c2
-rw-r--r--src/basic/rm-rf.h2
-rw-r--r--src/basic/selinux-util.c2
-rw-r--r--src/basic/selinux-util.h2
-rw-r--r--src/basic/set.h2
-rw-r--r--src/basic/sigbus.c2
-rw-r--r--src/basic/sigbus.h2
-rw-r--r--src/basic/signal-util.c2
-rw-r--r--src/basic/signal-util.h2
-rw-r--r--src/basic/smack-util.c2
-rw-r--r--src/basic/smack-util.h2
-rw-r--r--src/basic/socket-util.c2
-rw-r--r--src/basic/socket-util.h2
-rw-r--r--src/basic/special.h2
-rw-r--r--src/basic/stat-util.c2
-rw-r--r--src/basic/stat-util.h2
-rw-r--r--src/basic/stdio-util.h2
-rw-r--r--src/basic/string-table.c2
-rw-r--r--src/basic/string-table.h2
-rw-r--r--src/basic/string-util.c2
-rw-r--r--src/basic/string-util.h2
-rw-r--r--src/basic/strv.c2
-rw-r--r--src/basic/strv.h2
-rw-r--r--src/basic/syslog-util.c2
-rw-r--r--src/basic/syslog-util.h2
-rw-r--r--src/basic/terminal-util.c2
-rw-r--r--src/basic/terminal-util.h2
-rw-r--r--src/basic/time-util.c2
-rw-r--r--src/basic/time-util.h2
-rw-r--r--src/basic/umask-util.h2
-rw-r--r--src/basic/unaligned.h2
-rw-r--r--src/basic/unit-def.c2
-rw-r--r--src/basic/unit-def.h2
-rw-r--r--src/basic/unit-name.c2
-rw-r--r--src/basic/unit-name.h2
-rw-r--r--src/basic/user-util.c2
-rw-r--r--src/basic/user-util.h2
-rw-r--r--src/basic/utf8.c2
-rw-r--r--src/basic/utf8.h2
-rw-r--r--src/basic/util.c2
-rw-r--r--src/basic/util.h2
-rw-r--r--src/basic/verbs.c2
-rw-r--r--src/basic/verbs.h2
-rw-r--r--src/basic/virt.c2
-rw-r--r--src/basic/virt.h2
-rw-r--r--src/basic/xattr-util.c2
-rw-r--r--src/basic/xattr-util.h2
133 files changed, 65 insertions, 343 deletions
diff --git a/src/basic/alloc-util.c b/src/basic/alloc-util.c
index eceff4f24..130612c3d 100644
--- a/src/basic/alloc-util.c
+++ b/src/basic/alloc-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/alloc-util.h b/src/basic/alloc-util.h
index bae6a2845..0e575aff7 100644
--- a/src/basic/alloc-util.h
+++ b/src/basic/alloc-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/audit-util.c b/src/basic/audit-util.c
index 0a4062afd..a70c9856f 100644
--- a/src/basic/audit-util.c
+++ b/src/basic/audit-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/audit-util.h b/src/basic/audit-util.h
index d8cfafe23..733ea0d6d 100644
--- a/src/basic/audit-util.h
+++ b/src/basic/audit-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/build.h b/src/basic/build.h
index b0ac77e8f..c088ca487 100644
--- a/src/basic/build.h
+++ b/src/basic/build.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/bus-label.c b/src/basic/bus-label.c
index fee38b505..c647e8ae0 100644
--- a/src/basic/bus-label.c
+++ b/src/basic/bus-label.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2013 Lennart Poettering
***/
diff --git a/src/basic/bus-label.h b/src/basic/bus-label.h
index 0df46f86b..8d480d396 100644
--- a/src/basic/bus-label.h
+++ b/src/basic/bus-label.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2013 Lennart Poettering
***/
diff --git a/src/basic/cap-list.c b/src/basic/cap-list.c
index 01f163b60..dd13376a7 100644
--- a/src/basic/cap-list.c
+++ b/src/basic/cap-list.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2014 Lennart Poettering
***/
diff --git a/src/basic/cap-list.h b/src/basic/cap-list.h
index db65d5f0e..c81c6748b 100644
--- a/src/basic/cap-list.h
+++ b/src/basic/cap-list.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2014 Lennart Poettering
***/
diff --git a/src/basic/capability-util.c b/src/basic/capability-util.c
index 911f62b35..23669a71d 100644
--- a/src/basic/capability-util.c
+++ b/src/basic/capability-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/capability-util.h b/src/basic/capability-util.h
index 47462d2dc..6b4c11876 100644
--- a/src/basic/capability-util.h
+++ b/src/basic/capability-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
index 156118b4a..ad71e6e8a 100644
--- a/src/basic/cgroup-util.c
+++ b/src/basic/cgroup-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/cgroup-util.h b/src/basic/cgroup-util.h
index d8ddff95a..b1d160030 100644
--- a/src/basic/cgroup-util.h
+++ b/src/basic/cgroup-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/conf-files.c b/src/basic/conf-files.c
index b29243ee4..30a490326 100644
--- a/src/basic/conf-files.c
+++ b/src/basic/conf-files.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/conf-files.h b/src/basic/conf-files.h
index a3adc0828..bc7a45019 100644
--- a/src/basic/conf-files.h
+++ b/src/basic/conf-files.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010-2012 Lennart Poettering
Copyright 2010-2012 Kay Sievers
***/
diff --git a/src/basic/copy.c b/src/basic/copy.c
index 5b53f2e0f..bb17d3ae3 100644
--- a/src/basic/copy.c
+++ b/src/basic/copy.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2014 Lennart Poettering
***/
@@ -29,6 +27,7 @@
#include "io-util.h"
//#include "macro.h"
#include "missing.h"
+//#include "mount-util.h"
//#include "string-util.h"
#include "strv.h"
#include "time-util.h"
@@ -36,7 +35,12 @@
#include "user-util.h"
//#include "xattr-util.h"
-#define COPY_BUFFER_SIZE (16*1024u)
+#define COPY_BUFFER_SIZE (16U*1024U)
+
+/* A safety net for descending recursively into file system trees to copy. On Linux PATH_MAX is 4096, which means the
+ * deepest valid path one can build is around 2048, which we hence use as a safety net here, to not spin endlessly in
+ * case of bind mount cycles and suchlike. */
+#define COPY_DEPTH_MAX 2048U
static ssize_t try_copy_file_range(
int fd_in, loff_t *off_in,
@@ -482,6 +486,7 @@ static int fd_copy_directory(
int dt,
const char *to,
dev_t original_device,
+ unsigned depth_left,
uid_t override_uid,
gid_t override_gid,
CopyFlags copy_flags) {
@@ -495,6 +500,9 @@ static int fd_copy_directory(
assert(st);
assert(to);
+ if (depth_left == 0)
+ return -ENAMETOOLONG;
+
if (from)
fdf = openat(df, from, O_RDONLY|O_DIRECTORY|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW);
else
@@ -533,13 +541,40 @@ static int fd_copy_directory(
continue;
}
- if (buf.st_dev != original_device)
- continue;
+ if (S_ISDIR(buf.st_mode)) {
+ /*
+ * Don't descend into directories on other file systems, if this is requested. We do a simple
+ * .st_dev check here, which basically comes for free. Note that we do this check only on
+ * directories, not other kind of file system objects, for two reason:
+ *
+ * • The kernel's overlayfs pseudo file system that overlays multiple real file systems
+ * propagates the .st_dev field of the file system a file originates from all the way up
+ * through the stack to stat(). It doesn't do that for directories however. This means that
+ * comparing .st_dev on non-directories suggests that they all are mount points. To avoid
+ * confusion we hence avoid relying on this check for regular files.
+ *
+ * • The main reason we do this check at all is to protect ourselves from bind mount cycles,
+ * where we really want to avoid descending down in all eternity. However the .st_dev check
+ * is usually not sufficient for this protection anyway, as bind mount cycles from the same
+ * file system onto itself can't be detected that way. (Note we also do a recursion depth
+ * check, which is probably the better protection in this regard, which is why
+ * COPY_SAME_MOUNT is optional).
+ */
+
+ if (FLAGS_SET(copy_flags, COPY_SAME_MOUNT)) {
+ if (buf.st_dev != original_device)
+ continue;
+
+ r = fd_is_mount_point(dirfd(d), de->d_name, 0);
+ if (r < 0)
+ return r;
+ if (r > 0)
+ continue;
+ }
- if (S_ISREG(buf.st_mode))
+ q = fd_copy_directory(dirfd(d), de->d_name, &buf, fdt, de->d_name, original_device, depth_left-1, override_uid, override_gid, copy_flags);
+ } else if (S_ISREG(buf.st_mode))
q = fd_copy_regular(dirfd(d), de->d_name, &buf, fdt, de->d_name, override_uid, override_gid, copy_flags);
- else if (S_ISDIR(buf.st_mode))
- q = fd_copy_directory(dirfd(d), de->d_name, &buf, fdt, de->d_name, original_device, override_uid, override_gid, copy_flags);
else if (S_ISLNK(buf.st_mode))
q = fd_copy_symlink(dirfd(d), de->d_name, &buf, fdt, de->d_name, override_uid, override_gid, copy_flags);
else if (S_ISFIFO(buf.st_mode))
@@ -589,7 +624,7 @@ int copy_tree_at(int fdf, const char *from, int fdt, const char *to, uid_t overr
if (S_ISREG(st.st_mode))
return fd_copy_regular(fdf, from, &st, fdt, to, override_uid, override_gid, copy_flags);
else if (S_ISDIR(st.st_mode))
- return fd_copy_directory(fdf, from, &st, fdt, to, st.st_dev, override_uid, override_gid, copy_flags);
+ return fd_copy_directory(fdf, from, &st, fdt, to, st.st_dev, COPY_DEPTH_MAX, override_uid, override_gid, copy_flags);
else if (S_ISLNK(st.st_mode))
return fd_copy_symlink(fdf, from, &st, fdt, to, override_uid, override_gid, copy_flags);
else if (S_ISFIFO(st.st_mode))
@@ -616,7 +651,7 @@ int copy_directory_fd(int dirfd, const char *to, CopyFlags copy_flags) {
if (!S_ISDIR(st.st_mode))
return -ENOTDIR;
- return fd_copy_directory(dirfd, NULL, &st, AT_FDCWD, to, st.st_dev, UID_INVALID, GID_INVALID, copy_flags);
+ return fd_copy_directory(dirfd, NULL, &st, AT_FDCWD, to, st.st_dev, COPY_DEPTH_MAX, UID_INVALID, GID_INVALID, copy_flags);
}
int copy_directory(const char *from, const char *to, CopyFlags copy_flags) {
@@ -631,7 +666,7 @@ int copy_directory(const char *from, const char *to, CopyFlags copy_flags) {
if (!S_ISDIR(st.st_mode))
return -ENOTDIR;
- return fd_copy_directory(AT_FDCWD, from, &st, AT_FDCWD, to, st.st_dev, UID_INVALID, GID_INVALID, copy_flags);
+ return fd_copy_directory(AT_FDCWD, from, &st, AT_FDCWD, to, st.st_dev, COPY_DEPTH_MAX, UID_INVALID, GID_INVALID, copy_flags);
}
int copy_file_fd(const char *from, int fdt, CopyFlags copy_flags) {
@@ -684,55 +719,31 @@ int copy_file(const char *from, const char *to, int flags, mode_t mode, unsigned
}
int copy_file_atomic(const char *from, const char *to, mode_t mode, unsigned chattr_flags, CopyFlags copy_flags) {
- _cleanup_(unlink_and_freep) char *t = NULL;
- _cleanup_close_ int fdt = -1;
+ _cleanup_free_ char *t = NULL;
int r;
assert(from);
assert(to);
- /* We try to use O_TMPFILE here to create the file if we can. Note that that only works if COPY_REPLACE is not
- * set though as we need to use linkat() for linking the O_TMPFILE file into the file system but that system
- * call can't replace existing files. Hence, if COPY_REPLACE is set we create a temporary name in the file
- * system right-away and unconditionally which we then can renameat() to the right name after we completed
- * writing it. */
-
- if (copy_flags & COPY_REPLACE) {
- r = tempfn_random(to, NULL, &t);
- if (r < 0)
- return r;
-
- fdt = open(t, O_CREAT|O_EXCL|O_NOFOLLOW|O_NOCTTY|O_WRONLY|O_CLOEXEC, 0600);
- if (fdt < 0) {
- t = mfree(t);
- return -errno;
- }
- } else {
- fdt = open_tmpfile_linkable(to, O_WRONLY|O_CLOEXEC, &t);
- if (fdt < 0)
- return fdt;
- }
-
- if (chattr_flags != 0)
- (void) chattr_fd(fdt, chattr_flags, (unsigned) -1);
-
- r = copy_file_fd(from, fdt, copy_flags);
+ r = tempfn_random(to, NULL, &t);
if (r < 0)
return r;
- if (fchmod(fdt, mode) < 0)
- return -errno;
+ r = copy_file(from, t, O_NOFOLLOW|O_EXCL, mode, chattr_flags, copy_flags);
+ if (r < 0)
+ return r;
if (copy_flags & COPY_REPLACE) {
- if (renameat(AT_FDCWD, t, AT_FDCWD, to) < 0)
- return -errno;
- } else {
- r = link_tmpfile(fdt, t, to);
+ r = renameat(AT_FDCWD, t, AT_FDCWD, to);
if (r < 0)
- return r;
+ r = -errno;
+ } else
+ r = rename_noreplace(AT_FDCWD, t, AT_FDCWD, to);
+ if (r < 0) {
+ (void) unlink(t);
+ return r;
}
- t = mfree(t);
return 0;
}
diff --git a/src/basic/copy.h b/src/basic/copy.h
index d54010560..885597167 100644
--- a/src/basic/copy.h
+++ b/src/basic/copy.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2014 Lennart Poettering
***/
diff --git a/src/basic/def.h b/src/basic/def.h
index d171e5b8a..6e871d37e 100644
--- a/src/basic/def.h
+++ b/src/basic/def.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/dirent-util.c b/src/basic/dirent-util.c
index e093a3bba..4a061837f 100644
--- a/src/basic/dirent-util.c
+++ b/src/basic/dirent-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010-2012 Lennart Poettering
***/
diff --git a/src/basic/dirent-util.h b/src/basic/dirent-util.h
index 00d061b63..047ccd225 100644
--- a/src/basic/dirent-util.h
+++ b/src/basic/dirent-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/env-util.c b/src/basic/env-util.c
index 90d2f06a8..54cbe1533 100644
--- a/src/basic/env-util.c
+++ b/src/basic/env-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2012 Lennart Poettering
***/
diff --git a/src/basic/env-util.h b/src/basic/env-util.h
index 7ac73792f..cafc18bad 100644
--- a/src/basic/env-util.h
+++ b/src/basic/env-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2013 Lennart Poettering
***/
diff --git a/src/basic/errno-list.c b/src/basic/errno-list.c
index e6fc0baeb..259b1ec0a 100644
--- a/src/basic/errno-list.c
+++ b/src/basic/errno-list.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2013 Lennart Poettering
***/
diff --git a/src/basic/errno-list.h b/src/basic/errno-list.h
index 6725ae9ad..c549b055d 100644
--- a/src/basic/errno-list.h
+++ b/src/basic/errno-list.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2013 Lennart Poettering
***/
diff --git a/src/basic/escape.c b/src/basic/escape.c
index 98b4bdf18..f736aa6ee 100644
--- a/src/basic/escape.c
+++ b/src/basic/escape.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/escape.h b/src/basic/escape.h
index 7889dc714..f77b3fcad 100644
--- a/src/basic/escape.h
+++ b/src/basic/escape.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/exec-util.c b/src/basic/exec-util.c
index ad486db1a..96dc7dce0 100644
--- a/src/basic/exec-util.c
+++ b/src/basic/exec-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/exec-util.h b/src/basic/exec-util.h
index 9ebeab96a..c66aa7fc5 100644
--- a/src/basic/exec-util.h
+++ b/src/basic/exec-util.h
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2017 Zbigniew Jędrzejewski-Szmek
***/
diff --git a/src/basic/extract-word.c b/src/basic/extract-word.c
index e2d4eb4aa..4b7b77e92 100644
--- a/src/basic/extract-word.c
+++ b/src/basic/extract-word.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/extract-word.h b/src/basic/extract-word.h
index be21521d6..55bd8ba6c 100644
--- a/src/basic/extract-word.h
+++ b/src/basic/extract-word.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/fd-util.c b/src/basic/fd-util.c
index efe974ee2..836ba7e76 100644
--- a/src/basic/fd-util.c
+++ b/src/basic/fd-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/fd-util.h b/src/basic/fd-util.h
index 7f7ac8901..8bc6c0128 100644
--- a/src/basic/fd-util.h
+++ b/src/basic/fd-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/fileio-label.c b/src/basic/fileio-label.c
index 69b58b7b9..7b71bec9b 100644
--- a/src/basic/fileio-label.c
+++ b/src/basic/fileio-label.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
Copyright 2010 Harald Hoyer
***/
diff --git a/src/basic/fileio-label.h b/src/basic/fileio-label.h
index 2bfffbfa7..1455af041 100644
--- a/src/basic/fileio-label.h
+++ b/src/basic/fileio-label.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
Copyright 2010 Harald Hoyer
***/
diff --git a/src/basic/fileio.c b/src/basic/fileio.c
index 2d742c911..afe2fd17b 100644
--- a/src/basic/fileio.c
+++ b/src/basic/fileio.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
@@ -1571,29 +1569,21 @@ int read_nul_string(FILE *f, char **ret) {
}
int mkdtemp_malloc(const char *template, char **ret) {
- _cleanup_free_ char *p = NULL;
- int r;
+ char *p;
+ assert(template);
assert(ret);
- if (template)
- p = strdup(template);
- else {
- const char *tmp;
-
- r = tmp_dir(&tmp);
- if (r < 0)
- return r;
-
- p = strjoin(tmp, "/XXXXXX");
- }
+ p = strdup(template);
if (!p)
return -ENOMEM;
- if (!mkdtemp(p))
+ if (!mkdtemp(p)) {
+ free(p);
return -errno;
+ }
- *ret = TAKE_PTR(p);
+ *ret = p;
return 0;
}
#endif // 0
diff --git a/src/basic/fileio.h b/src/basic/fileio.h
index 0a23c9fae..e367b9ac9 100644
--- a/src/basic/fileio.h
+++ b/src/basic/fileio.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/format-util.h b/src/basic/format-util.h
index c9e81192b..4ea34749d 100644
--- a/src/basic/format-util.h
+++ b/src/basic/format-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2015 Ronny Chevalier
***/
diff --git a/src/basic/fs-util.c b/src/basic/fs-util.c
index 1f2765737..84946989b 100644
--- a/src/basic/fs-util.c
+++ b/src/basic/fs-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
@@ -239,22 +237,6 @@ int chmod_and_chown(const char *path, mode_t mode, uid_t uid, gid_t gid) {
return 0;
}
-int fchmod_and_chown(int fd, mode_t mode, uid_t uid, gid_t gid) {
- /* Under the assumption that we are running privileged we
- * first change the access mode and only then hand out
- * ownership to avoid a window where access is too open. */
-
- if (mode != MODE_INVALID)
- if (fchmod(fd, mode) < 0)
- return -errno;
-
- if (uid != UID_INVALID || gid != GID_INVALID)
- if (fchown(fd, uid, gid) < 0)
- return -errno;
-
- return 0;
-}
-
int fchmod_umask(int fd, mode_t m) {
mode_t u;
int r;
diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h
index 4e65fd238..7feb0acc9 100644
--- a/src/basic/fs-util.h
+++ b/src/basic/fs-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
@@ -37,7 +35,6 @@ int readlink_and_make_absolute(const char *p, char **r);
#endif // 0
int chmod_and_chown(const char *path, mode_t mode, uid_t uid, gid_t gid);
-int fchmod_and_chown(int fd, mode_t mode, uid_t uid, gid_t gid);
int fchmod_umask(int fd, mode_t mode);
int fchmod_opath(int fd, mode_t m);
diff --git a/src/basic/hash-funcs.c b/src/basic/hash-funcs.c
index 13e357efd..3b695a125 100644
--- a/src/basic/hash-funcs.c
+++ b/src/basic/hash-funcs.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
Copyright 2014 Michal Schmidt
***/
diff --git a/src/basic/hash-funcs.h b/src/basic/hash-funcs.h
index 0c963af8e..343af5d68 100644
--- a/src/basic/hash-funcs.h
+++ b/src/basic/hash-funcs.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
Copyright 2014 Michal Schmidt
***/
diff --git a/src/basic/hashmap.c b/src/basic/hashmap.c
index 95c15c26c..eef11502a 100644
--- a/src/basic/hashmap.c
+++ b/src/basic/hashmap.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
Copyright 2014 Michal Schmidt
***/
diff --git a/src/basic/hashmap.h b/src/basic/hashmap.h
index 701eecbdb..3d544dc73 100644
--- a/src/basic/hashmap.h
+++ b/src/basic/hashmap.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
Copyright 2014 Michal Schmidt
***/
diff --git a/src/basic/hexdecoct.c b/src/basic/hexdecoct.c
index b3ea05ce5..92c164283 100644
--- a/src/basic/hexdecoct.c
+++ b/src/basic/hexdecoct.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/hexdecoct.h b/src/basic/hexdecoct.h
index c2f11013e..b49ddc8c2 100644
--- a/src/basic/hexdecoct.h
+++ b/src/basic/hexdecoct.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/hostname-util.c b/src/basic/hostname-util.c
index 022aaba0f..71ce9e5d3 100644
--- a/src/basic/hostname-util.c
+++ b/src/basic/hostname-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2015 Lennart Poettering
***/
diff --git a/src/basic/hostname-util.h b/src/basic/hostname-util.h
index 439b12e64..7e31d19d8 100644
--- a/src/basic/hostname-util.h
+++ b/src/basic/hostname-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010-2015 Lennart Poettering
***/
diff --git a/src/basic/io-util.c b/src/basic/io-util.c
index 593db66da..dd67389fd 100644
--- a/src/basic/io-util.c
+++ b/src/basic/io-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/io-util.h b/src/basic/io-util.h
index e4717b6f3..ab43ca5b5 100644
--- a/src/basic/io-util.h
+++ b/src/basic/io-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/khash.c b/src/basic/khash.c
index c66e9faee..08859832f 100644
--- a/src/basic/khash.c
+++ b/src/basic/khash.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2016 Lennart Poettering
***/
diff --git a/src/basic/khash.h b/src/basic/khash.h
index 3fa867e37..5c7d306c9 100644
--- a/src/basic/khash.h
+++ b/src/basic/khash.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2016 Lennart Poettering
***/
diff --git a/src/basic/label.c b/src/basic/label.c
index 1641a6918..18905ab2e 100644
--- a/src/basic/label.c
+++ b/src/basic/label.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/label.h b/src/basic/label.h
index 1f3eb54d3..dcf677248 100644
--- a/src/basic/label.h
+++ b/src/basic/label.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/list.h b/src/basic/list.h
index 3ec7e73fc..6ae88ec6b 100644
--- a/src/basic/list.h
+++ b/src/basic/list.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/locale-util.c b/src/basic/locale-util.c
index b382af192..fb31e8ffb 100644
--- a/src/basic/locale-util.c
+++ b/src/basic/locale-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2014 Lennart Poettering
***/
diff --git a/src/basic/locale-util.h b/src/basic/locale-util.h
index 144e2bc63..80c2d871a 100644
--- a/src/basic/locale-util.h
+++ b/src/basic/locale-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2014 Lennart Poettering
***/
diff --git a/src/basic/log.c b/src/basic/log.c
index a506d30d3..3f6c45188 100644
--- a/src/basic/log.c
+++ b/src/basic/log.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/log.h b/src/basic/log.h
index 75ecd8493..ec672c75f 100644
--- a/src/basic/log.h
+++ b/src/basic/log.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/login-util.c b/src/basic/login-util.c
index d69b413e6..59ac08140 100644
--- a/src/basic/login-util.c
+++ b/src/basic/login-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2013 Zbigniew Jędrzejewski-Szmek
***/
diff --git a/src/basic/login-util.h b/src/basic/login-util.h
index ed454bd67..28c00e148 100644
--- a/src/basic/login-util.h
+++ b/src/basic/login-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2013 Zbigniew Jędrzejewski-Szmek
***/
diff --git a/src/basic/macro.h b/src/basic/macro.h
index 05f5e9fa6..4d33e7028 100644
--- a/src/basic/macro.h
+++ b/src/basic/macro.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/memfd-util.c b/src/basic/memfd-util.c
index 17e8acf6a..c0d67ece9 100644
--- a/src/basic/memfd-util.c
+++ b/src/basic/memfd-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2013 Lennart Poettering
***/
diff --git a/src/basic/memfd-util.h b/src/basic/memfd-util.h
index c9920f7c1..b0e058b5e 100644
--- a/src/basic/memfd-util.h
+++ b/src/basic/memfd-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2013 Lennart Poettering
***/
diff --git a/src/basic/mempool.c b/src/basic/mempool.c
index 2e55639e8..5792ca972 100644
--- a/src/basic/mempool.c
+++ b/src/basic/mempool.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010-2014 Lennart Poettering
Copyright 2014 Michal Schmidt
***/
diff --git a/src/basic/mempool.h b/src/basic/mempool.h
index ba0c0bd8f..dad4a4f9c 100644
--- a/src/basic/mempool.h
+++ b/src/basic/mempool.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2011-2014 Lennart Poettering
Copyright 2014 Michal Schmidt
***/
diff --git a/src/basic/missing.h b/src/basic/missing.h
index 5b194261d..1d06ce535 100644
--- a/src/basic/missing.h
+++ b/src/basic/missing.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h
index b26332bc2..ff7e76a57 100644
--- a/src/basic/missing_syscall.h
+++ b/src/basic/missing_syscall.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
Copyright 2016 Zbigniew Jędrzejewski-Szmek
***/
diff --git a/src/basic/mkdir-label.c b/src/basic/mkdir-label.c
index c723c4e69..28e93f0b8 100644
--- a/src/basic/mkdir-label.c
+++ b/src/basic/mkdir-label.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
Copyright 2013 Kay Sievers
***/
diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c
index 12d8e377d..3d5471874 100644
--- a/src/basic/mkdir.c
+++ b/src/basic/mkdir.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/mkdir.h b/src/basic/mkdir.h
index c0e08fcfb..f26486f3e 100644
--- a/src/basic/mkdir.h
+++ b/src/basic/mkdir.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
Copyright 2013 Kay Sievers
***/
diff --git a/src/basic/mount-util.c b/src/basic/mount-util.c
index 76c0969d4..e05fabe3e 100644
--- a/src/basic/mount-util.c
+++ b/src/basic/mount-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/mount-util.h b/src/basic/mount-util.h
index d02976d89..37ec09f03 100644
--- a/src/basic/mount-util.h
+++ b/src/basic/mount-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c
index a64d9f5a7..ef7c2cabd 100644
--- a/src/basic/parse-util.c
+++ b/src/basic/parse-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/parse-util.h b/src/basic/parse-util.h
index fc52d1f22..2b594edb1 100644
--- a/src/basic/parse-util.h
+++ b/src/basic/parse-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/path-util.c b/src/basic/path-util.c
index 3aabe5278..a0a2857d3 100644
--- a/src/basic/path-util.c
+++ b/src/basic/path-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010-2012 Lennart Poettering
***/
diff --git a/src/basic/path-util.h b/src/basic/path-util.h
index 9f356c94d..e559e50b7 100644
--- a/src/basic/path-util.h
+++ b/src/basic/path-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010-2012 Lennart Poettering
***/
diff --git a/src/basic/prioq.c b/src/basic/prioq.c
index 1db2d9efc..fd51e0587 100644
--- a/src/basic/prioq.c
+++ b/src/basic/prioq.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2013 Lennart Poettering
***/
diff --git a/src/basic/prioq.h b/src/basic/prioq.h
index e348c6464..a3e378a92 100644
--- a/src/basic/prioq.h
+++ b/src/basic/prioq.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2013 Lennart Poettering
***/
diff --git a/src/basic/proc-cmdline.c b/src/basic/proc-cmdline.c
index 723683100..31ffbc1ef 100644
--- a/src/basic/proc-cmdline.c
+++ b/src/basic/proc-cmdline.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/proc-cmdline.h b/src/basic/proc-cmdline.h
index 35a75b499..ca7bf990c 100644
--- a/src/basic/proc-cmdline.h
+++ b/src/basic/proc-cmdline.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/process-util.c b/src/basic/process-util.c
index 74a6e4abf..2ce006e4a 100644
--- a/src/basic/process-util.c
+++ b/src/basic/process-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/process-util.h b/src/basic/process-util.h
index c5655e995..23b934168 100644
--- a/src/basic/process-util.h
+++ b/src/basic/process-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/random-util.c b/src/basic/random-util.c
index e8637ef9b..03c89c1eb 100644
--- a/src/basic/random-util.c
+++ b/src/basic/random-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/random-util.h b/src/basic/random-util.h
index 723917057..c829da084 100644
--- a/src/basic/random-util.h
+++ b/src/basic/random-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/raw-clone.h b/src/basic/raw-clone.h
index c801939d1..7cf86aaf0 100644
--- a/src/basic/raw-clone.h
+++ b/src/basic/raw-clone.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
Copyright 2016 Michael Karcher
***/
diff --git a/src/basic/refcnt.h b/src/basic/refcnt.h
index 0d5b3f4e1..a341fd55b 100644
--- a/src/basic/refcnt.h
+++ b/src/basic/refcnt.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2013 Lennart Poettering
***/
diff --git a/src/basic/rm-rf.c b/src/basic/rm-rf.c
index 9143f0066..fa7e94f19 100644
--- a/src/basic/rm-rf.c
+++ b/src/basic/rm-rf.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2015 Lennart Poettering
***/
diff --git a/src/basic/rm-rf.h b/src/basic/rm-rf.h
index 53d8485a4..9f74bce08 100644
--- a/src/basic/rm-rf.h
+++ b/src/basic/rm-rf.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2015 Lennart Poettering
***/
diff --git a/src/basic/selinux-util.c b/src/basic/selinux-util.c
index cdeeb3e2a..1403b9b14 100644
--- a/src/basic/selinux-util.c
+++ b/src/basic/selinux-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/selinux-util.h b/src/basic/selinux-util.h
index 1509b1cc3..dc689c7d8 100644
--- a/src/basic/selinux-util.h
+++ b/src/basic/selinux-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/set.h b/src/basic/set.h
index caad46ced..daf14ce89 100644
--- a/src/basic/set.h
+++ b/src/basic/set.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/sigbus.c b/src/basic/sigbus.c
index d7db5b56a..16751a9b3 100644
--- a/src/basic/sigbus.c
+++ b/src/basic/sigbus.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2014 Lennart Poettering
***/
diff --git a/src/basic/sigbus.h b/src/basic/sigbus.h
index 9c0c66a77..a262f3c6c 100644
--- a/src/basic/sigbus.h
+++ b/src/basic/sigbus.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2014 Lennart Poettering
***/
diff --git a/src/basic/signal-util.c b/src/basic/signal-util.c
index 5bd5c71ce..e0e9444e4 100644
--- a/src/basic/signal-util.c
+++ b/src/basic/signal-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2015 Lennart Poettering
***/
diff --git a/src/basic/signal-util.h b/src/basic/signal-util.h
index a52b1d2fa..5b7b127d9 100644
--- a/src/basic/signal-util.h
+++ b/src/basic/signal-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010-2015 Lennart Poettering
***/
diff --git a/src/basic/smack-util.c b/src/basic/smack-util.c
index 491b421ab..363d68911 100644
--- a/src/basic/smack-util.c
+++ b/src/basic/smack-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2013 Intel Corporation
Author: Auke Kok <auke-jan.h.kok@intel.com>
diff --git a/src/basic/smack-util.h b/src/basic/smack-util.h
index 6821d4245..8cdf0cc0f 100644
--- a/src/basic/smack-util.h
+++ b/src/basic/smack-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2013 Intel Corporation
Author: Auke Kok <auke-jan.h.kok@intel.com>
diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c
index 177f2aa4f..5f7276424 100644
--- a/src/basic/socket-util.c
+++ b/src/basic/socket-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/socket-util.h b/src/basic/socket-util.h
index bf99f4107..28c488409 100644
--- a/src/basic/socket-util.h
+++ b/src/basic/socket-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/special.h b/src/basic/special.h
index 136a5b2da..9a3cbaf95 100644
--- a/src/basic/special.h
+++ b/src/basic/special.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/stat-util.c b/src/basic/stat-util.c
index d88f97fdf..8c6a36fe0 100644
--- a/src/basic/stat-util.c
+++ b/src/basic/stat-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010-2012 Lennart Poettering
***/
diff --git a/src/basic/stat-util.h b/src/basic/stat-util.h
index 325caf445..1bf59c3b4 100644
--- a/src/basic/stat-util.h
+++ b/src/basic/stat-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010-2012 Lennart Poettering
***/
diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h
index 87d8917a5..8a7544cf5 100644
--- a/src/basic/stdio-util.h
+++ b/src/basic/stdio-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/string-table.c b/src/basic/string-table.c
index 6857202f8..33a5dbc57 100644
--- a/src/basic/string-table.c
+++ b/src/basic/string-table.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/string-table.h b/src/basic/string-table.h
index 1786bcfda..6bc60b65e 100644
--- a/src/basic/string-table.h
+++ b/src/basic/string-table.h
@@ -3,8 +3,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/string-util.c b/src/basic/string-util.c
index 1f8bf3d4d..ed7714801 100644
--- a/src/basic/string-util.c
+++ b/src/basic/string-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/string-util.h b/src/basic/string-util.h
index 1671697a0..2dcfecc79 100644
--- a/src/basic/string-util.h
+++ b/src/basic/string-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/strv.c b/src/basic/strv.c
index 0c2d1c848..fa5101772 100644
--- a/src/basic/strv.c
+++ b/src/basic/strv.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/strv.h b/src/basic/strv.h
index 0b4ff30e9..1de570910 100644
--- a/src/basic/strv.h
+++ b/src/basic/strv.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/syslog-util.c b/src/basic/syslog-util.c
index c3b91bfb6..bcee72c49 100644
--- a/src/basic/syslog-util.c
+++ b/src/basic/syslog-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/syslog-util.h b/src/basic/syslog-util.h
index 02778affb..c63648a66 100644
--- a/src/basic/syslog-util.h
+++ b/src/basic/syslog-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/terminal-util.c b/src/basic/terminal-util.c
index 18cfb4c75..dab4f10b0 100644
--- a/src/basic/terminal-util.c
+++ b/src/basic/terminal-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/terminal-util.h b/src/basic/terminal-util.h
index c56b19d07..cc5ba0cfa 100644
--- a/src/basic/terminal-util.h
+++ b/src/basic/terminal-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/time-util.c b/src/basic/time-util.c
index 2e465296f..34a90ed1b 100644
--- a/src/basic/time-util.c
+++ b/src/basic/time-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/time-util.h b/src/basic/time-util.h
index 94534794a..df3c718f4 100644
--- a/src/basic/time-util.h
+++ b/src/basic/time-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/umask-util.h b/src/basic/umask-util.h
index ce705247d..25796883e 100644
--- a/src/basic/umask-util.h
+++ b/src/basic/umask-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/unaligned.h b/src/basic/unaligned.h
index feddaa919..0bb62b319 100644
--- a/src/basic/unaligned.h
+++ b/src/basic/unaligned.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2014 Tom Gundersen
***/
diff --git a/src/basic/unit-def.c b/src/basic/unit-def.c
index fd42e0a24..abfa11ab1 100644
--- a/src/basic/unit-def.c
+++ b/src/basic/unit-def.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/unit-def.h b/src/basic/unit-def.h
index 3f13a1c8f..1d785c43b 100644
--- a/src/basic/unit-def.h
+++ b/src/basic/unit-def.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/unit-name.c b/src/basic/unit-name.c
index 12323fb4d..fe6349bfd 100644
--- a/src/basic/unit-name.c
+++ b/src/basic/unit-name.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/unit-name.h b/src/basic/unit-name.h
index 07229769a..ac997ad7e 100644
--- a/src/basic/unit-name.h
+++ b/src/basic/unit-name.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/user-util.c b/src/basic/user-util.c
index 796e00f69..b3e4ce503 100644
--- a/src/basic/user-util.c
+++ b/src/basic/user-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/user-util.h b/src/basic/user-util.h
index e0de7a9a8..5cd1a515d 100644
--- a/src/basic/user-util.h
+++ b/src/basic/user-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/utf8.c b/src/basic/utf8.c
index af86f74d1..3b8b7b12c 100644
--- a/src/basic/utf8.c
+++ b/src/basic/utf8.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2008-2011 Kay Sievers
Copyright 2012 Lennart Poettering
***/
diff --git a/src/basic/utf8.h b/src/basic/utf8.h
index d6936ea46..ffe49c128 100644
--- a/src/basic/utf8.h
+++ b/src/basic/utf8.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2012 Lennart Poettering
***/
diff --git a/src/basic/util.c b/src/basic/util.c
index 635d1672a..8bd0bff75 100644
--- a/src/basic/util.c
+++ b/src/basic/util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/util.h b/src/basic/util.h
index 7722e583c..27d09e98c 100644
--- a/src/basic/util.h
+++ b/src/basic/util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/verbs.c b/src/basic/verbs.c
index a52cd2ad9..e0b60eca9 100644
--- a/src/basic/verbs.c
+++ b/src/basic/verbs.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2014 Lennart Poettering
***/
diff --git a/src/basic/verbs.h b/src/basic/verbs.h
index fde6a1fdc..0e5c33cff 100644
--- a/src/basic/verbs.h
+++ b/src/basic/verbs.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2014 Lennart Poettering
***/
diff --git a/src/basic/virt.c b/src/basic/virt.c
index dfc384ede..529722a2a 100644
--- a/src/basic/virt.c
+++ b/src/basic/virt.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2011 Lennart Poettering
***/
diff --git a/src/basic/virt.h b/src/basic/virt.h
index 0910e0df5..9fdcb5d13 100644
--- a/src/basic/virt.h
+++ b/src/basic/virt.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2011 Lennart Poettering
***/
diff --git a/src/basic/xattr-util.c b/src/basic/xattr-util.c
index 2b50ee352..0f948e4be 100644
--- a/src/basic/xattr-util.c
+++ b/src/basic/xattr-util.c
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
diff --git a/src/basic/xattr-util.h b/src/basic/xattr-util.h
index 2176a4def..4ec9052e5 100644
--- a/src/basic/xattr-util.h
+++ b/src/basic/xattr-util.h
@@ -2,8 +2,6 @@
#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/