Compare commits
9 Commits
77fa159b39
...
de8a84ab44
Author | SHA1 | Date |
---|---|---|
Ivan Kruglov | de8a84ab44 | |
Antonio Alvarez Feijoo | 2ccacdd57c | |
Yu Watanabe | d99198819c | |
Tobias Zimmermann | f70e5620b6 | |
Zbigniew Jędrzejewski-Szmek | 3127c71bf4 | |
Yuri Chornoivan | b153eebfb2 | |
Zbigniew Jędrzejewski-Szmek | 2c06e40ae9 | |
Zbigniew Jędrzejewski-Szmek | 5ca9149464 | |
Ivan Kruglov | c4d274dde4 |
|
@ -1438,6 +1438,11 @@ evdev:input:b0003v046DpC309*
|
|||
KEYBOARD_KEY_c01b6=images # My Pictures (F11)
|
||||
KEYBOARD_KEY_c01b7=audio # My Music (F12)
|
||||
|
||||
# Logitech MX Keys for Mac
|
||||
evdev:input:b0003v046Dp4092*
|
||||
KEYBOARD_KEY_70035=102nd # '<' key
|
||||
KEYBOARD_KEY_70064=grave # '^' key
|
||||
|
||||
###########################################################
|
||||
# Maxdata
|
||||
###########################################################
|
||||
|
|
10
po/uk.po
10
po/uk.po
|
@ -9,8 +9,8 @@ msgid ""
|
|||
msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-11-06 14:42+0000\n"
|
||||
"PO-Revision-Date: 2024-11-20 19:13+0000\n"
|
||||
"Last-Translator: Dmytro Markevych <hotr1pak@gmail.com>\n"
|
||||
"PO-Revision-Date: 2024-11-21 19:38+0000\n"
|
||||
"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
|
||||
"Language-Team: Ukrainian <https://translate.fedoraproject.org/projects/"
|
||||
"systemd/main/uk/>\n"
|
||||
"Language: uk\n"
|
||||
|
@ -120,11 +120,11 @@ msgstr "Для оновлення домашньої теки користува
|
|||
|
||||
#: src/home/org.freedesktop.home1.policy:53
|
||||
msgid "Update your home area"
|
||||
msgstr "Оновіть свій домашній простір"
|
||||
msgstr "Оновлення домашньої області"
|
||||
|
||||
#: src/home/org.freedesktop.home1.policy:54
|
||||
msgid "Authentication is required to update your home area."
|
||||
msgstr "Для оновлення домашньої області потрібна автентифікація."
|
||||
msgstr "Для оновлення домашньої області слід пройти розпізнавання."
|
||||
|
||||
#: src/home/org.freedesktop.home1.policy:63
|
||||
msgid "Resize a home area"
|
||||
|
@ -1215,7 +1215,7 @@ msgstr "Керування додатковими функціями"
|
|||
|
||||
#: src/sysupdate/org.freedesktop.sysupdate1.policy:76
|
||||
msgid "Authentication is required to manage optional features"
|
||||
msgstr "Для керування додатковими функціями потрібна автентифікація"
|
||||
msgstr "Для керування додатковими можливостями слід пройти розпізнавання"
|
||||
|
||||
#: src/timedate/org.freedesktop.timedate1.policy:22
|
||||
msgid "Set system time"
|
||||
|
|
|
@ -38,19 +38,12 @@ __get_tpm2_devices() {
|
|||
done
|
||||
}
|
||||
|
||||
__get_block_devices() {
|
||||
local i
|
||||
for i in /dev/*; do
|
||||
[ -b "$i" ] && printf '%s\n' "$i"
|
||||
done
|
||||
}
|
||||
|
||||
_systemd_cryptenroll() {
|
||||
local comps
|
||||
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} words cword
|
||||
local -A OPTS=(
|
||||
[STANDALONE]='-h --help --version
|
||||
--password --recovery-key'
|
||||
--password --recovery-key --list-devices'
|
||||
[ARG]='--unlock-key-file
|
||||
--unlock-fido2-device
|
||||
--unlock-tpm2-device
|
||||
|
@ -116,7 +109,7 @@ _systemd_cryptenroll() {
|
|||
return 0
|
||||
fi
|
||||
|
||||
comps=$(__get_block_devices)
|
||||
comps=$(systemd-cryptenroll --list-devices)
|
||||
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
|
||||
return 0
|
||||
}
|
||||
|
|
|
@ -3426,14 +3426,12 @@ static int service_deserialize_item(Unit *u, const char *key, const char *value,
|
|||
return 0;
|
||||
}
|
||||
|
||||
r = service_add_fd_store(s, fd, fdn, do_poll);
|
||||
r = service_add_fd_store(s, TAKE_FD(fd), fdn, do_poll);
|
||||
if (r < 0) {
|
||||
log_unit_debug_errno(u, r,
|
||||
"Failed to store deserialized fd '%s', ignoring: %m", fdn);
|
||||
return 0;
|
||||
}
|
||||
|
||||
TAKE_FD(fd);
|
||||
} else if (streq(key, "extra-fd")) {
|
||||
_cleanup_free_ char *fdv = NULL, *fdn = NULL;
|
||||
_cleanup_close_ int fd = -EBADF;
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "json-util.h"
|
||||
#include "machine-varlink.h"
|
||||
#include "machine.h"
|
||||
#include "mount-util.h"
|
||||
#include "path-util.h"
|
||||
#include "pidref.h"
|
||||
#include "process-util.h"
|
||||
|
@ -570,3 +571,100 @@ int vl_method_open(sd_varlink *link, sd_json_variant *parameters, sd_varlink_met
|
|||
|
||||
return sd_varlink_reply(link, v);
|
||||
}
|
||||
|
||||
typedef struct MachineMountParameters {
|
||||
const char *name;
|
||||
PidRef pidref;
|
||||
char *src, *dest;
|
||||
bool read_only, mkdir;
|
||||
} MachineMountParameters;
|
||||
|
||||
static void machine_mount_paramaters_done(MachineMountParameters *p) {
|
||||
assert(p);
|
||||
pidref_done(&p->pidref);
|
||||
free(p->src);
|
||||
free(p->dest);
|
||||
}
|
||||
|
||||
int vl_method_mount(sd_varlink *link, sd_json_variant *parameters, sd_varlink_method_flags_t flags, void *userdata) {
|
||||
static const sd_json_dispatch_field dispatch_table[] = {
|
||||
VARLINK_DISPATCH_MACHINE_LOOKUP_FIELDS(MachineOpenParameters),
|
||||
{ "source", SD_JSON_VARIANT_STRING, json_dispatch_path, offsetof(MachineMountParameters, src), SD_JSON_MANDATORY },
|
||||
{ "destination", SD_JSON_VARIANT_STRING, json_dispatch_path, offsetof(MachineMountParameters, dest), 0 },
|
||||
{ "readOnly", SD_JSON_VARIANT_BOOLEAN, sd_json_dispatch_stdbool, offsetof(MachineMountParameters, read_only), 0 },
|
||||
{ "makeFileOrDirectory", SD_JSON_VARIANT_BOOLEAN, sd_json_dispatch_stdbool, offsetof(MachineMountParameters, mkdir), 0 },
|
||||
VARLINK_DISPATCH_POLKIT_FIELD,
|
||||
{}
|
||||
};
|
||||
|
||||
Manager *manager = ASSERT_PTR(userdata);
|
||||
_cleanup_(machine_mount_paramaters_done) MachineMountParameters p = { .pidref = PIDREF_NULL };
|
||||
MountInNamespaceFlags mount_flags = 0;
|
||||
uid_t uid_shift;
|
||||
int r;
|
||||
|
||||
assert(link);
|
||||
assert(parameters);
|
||||
|
||||
r = sd_varlink_dispatch(link, parameters, dispatch_table, &p);
|
||||
if (r != 0)
|
||||
return r;
|
||||
|
||||
/* There is no need for extra validation since path_is_absolute() does path_is_valid() and path_is_absolute().*/
|
||||
const char *dest = p.dest ?: p.src;
|
||||
|
||||
Machine *machine;
|
||||
r = lookup_machine_by_name_or_pidref(link, manager, p.name, &p.pidref, &machine);
|
||||
if (r == -ESRCH)
|
||||
return sd_varlink_error(link, "io.systemd.Machine.NoSuchMachine", NULL);
|
||||
if (r != 0)
|
||||
return r;
|
||||
|
||||
if (machine->class != MACHINE_CONTAINER)
|
||||
return sd_varlink_error(link, "io.systemd.Machine.NotSupported", NULL);
|
||||
|
||||
r = varlink_verify_polkit_async(
|
||||
link,
|
||||
manager->bus,
|
||||
"org.freedesktop.machine1.manage-machines",
|
||||
(const char**) STRV_MAKE("name", machine->name,
|
||||
"verb", "bind", // TODO(ikruglov): mount seems a better verb here, but it's bind in DBus
|
||||
"src", p.src,
|
||||
"dest", dest),
|
||||
&manager->polkit_registry);
|
||||
if (r <= 0)
|
||||
return r;
|
||||
|
||||
r = machine_get_uid_shift(machine, &uid_shift);
|
||||
if (r < 0)
|
||||
return log_debug_errno(r, "Failed to get machine UID shift: %m");
|
||||
if (uid_shift != 0) {
|
||||
log_debug_errno(EOPNOTSUPP, "Can't bind mount on container with user namespacing applied.");
|
||||
return sd_varlink_error(link, "io.systemd.Machine.NotSupported", NULL);
|
||||
}
|
||||
|
||||
if (p.read_only)
|
||||
mount_flags |= MOUNT_IN_NAMESPACE_READ_ONLY;
|
||||
if (p.mkdir)
|
||||
mount_flags |= MOUNT_IN_NAMESPACE_MAKE_FILE_OR_DIRECTORY;
|
||||
|
||||
const char *propagate_directory = strjoina("/run/systemd/nspawn/propagate/", machine->name);
|
||||
if (!propagate_directory)
|
||||
return -ENOMEM;
|
||||
|
||||
/* TODO(ikruglov): base on implementation of mount_in_namespace() it
|
||||
* feels better to convert this in an Operation() so we can apply
|
||||
* `manager->n_operations >= OPERATIONS_MAX)`. But it will require
|
||||
* some surgery. */
|
||||
r = bind_mount_in_namespace(
|
||||
&machine->leader,
|
||||
propagate_directory,
|
||||
"/run/host/incoming/",
|
||||
p.src,
|
||||
dest,
|
||||
mount_flags);
|
||||
if (r < 0)
|
||||
return log_debug_errno(r, "Failed to mount %s on %s in machine's namespace: %m", p.src, dest);
|
||||
|
||||
return sd_varlink_reply(link, NULL);
|
||||
}
|
||||
|
|
|
@ -25,3 +25,4 @@ int vl_method_unregister_internal(sd_varlink *link, sd_json_variant *parameters,
|
|||
int vl_method_terminate_internal(sd_varlink *link, sd_json_variant *parameters, sd_varlink_method_flags_t flags, void *userdata);
|
||||
int vl_method_kill(sd_varlink *link, sd_json_variant *parameters, sd_varlink_method_flags_t flags, void *userdata);
|
||||
int vl_method_open(sd_varlink *link, sd_json_variant *parameters, sd_varlink_method_flags_t flags, void *userdata);
|
||||
int vl_method_mount(sd_varlink *link, sd_json_variant *parameters, sd_varlink_method_flags_t flags, void *userdata);
|
||||
|
|
|
@ -774,6 +774,7 @@ static int manager_varlink_init_machine(Manager *m) {
|
|||
"io.systemd.Machine.Terminate", vl_method_terminate,
|
||||
"io.systemd.Machine.Kill", vl_method_kill,
|
||||
"io.systemd.Machine.Open", vl_method_open,
|
||||
"io.systemd.Machine.Mount", vl_method_mount,
|
||||
"io.systemd.MachineImage.List", vl_method_list_images,
|
||||
"io.systemd.MachineImage.Update", vl_method_update_image,
|
||||
"io.systemd.MachineImage.Clone", vl_method_clone_image,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# See tmpfiles.d(5) for details
|
||||
# See tmpfiles.d(5) for details.
|
||||
|
||||
{% if LINK_SHELL_EXTRA_DROPIN %}
|
||||
L$ {{SHELLPROFILEDIR}}/70-systemd-shell-extra.sh - - - - {{LIBEXECDIR}}/profile.d/70-systemd-shell-extra.sh
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# See tmpfiles.d(5) for details
|
||||
# See tmpfiles.d(5) for details.
|
||||
|
||||
{% if LINK_SSH_PROXY_DROPIN %}
|
||||
L$ {{SSHCONFDIR}}/20-systemd-ssh-proxy.conf - - - - {{LIBEXECDIR}}/ssh_config.d/20-systemd-ssh-proxy.conf
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# See tmpfiles.d(5) for details
|
||||
# See tmpfiles.d(5) for details.
|
||||
|
||||
# Copy systemd-stub provided metadata such as PCR signature and public key file
|
||||
# from initrd into /run/, so that it will survive the initrd stage
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# See tmpfiles.d(5) for details
|
||||
# See tmpfiles.d(5) for details.
|
||||
|
||||
{% if LINK_SSHD_USERDB_DROPIN %}
|
||||
L {{SSHDCONFDIR}}/20-systemd-userdb.conf - - - - {{LIBEXECDIR}}/sshd_config.d/20-systemd-userdb.conf
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# See tmpfiles.d(5) for details
|
||||
# See tmpfiles.d(5) for details.
|
||||
|
||||
d /etc/credstore 0700 root root
|
||||
d /etc/credstore.encrypted 0700 root root
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# See tmpfiles.d(5) for details
|
||||
# See tmpfiles.d(5) for details.
|
||||
|
||||
L /etc/os-release - - - - ../usr/lib/os-release
|
||||
L+ /etc/mtab - - - - ../proc/self/mounts
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# See tmpfiles.d(5) for details
|
||||
# See tmpfiles.d(5) for details.
|
||||
|
||||
Q /home 0755 - - -
|
||||
q /srv 0755 - - -
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# See tmpfiles.d(5) for details
|
||||
# See tmpfiles.d(5) for details.
|
||||
|
||||
# Set the NOCOW attribute for directories of journal files. This flag
|
||||
# is inherited by their new files and sub-directories. Matters only
|
||||
|
|
|
@ -5,10 +5,11 @@
|
|||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# See tmpfiles.d(5) for details
|
||||
# See tmpfiles.d(5) for details.
|
||||
|
||||
# These files are considered legacy and are unnecessary on legacy-free
|
||||
# systems.
|
||||
# The functionality provided by these files and directories has been replaced
|
||||
# by newer interfaces. Their use is discouraged on legacy-free systems. This
|
||||
# configuration is provided to maintain backward compatibility.
|
||||
|
||||
d /run/lock 0755 root root -
|
||||
L /var/lock - - - - ../run/lock
|
||||
|
@ -16,15 +17,15 @@ L /var/lock - - - - ../run/lock
|
|||
L$ /var/log/README - - - - ../..{{DOC_DIR}}/README.logs
|
||||
{% endif %}
|
||||
|
||||
{% if HAVE_SYSV_COMPAT %}
|
||||
# /run/lock/subsys is used for serializing SysV service execution, and
|
||||
# hence without use on SysV-less systems.
|
||||
|
||||
d /run/lock/subsys 0755 root root -
|
||||
|
||||
# /forcefsck, /fastboot and /forcequotacheck are deprecated in favor of the
|
||||
# kernel command line options 'fsck.mode=force', 'fsck.mode=skip' and
|
||||
# 'quotacheck.mode=force'
|
||||
|
||||
r! /forcefsck
|
||||
r! /fastboot
|
||||
r! /forcequotacheck
|
||||
{% endif %}
|
||||
|
|
|
@ -35,7 +35,7 @@ in_files = [
|
|||
['20-systemd-stub.conf', 'ENABLE_EFI'],
|
||||
['20-systemd-userdb.conf', 'ENABLE_SSH_USERDB_CONFIG'],
|
||||
['etc.conf'],
|
||||
['legacy.conf', 'HAVE_SYSV_COMPAT'],
|
||||
['legacy.conf'],
|
||||
['static-nodes-permissions.conf'],
|
||||
['systemd.conf'],
|
||||
['var.conf'],
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# See tmpfiles.d(5) for details
|
||||
# See tmpfiles.d(5) for details.
|
||||
|
||||
Q /var/lib/portables 0700
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# See tmpfiles.d(5) for details
|
||||
# See tmpfiles.d(5) for details.
|
||||
|
||||
# Provision additional login messages from credentials, if they are set. Note
|
||||
# that these lines are NOPs if the credentials are not set or if the files
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# See tmpfiles.d(5) for details
|
||||
# See tmpfiles.d(5) for details.
|
||||
|
||||
d$ /run/systemd/netif 0755 systemd-network systemd-network -
|
||||
d$ /run/systemd/netif/links 0755 systemd-network systemd-network -
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# See tmpfiles.d(5) for details
|
||||
# See tmpfiles.d(5) for details.
|
||||
|
||||
Q /var/lib/machines 0700 - - -
|
||||
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# See tmpfiles.d(5) for details
|
||||
# See tmpfiles.d(5) for details.
|
||||
|
||||
L! /etc/resolv.conf - - - - ../run/systemd/resolve/stub-resolv.conf
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# See tmpfiles.d(5) for details
|
||||
# See tmpfiles.d(5) for details.
|
||||
|
||||
# Exclude namespace mountpoints created with PrivateTmp=yes
|
||||
x /tmp/systemd-private-%b-*
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# See tmpfiles.d(5) for details
|
||||
# See tmpfiles.d(5) for details.
|
||||
|
||||
d /run/user 0755 root root -
|
||||
{% if ENABLE_UTMP %}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# See tmpfiles.d(5) for details
|
||||
# See tmpfiles.d(5) for details.
|
||||
|
||||
# Clear tmp directories separately, to make them easier to override
|
||||
q /tmp 1777 root root 10d
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# See tmpfiles.d(5) for details
|
||||
# See tmpfiles.d(5) for details.
|
||||
|
||||
q /var 0755 - - -
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# See tmpfiles.d(5) for details
|
||||
# See tmpfiles.d(5) for details.
|
||||
|
||||
# Make sure these are created by default so that nobody else can
|
||||
# or empty them at startup
|
||||
|
|
Loading…
Reference in New Issue