1
0
mirror of https://github.com/systemd/systemd synced 2026-03-20 03:54:45 +01:00

Compare commits

..

No commits in common. "21ac7884e9c1684d091d893254bcbe4b83740e9f" and "7e4dcd2d1fa32c9f2d3497f514c2dc371cda3f45" have entirely different histories.

9 changed files with 52 additions and 78 deletions

View File

@ -629,12 +629,10 @@
resulting SELinux context originate from either the target resulting SELinux context originate from either the target
binary that is effectively triggered by socket unit or from binary that is effectively triggered by socket unit or from
the value of the <varname>SELinuxContext=</varname> option. the value of the <varname>SELinuxContext=</varname> option.
This configuration option applies only when activated service This configuration option only affects sockets with
is passed in single socket file descriptor, i.e. service <varname>Accept=</varname> mode set to
instances that have standard input connected to a socket or <literal>yes</literal>. Also note that this option is useful
services triggered by exactly one socket unit. Also note only when MLS/MCS SELinux policy is deployed. Defaults to
that this option is useful only when MLS/MCS SELinux policy
is deployed. Defaults to
<literal>false</literal>. </para></listitem> <literal>false</literal>. </para></listitem>
</varlistentry> </varlistentry>

View File

@ -5,23 +5,20 @@
# Julia Dronova <juliette.tux@gmail.com>, 2013. # Julia Dronova <juliette.tux@gmail.com>, 2013.
# Sergey Ptashnick <0comffdiz@inbox.ru>, 2013-2018. # Sergey Ptashnick <0comffdiz@inbox.ru>, 2013-2018.
# Vladimir Yerilov <openmindead@gmail.com>, 2020. # Vladimir Yerilov <openmindead@gmail.com>, 2020.
# Alexey Rubtsov <rushills@gmail.com>, 2021.
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: systemd\n" "Project-Id-Version: systemd\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-08 17:48+0100\n" "POT-Creation-Date: 2021-01-08 17:48+0100\n"
"PO-Revision-Date: 2021-07-02 09:04+0000\n" "PO-Revision-Date: 2020-03-03 16:05+1000\n"
"Last-Translator: Alexey Rubtsov <rushills@gmail.com>\n" "Last-Translator: Vladimir Yerilov <openmindead@gmail.com>\n"
"Language-Team: Russian <https://translate.fedoraproject.org/projects/systemd/"
"master/ru/>\n"
"Language: ru\n" "Language: ru\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
"X-Generator: Weblate 4.7.1\n" "X-Generator: Lokalize 19.12.2\n"
#: src/core/org.freedesktop.systemd1.policy.in:22 #: src/core/org.freedesktop.systemd1.policy.in:22
msgid "Send passphrase back to system" msgid "Send passphrase back to system"
@ -181,7 +178,7 @@ msgstr "Импортировать образ виртуальной машин
msgid "Authentication is required to import a VM or container image" msgid "Authentication is required to import a VM or container image"
msgstr "" msgstr ""
"Чтобы импортировать образ виртуальной машины или контейнера, необходимо " "Чтобы импортировать образ виртуальной машины или контейнера, необходимо "
"пройти аутентификацию" "пройти аутентификацию."
#: src/import/org.freedesktop.import1.policy:32 #: src/import/org.freedesktop.import1.policy:32
msgid "Export a VM or container image" msgid "Export a VM or container image"
@ -191,7 +188,7 @@ msgstr "Экспортировать образ виртуальной маши
msgid "Authentication is required to export a VM or container image" msgid "Authentication is required to export a VM or container image"
msgstr "" msgstr ""
"Чтобы экспортировать образ виртуальной машины или контейнера, необходимо " "Чтобы экспортировать образ виртуальной машины или контейнера, необходимо "
"пройти аутентификацию" "пройти аутентификацию."
#: src/import/org.freedesktop.import1.policy:42 #: src/import/org.freedesktop.import1.policy:42
msgid "Download a VM or container image" msgid "Download a VM or container image"
@ -201,7 +198,7 @@ msgstr "Загрузить образ виртуальной машины или
msgid "Authentication is required to download a VM or container image" msgid "Authentication is required to download a VM or container image"
msgstr "" msgstr ""
"Чтобы загрузить образ виртуальной машины или контейнера, необходимо пройти " "Чтобы загрузить образ виртуальной машины или контейнера, необходимо пройти "
"аутентификацию" "аутентификацию."
#: src/locale/org.freedesktop.locale1.policy:22 #: src/locale/org.freedesktop.locale1.policy:22
msgid "Set system locale" msgid "Set system locale"
@ -332,18 +329,24 @@ msgstr ""
"крышки ноутбука, необходимо пройти аутентификацию." "крышки ноутбука, необходимо пройти аутентификацию."
#: src/login/org.freedesktop.login1.policy:117 #: src/login/org.freedesktop.login1.policy:117
#, fuzzy
#| msgid "Allow applications to inhibit system handling of the power key"
msgid "Allow applications to inhibit system handling of the reboot key" msgid "Allow applications to inhibit system handling of the reboot key"
msgstr "" msgstr ""
"Разрешить приложениям устанавливать блокировку обработки нажатий на кнопку " "Разрешить приложениям устанавливать блокировку обработки нажатий на кнопку "
"перезагрузки" "выключения"
#: src/login/org.freedesktop.login1.policy:118 #: src/login/org.freedesktop.login1.policy:118
#, fuzzy
#| msgid ""
#| "Authentication is required for an application to inhibit system handling "
#| "of the power key."
msgid "" msgid ""
"Authentication is required for an application to inhibit system handling of " "Authentication is required for an application to inhibit system handling of "
"the reboot key." "the reboot key."
msgstr "" msgstr ""
"Чтобы разрешить приложениям устанавливать блокировку обработки нажатий на " "Чтобы разрешить приложениям устанавливать блокировку обработки нажатий на "
"кнопку перезагрузки, необходимо пройти аутентификацию." "кнопку выключения, необходимо пройти аутентификацию."
#: src/login/org.freedesktop.login1.policy:128 #: src/login/org.freedesktop.login1.policy:128
msgid "Allow non-logged-in user to run programs" msgid "Allow non-logged-in user to run programs"
@ -639,7 +642,7 @@ msgstr "Отправить сообщение на все терминалы"
#: src/login/org.freedesktop.login1.policy:397 #: src/login/org.freedesktop.login1.policy:397
msgid "Authentication is required to set a wall message" msgid "Authentication is required to set a wall message"
msgstr "" msgstr ""
"Чтобы отправить сообщение на все терминалы, необходимо пройти аутентификацию" "Чтобы отправить сообщение на все терминалы, необходимо пройти аутентификацию."
#: src/login/org.freedesktop.login1.policy:406 #: src/login/org.freedesktop.login1.policy:406
msgid "Change Session" msgid "Change Session"
@ -841,13 +844,14 @@ msgstr ""
#: src/network/org.freedesktop.network1.policy:143 #: src/network/org.freedesktop.network1.policy:143
msgid "DHCP server sends force renew message" msgid "DHCP server sends force renew message"
msgstr "Сервер DHCP посылает сообщение о принудительном обновлении" msgstr ""
#: src/network/org.freedesktop.network1.policy:144 #: src/network/org.freedesktop.network1.policy:144
#, fuzzy
#| msgid "Authentication is required to set a wall message"
msgid "Authentication is required to send force renew message." msgid "Authentication is required to send force renew message."
msgstr "" msgstr ""
"Чтобы отправить сообщение о принудительном обновлении, необходимо пройти " "Чтобы отправить сообщение на все терминалы, необходимо пройти аутентификацию."
"аутентификацию."
#: src/network/org.freedesktop.network1.policy:154 #: src/network/org.freedesktop.network1.policy:154
msgid "Renew dynamic addresses" msgid "Renew dynamic addresses"
@ -915,7 +919,7 @@ msgstr "Зарегистрировать службу в DNS-SD"
#: src/resolve/org.freedesktop.resolve1.policy:23 #: src/resolve/org.freedesktop.resolve1.policy:23
msgid "Authentication is required to register a DNS-SD service" msgid "Authentication is required to register a DNS-SD service"
msgstr "" msgstr ""
"Чтобы зарегистрировать службу в DNS-SD, необходимо пройти аутентификацию" "Чтобы зарегистрировать службу в DNS-SD, необходимо пройти аутентификацию."
#: src/resolve/org.freedesktop.resolve1.policy:33 #: src/resolve/org.freedesktop.resolve1.policy:33
msgid "Unregister a DNS-SD service" msgid "Unregister a DNS-SD service"
@ -923,7 +927,7 @@ msgstr "Удалить службу из DNS-SD"
#: src/resolve/org.freedesktop.resolve1.policy:34 #: src/resolve/org.freedesktop.resolve1.policy:34
msgid "Authentication is required to unregister a DNS-SD service" msgid "Authentication is required to unregister a DNS-SD service"
msgstr "Чтобы удалить службу из DNS-SD, необходимо пройти аутентификацию" msgstr "Чтобы удалить службу из DNS-SD, необходимо пройти аутентификацию."
#: src/resolve/org.freedesktop.resolve1.policy:132 #: src/resolve/org.freedesktop.resolve1.policy:132
msgid "Revert name resolution settings" msgid "Revert name resolution settings"
@ -1020,8 +1024,12 @@ msgstr ""
"пройти аутентификацию." "пройти аутентификацию."
#: src/core/dbus-unit.c:757 #: src/core/dbus-unit.c:757
#, fuzzy
#| msgid ""
#| "Authentication is required to send a UNIX signal to the processes of "
#| "'$(unit)'."
msgid "" msgid ""
"Authentication is required to freeze or thaw the processes of '$(unit)' unit." "Authentication is required to freeze or thaw the processes of '$(unit)' unit."
msgstr "" msgstr ""
"Чтобы отправить сигнал заморозки или разморозки процессам юнита «$(unit)», " "Чтобы отправить сигнал UNIX процессам юнита «$(unit)», необходимо пройти "
"необходимо пройти аутентификацию." "аутентификацию."

