mirror of
https://github.com/systemd/systemd
synced 2026-03-15 17:44:49 +01:00
Compare commits
No commits in common. "c644e9e6e61a2eff65f0f440462eb493891e0a2c" and "afc5d175a23a4f4a41b1edb92d89bd5ea740901d" have entirely different histories.
c644e9e6e6
...
afc5d175a2
@ -18,10 +18,8 @@ TS="${SOURCE_DATE_EPOCH:-$(date +%s)}"
|
||||
# The openSUSE filelists hardcode the manpage compression extension. This causes rpmbuild errors since we
|
||||
# disable manpage compression as the files cannot be found. Fix the issue by removing the compression
|
||||
# extension.
|
||||
# TODO: remove autovt@ removal when the upstream spec is updated
|
||||
while read -r filelist; do
|
||||
sed -E \
|
||||
-e '/autovt@/d' \
|
||||
-e 's/\.gz$//' \
|
||||
"$filelist" >"/tmp/$(basename "$filelist")"
|
||||
mount --bind "/tmp/$(basename "$filelist")" "$filelist"
|
||||
|
||||
@ -9,5 +9,5 @@ Environment=
|
||||
GIT_URL=https://salsa.debian.org/systemd-team/systemd.git
|
||||
GIT_SUBDIR=debian
|
||||
GIT_BRANCH=debian/master
|
||||
GIT_COMMIT=6f4d90be5cb4075954f0a36653105e586a9a1fa9
|
||||
GIT_COMMIT=93a222266c23ff73720f4de009a027d3556baee4
|
||||
PKG_SUBDIR=debian
|
||||
|
||||
@ -12,8 +12,6 @@
|
||||
static int do_rotate(JournalFile **f, MMapCache *m, JournalFileFlags file_flags) {
|
||||
int r;
|
||||
|
||||
assert(f);
|
||||
|
||||
r = journal_file_rotate(f, m, file_flags, UINT64_MAX, NULL);
|
||||
if (r < 0) {
|
||||
if (*f)
|
||||
@ -97,11 +95,9 @@ int writer_write(Writer *w,
|
||||
if (journal_file_rotate_suggested(w->journal, 0, LOG_DEBUG)) {
|
||||
log_info("%s: Journal header limits reached or header out-of-date, rotating",
|
||||
w->journal->path);
|
||||
|
||||
r = do_rotate(&w->journal, w->mmap, file_flags);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
r = journal_directory_vacuum(w->output, w->metrics.max_use, w->metrics.n_max_files, 0, NULL, /* verbose= */ true);
|
||||
if (r < 0)
|
||||
return r;
|
||||
@ -121,15 +117,14 @@ int writer_write(Writer *w,
|
||||
if (w->server)
|
||||
w->server->event_count += 1;
|
||||
return 0;
|
||||
}
|
||||
if (r == -EBADMSG)
|
||||
} else if (r == -EBADMSG)
|
||||
return r;
|
||||
|
||||
log_debug_errno(r, "%s: Write failed, rotating: %m", w->journal->path);
|
||||
r = do_rotate(&w->journal, w->mmap, file_flags);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
else
|
||||
log_debug("%s: Successfully rotated journal", w->journal->path);
|
||||
r = journal_directory_vacuum(w->output, w->metrics.max_use, w->metrics.n_max_files, 0, NULL, /* verbose= */ true);
|
||||
if (r < 0)
|
||||
|
||||
@ -1940,10 +1940,8 @@ static int maybe_decompress_payload(
|
||||
assert(f);
|
||||
|
||||
/* We can't read objects larger than 4G on a 32-bit machine */
|
||||
#if __SIZEOF_SIZE_T__ == 4
|
||||
if (size > UINT32_MAX)
|
||||
if ((uint64_t) (size_t) size != size)
|
||||
return -E2BIG;
|
||||
#endif
|
||||
|
||||
if (compression != COMPRESSION_NONE) {
|
||||
#if HAVE_COMPRESSION
|
||||
|
||||
@ -779,7 +779,6 @@ static JSON_DISPATCH_ENUM_DEFINE(dispatch_mount_directory_mode, MountMapMode, mo
|
||||
|
||||
static DirectoryOwnership validate_directory_fd(
|
||||
int fd,
|
||||
const char *path, /* purely for logging purposes */
|
||||
uid_t peer_uid,
|
||||
uid_t *ret_current_owner_uid) {
|
||||
|
||||
@ -814,14 +813,14 @@ static DirectoryOwnership validate_directory_fd(
|
||||
if (st.st_uid == 0) {
|
||||
*ret_current_owner_uid = st.st_uid;
|
||||
if (peer_uid == 0) {
|
||||
log_debug("Directory file descriptor points to root owned directory (%s), who is also the peer.", strna(path));
|
||||
log_debug("Directory file descriptor points to root owned directory, who is also the peer.");
|
||||
return DIRECTORY_IS_ROOT_PEER_OWNED;
|
||||
}
|
||||
log_debug("Directory file descriptor points to root owned directory (%s).", strna(path));
|
||||
log_debug("Directory file descriptor points to root owned directory.");
|
||||
return DIRECTORY_IS_ROOT_OWNED;
|
||||
}
|
||||
if (st.st_uid == peer_uid) {
|
||||
log_debug("Directory file descriptor points to peer owned directory (%s).", strna(path));
|
||||
log_debug("Directory file descriptor points to peer owned directory.");
|
||||
*ret_current_owner_uid = st.st_uid;
|
||||
return DIRECTORY_IS_PEER_OWNED;
|
||||
}
|
||||
@ -842,7 +841,7 @@ static DirectoryOwnership validate_directory_fd(
|
||||
|
||||
/* If the peer is root, then it doesn't matter if we find a parent owned by root, let's shortcut things. */
|
||||
if (peer_uid == 0) {
|
||||
log_debug("Directory referenced by file descriptor is owned by foreign UID range, and peer is root.");
|
||||
log_debug("Directory file descriptor is owned by foreign UID range, and peer is root.");
|
||||
*ret_current_owner_uid = st.st_uid;
|
||||
return DIRECTORY_IS_FOREIGN_OWNED;
|
||||
}
|
||||
@ -925,12 +924,8 @@ static int vl_method_mount_directory(
|
||||
if (r < 0)
|
||||
return log_debug_errno(r, "Failed to get client UID: %m");
|
||||
|
||||
/* Get path of the fd, to improve logging */
|
||||
_cleanup_free_ char *directory_path = NULL;
|
||||
(void) fd_get_path(directory_fd, &directory_path);
|
||||
|
||||
uid_t current_owner_uid;
|
||||
DirectoryOwnership owned_by = validate_directory_fd(directory_fd, directory_path, peer_uid, ¤t_owner_uid);
|
||||
DirectoryOwnership owned_by = validate_directory_fd(directory_fd, peer_uid, ¤t_owner_uid);
|
||||
if (owned_by == -EREMOTEIO)
|
||||
return sd_varlink_errorbo(link, "io.systemd.MountFileSystem.BadFileDescriptorFlags", SD_JSON_BUILD_PAIR_STRING("parameter", "directoryFileDescriptor"));
|
||||
if (owned_by < 0)
|
||||
@ -946,6 +941,9 @@ static int vl_method_mount_directory(
|
||||
assert(p.mode > 0);
|
||||
}
|
||||
|
||||
_cleanup_free_ char *directory_path = NULL;
|
||||
(void) fd_get_path(directory_fd, &directory_path);
|
||||
|
||||
log_debug("Mounting '%s' with mapping mode: %s", strna(directory_path), mount_map_mode_to_string(p.mode));
|
||||
|
||||
const char *polkit_details[] = {
|
||||
|
||||
@ -335,6 +335,7 @@ static int parse_argv(int argc, char *argv[]) {
|
||||
ARG_WAIT,
|
||||
ARG_WORKING_DIRECTORY,
|
||||
ARG_ROOT_DIRECTORY,
|
||||
ARG_SHELL,
|
||||
ARG_JOB_MODE,
|
||||
ARG_IGNORE_FAILURE,
|
||||
ARG_BACKGROUND,
|
||||
@ -918,6 +919,7 @@ static int parse_argv_sudo_mode(int argc, char *argv[]) {
|
||||
|
||||
enum {
|
||||
ARG_NO_ASK_PASSWORD = 0x100,
|
||||
ARG_HOST,
|
||||
ARG_MACHINE,
|
||||
ARG_UNIT,
|
||||
ARG_PROPERTY,
|
||||
|
||||
@ -47,7 +47,6 @@ KillMode=process
|
||||
{% endif %}
|
||||
IgnoreSIGPIPE=no
|
||||
SendSIGHUP=yes
|
||||
|
||||
ImportCredential=tty.virtual.%I.agetty.*:agetty.
|
||||
ImportCredential=tty.virtual.%I.login.*:login.
|
||||
ImportCredential=agetty.*
|
||||
@ -59,7 +58,5 @@ ImportCredential=shell.*
|
||||
UnsetEnvironment=LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION
|
||||
|
||||
[Install]
|
||||
Alias=autovt@.service
|
||||
|
||||
WantedBy=getty.target
|
||||
DefaultInstance=tty1
|
||||
|
||||
@ -45,6 +45,7 @@ units = [
|
||||
},
|
||||
{
|
||||
'file' : 'getty@.service.in',
|
||||
'symlinks' : ['autovt@.service'],
|
||||
},
|
||||
{
|
||||
'file' : 'graphical.target',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user