1
0
mirror of https://github.com/systemd/systemd synced 2025-09-30 17:24:46 +02:00

Compare commits

..

7 Commits

Author SHA1 Message Date
Julia Cartwright
afe6a9c48e man: fix misspellings of "NameSeviceSwitch"
Fixup NameSeviceSwitch -> NameServiceSwitch spelling error in
documentation.

Found through inspection of documentation.
2021-02-06 00:00:44 +00:00
Weblate (bot)
33c85738ee
Translations update from Weblate (#18485)
* Translated using Weblate (Swedish)

Currently translated at 100.0% (189 of 189 strings)

Translation: systemd/main
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/sv/

Co-authored-by: Göran Uddeborg <goeran@uddeborg.se>
2021-02-05 23:54:58 +00:00
Lennart Poettering
5055b51ee1 github: ask for systemd version in RFE form
It happens too often that what people ask for already is implemented.
Let's help cut the noise a bit, and make people check things first
hopefully, and at least make it either for us to detect such cases.
2021-02-05 23:42:47 +00:00
Lennart Poettering
f8f5b8d864 resolved: suppress ifindex info in varlink JSON responses if zero
If we don't have ifindex info, don't set the field for it.

We already do that for parsed IP address replies, let's do it for all
cases: it's a bit nicer to suppress the ifindex prop if it doesn't apply
than to pass it invalid.

This is the other side of #18482, i.e. fixes things so that the parser
doesn't get tripped up by this.

(This too makes a problem go away we should track down properly, i.e.
figure out how the ifindex got lost in
https://github.com/systemd/systemd/pull/17823#issuecomment-742439422 )
2021-02-06 00:17:10 +01:00
Lennart Poettering
9c09454dce
Merge pull request #18482 from poettering/resolved-nss-varlink-ifindex-fix
nss-resolve: handle zero ifindex reply from server
2021-02-06 00:16:28 +01:00
Lennart Poettering
425ed13991 nss-resolve: shortcut fixing of ifindex if it's zero anyway 2021-02-05 18:46:18 +01:00
Lennart Poettering
6da52ca861 nss-resolve: accept zero ifindex when parsing resolved reply
Sometimes a reply isn't associated to any specific interface, it might
be a general truth (for example served from /etc/hosts or so). In this
case the server might pass ifindex == 0. Accept that.

https://github.com/systemd/systemd/pull/17823#issuecomment-742439422
2021-02-05 18:44:22 +01:00
6 changed files with 28 additions and 40 deletions

View File

@ -12,3 +12,6 @@ A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**The systemd version you checked that didn't have the feature you are asking for**
<!-- If this is not the most recently released upstream version, then please check first if it has that feature already. -->

View File

@ -50,7 +50,7 @@
group records. Internally it talks to all other user/group record services running on the system in
parallel and forwards any information discovered. This simplifies clients substantially since they need
to talk to a single service only instead of all of them in
parallel. <constant>io.systemd.NameSeviceSwitch</constant> provides compatibility with classic UNIX/glibc
parallel. <constant>io.systemd.NameServiceSwitch</constant> provides compatibility with classic UNIX/glibc
NSS user records, i.e. converts <type>struct passwd</type> and <type>struct group</type> records as
acquired with APIs such as <citerefentry
project='man-pages'><refentrytitle>getpwnam</refentrytitle><manvolnum>1</manvolnum></citerefentry> to JSON

View File

@ -215,7 +215,7 @@
</varlistentry>
<varlistentry>
<term><constant>io.systemd.NameSeviceSwitch</constant></term>
<term><constant>io.systemd.NameServiceSwitch</constant></term>
<listitem><para>This service is (also) provided by
<citerefentry><refentrytitle>systemd-userdbd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
@ -232,7 +232,7 @@
<para>Note that <command>userdbctl</command> has internal support for NSS-based lookups too. This means
that if neither <constant>io.systemd.Multiplexer</constant> nor
<constant>io.systemd.NameSeviceSwitch</constant> are running look-ups into the basic user/group
<constant>io.systemd.NameServiceSwitch</constant> are running look-ups into the basic user/group
databases will still work.</para>
</refsect1>

View File

@ -11,7 +11,7 @@ msgstr ""
"Project-Id-Version: systemd master\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-08 17:48+0100\n"
"PO-Revision-Date: 2021-02-03 18:40+0000\n"
"PO-Revision-Date: 2021-02-05 20:40+0000\n"
"Last-Translator: Göran Uddeborg <goeran@uddeborg.se>\n"
"Language-Team: Swedish <https://translate.fedoraproject.org/projects/systemd/"
"master/sv/>\n"
@ -804,56 +804,48 @@ msgstr "Autentisering krävs för att inspektera en portabel tjänsteavbild."
#: src/portable/org.freedesktop.portable1.policy:23
msgid "Attach or detach a portable service image"
msgstr ""
msgstr "Koppla in eller koppla ifrån en portabel tjänsteavbild"
#: src/portable/org.freedesktop.portable1.policy:24
#, fuzzy
#| msgid "Authentication is required to attach a device to a seat."
msgid ""
"Authentication is required to attach or detach a portable service image."
msgstr "Autentisering krävs för att binda en enhet till en plats."
msgstr ""
"Autentisering krävs för att koppla in eller koppla ifrån en portabel "
"tjänsteavbild."
#: src/portable/org.freedesktop.portable1.policy:34
msgid "Delete or modify portable service image"
msgstr ""
msgstr "Radera eller modifiera en portabel tjänsteavbild"
#: src/portable/org.freedesktop.portable1.policy:35
#, fuzzy
#| msgid "Authentication is required to download a VM or container image"
msgid ""
"Authentication is required to delete or modify a portable service image."
msgstr "Autentisering krävs för att hämta ner en VM eller behållaravbildning"
msgstr ""
"Autentisering krävs för att radera eller modifiera en portabel tjänsteavbild."
#: src/resolve/org.freedesktop.resolve1.policy:22
msgid "Register a DNS-SD service"
msgstr "Registrera en DNS-SD-tjänst"
#: src/resolve/org.freedesktop.resolve1.policy:23
#, fuzzy
#| msgid "Authentication is required to set a wall message"
msgid "Authentication is required to register a DNS-SD service"
msgstr "Autentisering krävs för att ställa in ett väggmeddelande"
msgstr "Autentisering krävs för att registrera en DNS-SD-tjänst"
#: src/resolve/org.freedesktop.resolve1.policy:33
msgid "Unregister a DNS-SD service"
msgstr "Avregistrera en DNS-SD-tjänst"
#: src/resolve/org.freedesktop.resolve1.policy:34
#, fuzzy
#| msgid "Authentication is required to set a wall message"
msgid "Authentication is required to unregister a DNS-SD service"
msgstr "Autentisering krävs för att ställa in ett väggmeddelande"
msgstr "Autentisering krävs för att avregistrera en DNS-SD-tjänst"
#: src/resolve/org.freedesktop.resolve1.policy:132
msgid "Revert name resolution settings"
msgstr ""
msgstr "Återställ namnuppslagningsinställningar"
#: src/resolve/org.freedesktop.resolve1.policy:133
#, fuzzy
#| msgid "Authentication is required to set the system keyboard settings."
msgid "Authentication is required to reset name resolution settings."
msgstr ""
"Autentisering krävs för att ställa in systeminställningar för tangentbord."
msgstr "Autentisering krävs för att återställa namnuppslagningsinställningar."
#: src/timedate/org.freedesktop.timedate1.policy:22
msgid "Set system time"
@ -914,12 +906,12 @@ msgid "Authentication is required to restart '$(unit)'."
msgstr "Autentisering krävs för att starta om \"$(unit)\"."
#: src/core/dbus-unit.c:535
#, fuzzy
#| msgid "Authentication is required to set properties on '$(unit)'."
msgid ""
"Authentication is required to send a UNIX signal to the processes of "
"'$(unit)'."
msgstr "Autentisering krävs för att ställa in egenskaper på \"$(unit)\"."
msgstr ""
"Autentisering krävs för att skicka en UNIX-signal till processerna i "
"”$(unit)”."
#: src/core/dbus-unit.c:566
msgid "Authentication is required to reset the \"failed\" state of '$(unit)'."
@ -932,25 +924,18 @@ msgid "Authentication is required to set properties on '$(unit)'."
msgstr "Autentisering krävs för att ställa in egenskaper på \"$(unit)\"."
#: src/core/dbus-unit.c:708
#, fuzzy
#| msgid ""
#| "Authentication is required to reset the \"failed\" state of '$(unit)'."
msgid ""
"Authentication is required to delete files and directories associated with "
"'$(unit)'."
msgstr ""
"Autentisering krävs för att återställa det \"fallerade\" tillståndet för "
"\"$(unit)\"."
"Autentisering krävs för att radera filer och kataloger associerade med "
"”$(unit)”."
#: src/core/dbus-unit.c:757
#, fuzzy
#| msgid ""
#| "Authentication is required to reset the \"failed\" state of '$(unit)'."
msgid ""
"Authentication is required to freeze or thaw the processes of '$(unit)' unit."
msgstr ""
"Autentisering krävs för att återställa det \"fallerade\" tillståndet för "
"\"$(unit)\"."
"Autentisering krävs för att frysa eller töa processerna i enheten ”$(unit)”."
#~ msgid ""
#~ "Authentication is required to halt the system while an application asked "

View File

@ -68,7 +68,7 @@ static int connect_to_resolved(Varlink **ret) {
static uint32_t ifindex_to_scopeid(int family, const void *a, int ifindex) {
struct in6_addr in6;
if (family != AF_INET6)
if (family != AF_INET6 || ifindex == 0)
return 0;
/* Some apps can't deal with the scope ID attached to non-link-local addresses. Hence, let's suppress that. */
@ -90,7 +90,7 @@ static int json_dispatch_ifindex(const char *name, JsonVariant *variant, JsonDis
return json_log(variant, flags, SYNTHETIC_ERRNO(EINVAL), "JSON field '%s' is not an integer.", strna(name));
t = json_variant_integer(variant);
if (t <= 0 || t > INT_MAX)
if (t > INT_MAX)
return json_log(variant, flags, SYNTHETIC_ERRNO(EINVAL), "JSON field '%s' is out of bounds for an interface index.", strna(name));
*ifi = (int) t;

View File

@ -180,7 +180,7 @@ static void vl_method_resolve_hostname_complete(DnsQuery *q) {
r = json_build(&entry,
JSON_BUILD_OBJECT(
JSON_BUILD_PAIR("ifindex", JSON_BUILD_INTEGER(ifindex)),
JSON_BUILD_PAIR_CONDITION(ifindex > 0, "ifindex", JSON_BUILD_INTEGER(ifindex)),
JSON_BUILD_PAIR("family", JSON_BUILD_INTEGER(family)),
JSON_BUILD_PAIR("address", JSON_BUILD_BYTE_ARRAY(p, FAMILY_ADDRESS_SIZE(family)))));
if (r < 0)
@ -408,7 +408,7 @@ static void vl_method_resolve_address_complete(DnsQuery *q) {
r = json_build(&entry,
JSON_BUILD_OBJECT(
JSON_BUILD_PAIR("ifindex", JSON_BUILD_INTEGER(ifindex)),
JSON_BUILD_PAIR_CONDITION(ifindex > 0, "ifindex", JSON_BUILD_INTEGER(ifindex)),
JSON_BUILD_PAIR("name", JSON_BUILD_STRING(normalized))));
if (r < 0)
goto finish;