View File

@ -6,7 +6,7 @@
ACTION=="remove", GOTO="persistent_storage_end" ACTION=="remove", GOTO="persistent_storage_end"
ENV{UDEV_DISABLE_PERSISTENT_STORAGE_RULES_FLAG}=="1", GOTO="persistent_storage_end" ENV{UDEV_DISABLE_PERSISTENT_STORAGE_RULES_FLAG}=="1", GOTO="persistent_storage_end"
SUBSYSTEM!="block|ubi", GOTO="persistent_storage_end" SUBSYSTEM!="block", GOTO="persistent_storage_end"
KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|ubi*|scm*|pmem*|nbd*|zd*", GOTO="persistent_storage_end" KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|ubi*|scm*|pmem*|nbd*|zd*", GOTO="persistent_storage_end"
# ignore partitions that span the entire disk # ignore partitions that span the entire disk

View File

@ -201,8 +201,7 @@ int procfs_cpu_get_usage(nsec_t *ret) {
return 0; return 0;
} }
int convert_meminfo_value_to_uint64_bytes(const char *word, uint64_t *ret) { int convert_meminfo_value_to_uint64_bytes(char *word, uint64_t *ret) {
_cleanup_free_ char *w = NULL;
char *digits, *e; char *digits, *e;
uint64_t v; uint64_t v;
size_t n; size_t n;
@ -211,13 +210,9 @@ int convert_meminfo_value_to_uint64_bytes(const char *word, uint64_t *ret) {
assert(word); assert(word);
assert(ret); assert(ret);
w = strdup(word);
if (!w)
return -ENOMEM;
/* Determine length of numeric value */ /* Determine length of numeric value */
n = strspn(w, WHITESPACE); n = strspn(word, WHITESPACE);
digits = w + n; digits = word + n;
n = strspn(digits, DIGITS); n = strspn(digits, DIGITS);
if (n == 0) if (n == 0)
return -EINVAL; return -EINVAL;
@ -237,9 +232,6 @@ int convert_meminfo_value_to_uint64_bytes(const char *word, uint64_t *ret) {
if (v == UINT64_MAX) if (v == UINT64_MAX)
return -EINVAL; return -EINVAL;
if (v > UINT64_MAX/1024)
return -EOVERFLOW;
*ret = v * 1024U; *ret = v * 1024U;
return 0; return 0;
} }

View File

@ -16,4 +16,5 @@ static inline int procfs_memory_get_used(uint64_t *ret) {
return procfs_memory_get(NULL, ret); return procfs_memory_get(NULL, ret);
} }
int convert_meminfo_value_to_uint64_bytes(const char *word, uint64_t *ret); /* This function destroys "word" (it'll be truncated to perform conversion) */
int convert_meminfo_value_to_uint64_bytes(char *word, uint64_t *ret);

View File

@ -4345,22 +4345,11 @@ static int exec_child(
} }
#if HAVE_SELINUX #if HAVE_SELINUX
if (needs_sandboxing && use_selinux && params->selinux_context_net) { if (needs_sandboxing && use_selinux && params->selinux_context_net && socket_fd >= 0) {
int fd = -1; r = mac_selinux_get_child_mls_label(socket_fd, executable, context->selinux_context, &mac_selinux_context_net);
if (r < 0) {
if (socket_fd >= 0) *exit_status = EXIT_SELINUX_CONTEXT;
fd = socket_fd; return log_unit_error_errno(unit, r, "Failed to determine SELinux context: %m");
else if (params->n_socket_fds == 1)
/* If stdin is not connected to a socket but we are triggered by exactly one socket unit then we
* use context from that fd to compute the label. */
fd = params->fds[0];
if (fd >= 0) {
r = mac_selinux_get_child_mls_label(fd, executable, context->selinux_context, &mac_selinux_context_net);
if (r < 0) {
*exit_status = EXIT_SELINUX_CONTEXT;
return log_unit_error_errno(unit, r, "Failed to determine SELinux context: %m");
}
} }
} }
#endif #endif

View File

@ -223,8 +223,6 @@ static int run(int argc, char *argv[]) {
"STATUS=Failed to wait for network connectivity..."); "STATUS=Failed to wait for network connectivity...");
r = sd_event_loop(m->event); r = sd_event_loop(m->event);
if (r == -ETIMEDOUT)
return log_error_errno(r, "Timeout occured while waiting for network connectivity.");
if (r < 0) if (r < 0)
return log_error_errno(r, "Event loop failed: %m"); return log_error_errno(r, "Event loop failed: %m");

View File

@ -129,7 +129,7 @@ bool oomd_mem_free_below(const OomdSystemContext *ctx, int threshold_permyriad)
assert(threshold_permyriad <= 10000); assert(threshold_permyriad <= 10000);
mem_threshold = ctx->mem_total * threshold_permyriad / (uint64_t) 10000; mem_threshold = ctx->mem_total * threshold_permyriad / (uint64_t) 10000;
return LESS_BY(ctx->mem_total, ctx->mem_used) < mem_threshold; return (ctx->mem_total - ctx->mem_used) < mem_threshold;
} }
bool oomd_swap_free_below(const OomdSystemContext *ctx, int threshold_permyriad) { bool oomd_swap_free_below(const OomdSystemContext *ctx, int threshold_permyriad) {
@ -375,14 +375,6 @@ int oomd_system_context_acquire(const char *proc_meminfo_path, OomdSystemContext
uint64_t mem_free, swap_free; uint64_t mem_free, swap_free;
int r; int r;
enum {
MEM_TOTAL = 1U << 0,
MEM_FREE = 1U << 1,
SWAP_TOTAL = 1U << 2,
SWAP_FREE = 1U << 3,
ALL = MEM_TOTAL|MEM_FREE|SWAP_TOTAL|SWAP_FREE,
};
assert(proc_meminfo_path); assert(proc_meminfo_path);
assert(ret); assert(ret);
@ -401,16 +393,16 @@ int oomd_system_context_acquire(const char *proc_meminfo_path, OomdSystemContext
return -EINVAL; return -EINVAL;
if ((word = startswith(line, "MemTotal:"))) { if ((word = startswith(line, "MemTotal:"))) {
field_filled |= MEM_TOTAL; field_filled |= 1U << 0;
r = convert_meminfo_value_to_uint64_bytes(word, &ctx.mem_total); r = convert_meminfo_value_to_uint64_bytes(word, &ctx.mem_total);
} else if ((word = startswith(line, "MemFree:"))) { } else if ((word = startswith(line, "MemFree:"))) {
field_filled |= MEM_FREE; field_filled |= 1U << 1;
r = convert_meminfo_value_to_uint64_bytes(word, &mem_free); r = convert_meminfo_value_to_uint64_bytes(word, &mem_free);
} else if ((word = startswith(line, "SwapTotal:"))) { } else if ((word = startswith(line, "SwapTotal:"))) {
field_filled |= SWAP_TOTAL; field_filled |= 1U << 2;
r = convert_meminfo_value_to_uint64_bytes(word, &ctx.swap_total); r = convert_meminfo_value_to_uint64_bytes(word, &ctx.swap_total);
} else if ((word = startswith(line, "SwapFree:"))) { } else if ((word = startswith(line, "SwapFree:"))) {
field_filled |= SWAP_FREE; field_filled |= 1U << 3;
r = convert_meminfo_value_to_uint64_bytes(word, &swap_free); r = convert_meminfo_value_to_uint64_bytes(word, &swap_free);
} else } else
continue; continue;
@ -418,11 +410,11 @@ int oomd_system_context_acquire(const char *proc_meminfo_path, OomdSystemContext
if (r < 0) if (r < 0)
return log_debug_errno(r, "Error converting '%s' from %s to uint64_t: %m", line, proc_meminfo_path); return log_debug_errno(r, "Error converting '%s' from %s to uint64_t: %m", line, proc_meminfo_path);
if (field_filled == ALL) if (field_filled == 15U)
break; break;
} }
if (field_filled != ALL) if (field_filled != 15U)
return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), "%s is missing expected fields", proc_meminfo_path); return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), "%s is missing expected fields", proc_meminfo_path);
if (mem_free > ctx.mem_total) if (mem_free > ctx.mem_total)

View File

@ -12,7 +12,6 @@ static int parse_af_token(
int *ip_protocol, int *ip_protocol,
uint16_t *nr_ports, uint16_t *nr_ports,
uint16_t *port_min) { uint16_t *port_min) {
int af; int af;
assert(token); assert(token);
@ -32,7 +31,6 @@ static int parse_ip_protocol_token(
int *ip_protocol, int *ip_protocol,
uint16_t *nr_ports, uint16_t *nr_ports,
uint16_t *port_min) { uint16_t *port_min) {
int proto; int proto;
assert(token); assert(token);
@ -52,7 +50,6 @@ static int parse_ip_ports_token(
int *ip_protocol, int *ip_protocol,
uint16_t *nr_ports, uint16_t *nr_ports,
uint16_t *port_min) { uint16_t *port_min) {
assert(token); assert(token);
assert(nr_ports); assert(nr_ports);
assert(port_min); assert(port_min);
@ -85,7 +82,6 @@ int parse_socket_bind_item(
int *ip_protocol, int *ip_protocol,
uint16_t *nr_ports, uint16_t *nr_ports,
uint16_t *port_min) { uint16_t *port_min) {
/* Order of token parsers is important. */ /* Order of token parsers is important. */
const parse_token_f parsers[] = { const parse_token_f parsers[] = {
&parse_af_token, &parse_af_token,
@ -138,7 +134,7 @@ int parse_socket_bind_item(
if (r < 0) if (r < 0)
return r; return r;
/* Parsers applied successfully, but end of the string not reached. */ /* Parsers applied succesfully, but end of the string not reached. */
if (p) if (p)
return -EINVAL; return -EINVAL;