]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
5 years agoresolve: openssl: make dnstls_stream_{write,read}() may return zero 9787/head
Yu Watanabe [Thu, 2 Aug 2018 22:18:43 +0000 (07:18 +0900)] 
resolve: openssl: make dnstls_stream_{write,read}() may return zero

5 years agoresolve: fix error handling of SSL_shutdown()
Yu Watanabe [Thu, 2 Aug 2018 21:34:19 +0000 (06:34 +0900)] 
resolve: fix error handling of SSL_shutdown()

5 years agoresolve: fix typo and coding style cleanups
Yu Watanabe [Thu, 2 Aug 2018 21:29:38 +0000 (06:29 +0900)] 
resolve: fix typo and coding style cleanups

5 years agoresolve: clear error queue before calling SSL_*()
Yu Watanabe [Thu, 2 Aug 2018 21:26:58 +0000 (06:26 +0900)] 
resolve: clear error queue before calling SSL_*()

5 years agoMerge pull request #9776 from keszybz/sd-bus-docs
Lennart Poettering [Thu, 2 Aug 2018 15:07:03 +0000 (17:07 +0200)] 
Merge pull request #9776 from keszybz/sd-bus-docs

More man pages for sd-bus and related changes

5 years agoresolve: fix error handling of dns_stream_read()
Yu Watanabe [Thu, 2 Aug 2018 13:38:22 +0000 (22:38 +0900)] 
resolve: fix error handling of dns_stream_read()

5 years agoMerge pull request #9764 from yuwata/hash_ops-cleanups
Zbigniew Jędrzejewski-Szmek [Thu, 2 Aug 2018 13:53:05 +0000 (15:53 +0200)] 
Merge pull request #9764 from yuwata/hash_ops-cleanups

Hash ops cleanups

5 years agoman: add sd_bus_message_rewind(3) 9776/head
Zbigniew Jędrzejewski-Szmek [Thu, 2 Aug 2018 08:38:51 +0000 (10:38 +0200)] 
man: add sd_bus_message_rewind(3)

5 years agoman: document sd_bus_slot_get_bus in sd_bus_slot_ref(3)
Zbigniew Jędrzejewski-Szmek [Wed, 1 Aug 2018 22:00:15 +0000 (00:00 +0200)] 
man: document sd_bus_slot_get_bus in sd_bus_slot_ref(3)

Similar reasoning as for sd_bus_message_get_bus().

5 years agoman: add sd_bus_slot_set_description(3)
Zbigniew Jędrzejewski-Szmek [Wed, 1 Aug 2018 21:56:36 +0000 (23:56 +0200)] 
man: add sd_bus_slot_set_description(3)

5 years agoman: add sd_bus_slot_set_userdata(3)
Zbigniew Jędrzejewski-Szmek [Wed, 1 Aug 2018 21:41:49 +0000 (23:41 +0200)] 
man: add sd_bus_slot_set_userdata(3)

5 years agoman: add sd_bus_message_set_expect_reply(3)
Zbigniew Jędrzejewski-Szmek [Wed, 1 Aug 2018 15:27:31 +0000 (17:27 +0200)] 
man: add sd_bus_message_set_expect_reply(3)

5 years agoman: document sd_bus_message_get_bus() in sd_bus_message_new(3)
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jul 2018 15:47:17 +0000 (17:47 +0200)] 
man: document sd_bus_message_get_bus() in sd_bus_message_new(3)

It's not a particularly obvious place, but it's a trivial function that isn't
worth a man page of its own, and it doesn't fit anywhere else either.

5 years agoman: add sd_bus_message_verify_type(3)
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jul 2018 14:33:02 +0000 (16:33 +0200)] 
man: add sd_bus_message_verify_type(3)

5 years agosd-bus: verify destination and sender values when setting
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jul 2018 13:39:46 +0000 (15:39 +0200)] 
sd-bus: verify destination and sender values when setting

We would verify destination e.g. in sd_bus_message_new_call, but allow setting
any value later on with sd_bus_message_set_destination. I assume this check was
omitted not on purpose.

5 years agoman: add sd_bus_message_get_type(3)
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jul 2018 12:58:41 +0000 (14:58 +0200)] 
man: add sd_bus_message_get_type(3)

sd_bus_message{get_type,is_signal,is_method_call,is_method_error} get one man
page.

sd_bus_message_{set,get}_{destination,path,interface,member,sender} are put in
the second one.

5 years agoman: add sd_bus_slot_ref(3)
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jul 2018 12:15:50 +0000 (14:15 +0200)] 
man: add sd_bus_slot_ref(3)

5 years agoman: document sd_bus_message_new_method_return
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jul 2018 12:07:02 +0000 (14:07 +0200)] 
man: document sd_bus_message_new_method_return

5 years agomeson: print stats in check-api-docs
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jul 2018 08:32:20 +0000 (10:32 +0200)] 
meson: print stats in check-api-docs

5 years agoman: document *_with_description functions
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jul 2018 07:56:43 +0000 (09:56 +0200)] 
man: document *_with_description functions

5 years agoman: add sd_bus_message_new(3)
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jul 2018 07:03:04 +0000 (09:03 +0200)] 
man: add sd_bus_message_new(3)

5 years agoman: move more examples to stand-alone files and use 2-space indentation consistenty
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jul 2018 06:24:45 +0000 (08:24 +0200)] 
man: move more examples to stand-alone files and use 2-space indentation consistenty

Moving them out makes it easier to run them through a compiler, use automatic
indentation, and opens the possibility to provide a download link in the
future. I verified that all examples compile cleanly.

(2-space indentation is used because the examples are already significantly
indented in the man page, and we need to keep them narrow so that they display
well on standard terminals.)

5 years agoman: clarify what can be NULL in an sd_bus_unrefp call
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jul 2018 06:06:07 +0000 (08:06 +0200)] 
man: clarify what can be NULL in an sd_bus_unrefp call

Confusingly, the argument is called 'bus' in all cases. Let's not give people
the idea to call sd_bus_unrefp(NULL).

5 years agoman: add sd_bus_message_new_call(3)
Zbigniew Jędrzejewski-Szmek [Thu, 26 Jul 2018 18:00:36 +0000 (20:00 +0200)] 
man: add sd_bus_message_new_call(3)

5 years agoman: add sd_bus_message_new_signal(3)
Zbigniew Jędrzejewski-Szmek [Tue, 24 Jul 2018 21:23:29 +0000 (23:23 +0200)] 
man: add sd_bus_message_new_signal(3)

5 years agobasic: use FAMILY_ADDRESS_SIZE() macro in hash_ops for in_addr_data 9764/head
Yu Watanabe [Tue, 31 Jul 2018 16:18:57 +0000 (01:18 +0900)] 
basic: use FAMILY_ADDRESS_SIZE() macro in hash_ops for in_addr_data

5 years agonetwork: make compare functions safe
Yu Watanabe [Tue, 31 Jul 2018 16:15:23 +0000 (01:15 +0900)] 
network: make compare functions safe

As the variable 'line' is unsigned.

5 years agoMerge pull request #9624 from poettering/service-state-flush
Zbigniew Jędrzejewski-Szmek [Thu, 2 Aug 2018 07:50:39 +0000 (09:50 +0200)] 
Merge pull request #9624 from poettering/service-state-flush

flush out ExecStatus structures when a new service cycle begins

5 years agonetwork: add more log messages in configuring DHCP6 client
Yu Watanabe [Wed, 1 Aug 2018 01:42:49 +0000 (10:42 +0900)] 
network: add more log messages in configuring DHCP6 client

5 years agonetwork: add more log messages in configuring DHCP4 client
Yu Watanabe [Wed, 1 Aug 2018 01:35:17 +0000 (10:35 +0900)] 
network: add more log messages in configuring DHCP4 client

5 years agoMerge pull request #9770 from keszybz/etc-resolved-no-address
Yu Watanabe [Thu, 2 Aug 2018 03:54:50 +0000 (12:54 +0900)] 
Merge pull request #9770 from keszybz/etc-resolved-no-address

Slightly more efficient handling of /etc/hosts blacklist entries

5 years agoresolved: change error handling for manager_etc_hosts_read() 9770/head
Zbigniew Jędrzejewski-Szmek [Wed, 1 Aug 2018 10:41:54 +0000 (12:41 +0200)] 
resolved: change error handling for manager_etc_hosts_read()

The choice what errors to ignore is left to the caller, and the caller is
changed to ignore all errors.

On error, previously read data is kept. So if e.g. an oom error happens, we
will continue to return slightly stale data instead of pretending we have no
entries for the given address. I think that's better, for example when
/etc/hosts contains some important overrides that external DNS should not be
queried for.

5 years agoresolved: keep addresses mapped to ::0 in a separate set
Zbigniew Jędrzejewski-Szmek [Tue, 31 Jul 2018 13:09:13 +0000 (15:09 +0200)] 
resolved: keep addresses mapped to ::0 in a separate set

We'd store every 0.0.0.0 and ::0 entry as a structure without any addresses
allocated. This is a somewhat common use case, let's optimize it a bit.

This gives some memory savings and a bit faster response time too:
'time build/test-resolved-etc-hosts hosts' goes from 7.7s to 5.6s, and
memory use as reported by valgrind for ~10000 hosts is reduced
==18097==   total heap usage: 29,902 allocs, 29,902 frees, 2,136,437 bytes allocated
==18240==   total heap usage: 19,955 allocs, 19,955 frees, 1,556,021 bytes allocated

Also rename 'suppress' to 'found' (with reverse meaning). I think this makes
the intent clearer.

5 years agotest-resolved-etc-hosts: add tests for /etc/hosts parsing
Zbigniew Jędrzejewski-Szmek [Tue, 31 Jul 2018 09:01:21 +0000 (11:01 +0200)] 
test-resolved-etc-hosts: add tests for /etc/hosts parsing

Calling 'build/test-resolved-etc-hosts filename' parses just that file.
This is useful to test against https://hosts.ubuntu101.co.za/hosts.

5 years agoresolved: put /etc/hosts hashmaps in a structure and pass that around
Zbigniew Jędrzejewski-Szmek [Tue, 31 Jul 2018 08:01:46 +0000 (10:01 +0200)] 
resolved: put /etc/hosts hashmaps in a structure and pass that around

This hides the details of juggling the two hashmaps from the callers a bit.
It also makes memory management a bit easier, because those two hashmaps share
some strings, so we can only free them together.

etc_hosts_parse() is made responsible to free the half-filled data structures
on error, which makes the caller a bit simpler.

No functional change. A refactoring to prepare for later changes.

5 years agotest-nss-files: simplify module name handling
Zbigniew Jędrzejewski-Szmek [Tue, 31 Jul 2018 14:06:43 +0000 (16:06 +0200)] 
test-nss-files: simplify module name handling

- drop compatibility with autotools (/.libs/ directory)
- don't special-case "libnss_dns", just try build/libnss_foo.so.2 and libnss_foo.so.2.
  This makes it possible to call e.g. build/test-nss files google.com.

5 years agomeson: drop parens when appending to list
Zbigniew Jędrzejewski-Szmek [Tue, 31 Jul 2018 07:44:11 +0000 (09:44 +0200)] 
meson: drop parens when appending to list

Meson does not care either way, so let's use the simpler syntax. And files()
already gives a list, so nesting this in a list wouldn't be necessary even
if meson did not flatten everything.

5 years agoMerge pull request #9760 from yuwata/resolve-etc-hosts-cleanup
Lennart Poettering [Tue, 31 Jul 2018 08:52:34 +0000 (10:52 +0200)] 
Merge pull request #9760 from yuwata/resolve-etc-hosts-cleanup

resolve: several cleanups of handing /etc/hosts

5 years agoudev: net_id: document predictable names for SR-IOV virtual devices
Evgeni Golov [Mon, 30 Jul 2018 11:56:07 +0000 (13:56 +0200)] 
udev: net_id: document predictable names for SR-IOV virtual devices

5 years agoresolve: support address with ifname in /etc/hosts 9760/head
Yu Watanabe [Tue, 31 Jul 2018 07:12:13 +0000 (16:12 +0900)] 
resolve: support address with ifname in /etc/hosts

5 years agoresolve: use in_addr_data type for storing address
Yu Watanabe [Tue, 31 Jul 2018 06:46:28 +0000 (15:46 +0900)] 
resolve: use in_addr_data type for storing address

5 years agobasic: introduce in_addr_data_hash_ops
Yu Watanabe [Tue, 31 Jul 2018 06:45:38 +0000 (15:45 +0900)] 
basic: introduce in_addr_data_hash_ops

5 years agoman: move explanations about boolean and time-span value from systemd.unit to systemd...
Yu Watanabe [Fri, 27 Jul 2018 08:52:12 +0000 (17:52 +0900)] 
man: move explanations about boolean and time-span value from systemd.unit to systemd.syntax

Fixes #9735.

5 years agoMerge pull request #9734 from irtimmer/feature/dns-over-tls-openssl
Lennart Poettering [Mon, 30 Jul 2018 12:13:05 +0000 (14:13 +0200)] 
Merge pull request #9734 from irtimmer/feature/dns-over-tls-openssl

resolved: Add OpenSSL as alternative SSL library

5 years agoMerge pull request #9747 from yuwata/workaround-structured-initialization
Lennart Poettering [Mon, 30 Jul 2018 11:25:37 +0000 (13:25 +0200)] 
Merge pull request #9747 from yuwata/workaround-structured-initialization

sd-resolve: use structured initialization and a workaround for nested structs

5 years agoExpanding evdev device match for Razer Blade Stealth (2017)
Mike Palmer [Sun, 29 Jul 2018 06:08:31 +0000 (23:08 -0700)] 
Expanding evdev device match for Razer Blade Stealth (2017)

5 years agoMerge pull request #9742 from yuwata/workaround-9718
Lennart Poettering [Mon, 30 Jul 2018 10:40:20 +0000 (12:40 +0200)] 
Merge pull request #9742 from yuwata/workaround-9718

resolve: add option to toggle reading /etc/hosts

5 years agosd-resolve: workaround for structured initialization to nested structs 9747/head
Yu Watanabe [Sun, 29 Jul 2018 07:04:56 +0000 (16:04 +0900)] 
sd-resolve: workaround for structured initialization to nested structs

When a nested struct is initialized by structured initializer, then
padding space is not cleared by zero. So, before setting values,
this makes explicitly set zero including padding.

This fixes the following false positive warning by valgrind:
```
==492== Syscall param sendmsg(msg.msg_iov[0]) points to uninitialised byte(s)
==492==    at 0x56D0CF7: sendmsg (in /usr/lib64/libpthread-2.27.so)
==492==    by 0x4FDD3C5: sd_resolve_getaddrinfo (sd-resolve.c:975)
==492==    by 0x110B9E: manager_connect (timesyncd-manager.c:879)
==492==    by 0x10B729: main (timesyncd.c:165)
==492==  Address 0x1fff0008f1 is on thread 1's stack
==492==  in frame #1, created by sd_resolve_getaddrinfo (sd-resolve.c:928)
==492==
```

5 years agosd-resolve: use structured initialization at more places
Yu Watanabe [Sun, 29 Jul 2018 07:01:37 +0000 (16:01 +0900)] 
sd-resolve: use structured initialization at more places

5 years agoman: use literal tag 9742/head
Yu Watanabe [Sat, 28 Jul 2018 12:46:22 +0000 (21:46 +0900)] 
man: use literal tag

5 years agoresolve: add option to toggle reading /etc/hosts
Yu Watanabe [Sat, 28 Jul 2018 12:46:00 +0000 (21:46 +0900)] 
resolve: add option to toggle reading /etc/hosts

Workaround for #9718.

5 years agoresolve: make manager_etc_hosts_read() static
Yu Watanabe [Sat, 28 Jul 2018 11:36:13 +0000 (20:36 +0900)] 
resolve: make manager_etc_hosts_read() static

5 years agoresolved: TCP Fast Open and TLS Session Tickets for OpenSSL 9734/head
Iwan Timmer [Thu, 26 Jul 2018 23:01:58 +0000 (00:01 +0100)] 
resolved: TCP Fast Open and TLS Session Tickets for OpenSSL

To decreae latency this add support for TFO and TLS Session Tickets. As OpenSSL wouldn't let you easily set a different function all written data is temporarily cached and therefore needs to be flushed after each SSL function which can write data.

5 years agoresolved: basic OpenSSL support for DNS-over-TLS
Iwan Timmer [Thu, 26 Jul 2018 21:47:50 +0000 (22:47 +0100)] 
resolved: basic OpenSSL support for DNS-over-TLS

This provides basic OpenSSL support without optimizations like TCP Fast Open and TLS Session Tickets.
Notice only a single SSL library can be enabled at a time and therefore journald functions provided by GnuTLS will be disabled when using OpenSSL.
Fixes #9531

5 years agoresolved: set io events after receiving EAGAIN for TLS
Iwan Timmer [Thu, 26 Jul 2018 19:34:16 +0000 (20:34 +0100)] 
resolved: set io events after receiving EAGAIN for TLS

During handshake and TLS session closing, messages needs to be exchanged. Therefore this patch overrides the requested IO events for the TCP stream when the TLS is waiting for sending or receiving of messages during theses periods. This fixes issues with correctly closing the TLS stream and prevents the handshake from hanging in rare cases (not seen yet).

5 years agoresolved: refactor GnuTLS specific code in separate source file
Iwan Timmer [Tue, 17 Jul 2018 06:34:29 +0000 (23:34 -0700)] 
resolved: refactor GnuTLS specific code in separate source file

This is a first step towards supporting alternative TLS implementations for DNS-over-TLS.

Co-authored-by: Filipe Brandenburger <filbranden@google.com>
5 years agotest: Increase qemu timeout from 90s to 180s
Michael Biebl [Wed, 25 Jul 2018 11:58:00 +0000 (13:58 +0200)] 
test: Increase qemu timeout from 90s to 180s

The usage of an initrd made TEST-09-ISSUE-2691 more likely to fail with
a timeout, so increase the timeout by 90s and adjust TimeoutStopSec=
accordingly.

5 years agoMerge pull request #9726 from dkozovsk/master
Lennart Poettering [Fri, 27 Jul 2018 07:56:24 +0000 (09:56 +0200)] 
Merge pull request #9726 from dkozovsk/master

signal safety fixes exit ->_exit, call of page_size to prevent call of sysconf from signal handler

5 years agoupdate TODO
Lennart Poettering [Thu, 26 Jul 2018 14:55:27 +0000 (16:55 +0200)] 
update TODO

5 years agohwdb: Added correct ACCEL_MOUNT_MATRIX for the Asus TP412UA
Erik Kooistra [Thu, 26 Jul 2018 11:35:55 +0000 (13:35 +0200)] 
hwdb: Added correct ACCEL_MOUNT_MATRIX for the Asus TP412UA

5 years agovoid call of page_size guarantees that sysconf is not called from signal handler 9726/head
Daniel [Thu, 26 Jul 2018 13:39:12 +0000 (15:39 +0200)] 
void call of page_size guarantees that sysconf is not called from signal handler

5 years agochanged exit(4) to asynchronous-safe _exit(4) in signal handler sig_alrm
Daniel [Thu, 26 Jul 2018 12:47:38 +0000 (14:47 +0200)] 
changed exit(4) to asynchronous-safe _exit(4) in signal handler sig_alrm

5 years agoMerge pull request #9721 from yuwata/fix-resolve-memleak
Zbigniew Jędrzejewski-Szmek [Thu, 26 Jul 2018 12:22:15 +0000 (14:22 +0200)] 
Merge pull request #9721 from yuwata/fix-resolve-memleak

Fix resolve memleak

5 years agoMerge pull request #9719 from poettering/sleep-fixes
Lennart Poettering [Thu, 26 Jul 2018 12:03:18 +0000 (14:03 +0200)] 
Merge pull request #9719 from poettering/sleep-fixes

require the kernel image to still exist before allowing hibernation

5 years agoMerge pull request #9720 from yuwata/fix-9702
Zbigniew Jędrzejewski-Szmek [Thu, 26 Jul 2018 09:42:00 +0000 (11:42 +0200)] 
Merge pull request #9720 from yuwata/fix-9702

Fix DynamicUser=yes with static User= whose UID and GID are different

5 years agohwbd: whitespace fix-up 9719/head
Lennart Poettering [Wed, 25 Jul 2018 20:23:17 +0000 (22:23 +0200)] 
hwbd: whitespace fix-up

A correction for 505707490a201c27121dbeb27101fe0c9b5f9664.

5 years agosleep-config: library code should not log beyond LOG_DEBUG
Lennart Poettering [Wed, 25 Jul 2018 20:22:37 +0000 (22:22 +0200)] 
sleep-config: library code should not log beyond LOG_DEBUG

5 years agosleep: offer hibernation only if the kernel image still exists
Lennart Poettering [Wed, 25 Jul 2018 20:19:44 +0000 (22:19 +0200)] 
sleep: offer hibernation only if the kernel image still exists

This makes hibernation unavailable if the kernel image we are currently
running was removed. This is supposed to be superficial protection
against hibernating a system we can never return from because the kernel
has been updated and the kernel we currently run is not available
anymore.

We look at a couple of places for the kernel, which should cover all
distributions I know off. Should I have missed a path I am sure people
will quickly notice and we can add more places to check. (or maybe
convince those distros to stick their kernels at a standard place)

5 years agosleep-config: eat up errors only after debug logging about them
Lennart Poettering [Wed, 25 Jul 2018 19:43:09 +0000 (21:43 +0200)] 
sleep-config: eat up errors only after debug logging about them

5 years agosleep-config: partitions can't be deleted, only files can
Lennart Poettering [Wed, 25 Jul 2018 19:41:58 +0000 (21:41 +0200)] 
sleep-config: partitions can't be deleted, only files can

This fixes something I think was basically a typo introduced in
db69869f264af2d1afcdd3e573e0e9fdd5bef065.

5 years agoresolve: use structured initialization and use new() instead of new0() 9721/head
Yu Watanabe [Thu, 26 Jul 2018 08:43:09 +0000 (17:43 +0900)] 
resolve: use structured initialization and use new() instead of new0()

5 years agoresolve: fix memleak
Yu Watanabe [Thu, 26 Jul 2018 08:33:23 +0000 (17:33 +0900)] 
resolve: fix memleak

5 years agoMerge pull request #9684 from yuwata/fix-9672
Zbigniew Jędrzejewski-Szmek [Thu, 26 Jul 2018 08:42:50 +0000 (10:42 +0200)] 
Merge pull request #9684 from yuwata/fix-9672

timedate, locale: fix barrier to suppress multiple function calls

5 years agoshared/sleep-config: exclude zram devices from hibernation candidates
Andrew Jorgensen [Wed, 25 Jul 2018 15:06:57 +0000 (08:06 -0700)] 
shared/sleep-config: exclude zram devices from hibernation candidates

On a host with sufficiently large zram but with no actual swap, logind will
respond to CanHibernate() with yes. With this patch, it will correctly respond
no, unless there are other swap devices to consider.

5 years agoMerge pull request #9504 from poettering/nss-deadlock
Zbigniew Jędrzejewski-Szmek [Thu, 26 Jul 2018 08:16:25 +0000 (10:16 +0200)] 
Merge pull request #9504 from poettering/nss-deadlock

some nss deadlock love

5 years agoMerge pull request #9484 from poettering/permille-everywhere
Zbigniew Jędrzejewski-Szmek [Thu, 26 Jul 2018 08:13:56 +0000 (10:13 +0200)] 
Merge pull request #9484 from poettering/permille-everywhere

Permille everywhere

5 years agoMerge pull request #9620 from poettering/type-exec
Zbigniew Jędrzejewski-Szmek [Thu, 26 Jul 2018 07:34:11 +0000 (09:34 +0200)] 
Merge pull request #9620 from poettering/type-exec

add new Type=exec service type

5 years agotest: add tests for DynamicUser= with static User= whose UID and GID are different 9720/head
Yu Watanabe [Thu, 26 Jul 2018 02:59:53 +0000 (11:59 +0900)] 
test: add tests for DynamicUser= with static User= whose UID and GID are different

5 years agocore: fix gid when DynamicUser=yes with static User=
Yu Watanabe [Thu, 26 Jul 2018 02:42:54 +0000 (11:42 +0900)] 
core: fix gid when DynamicUser=yes with static User=

When DynamicUser=yes and static User= are set, and the user has
different uid and gid, then as the storage socket for the dynamic
user does not contains gid, we need to obtain gid.

Follow-up for 9ec655cbbd7505ef465e0444da0622e46099ce42.

Fixes #9702.

5 years agotimedate: defer the property changed signal until job of starting/stopping NTP servic... 9684/head
Yu Watanabe [Sun, 22 Jul 2018 14:10:02 +0000 (23:10 +0900)] 
timedate: defer the property changed signal until job of starting/stopping NTP service is finished

Before this, the property changed signal is emitted immediately after
StartUnit/StopUnit method is called. So, the running state of the NTP
client service may not updated.
This makes the timing of emitting property changed signal is deferred
until job of starting/stopping NTP client service is completed.

Fixes #9672.

5 years agolocale: increment reference count of sd_bus_message
Yu Watanabe [Sat, 21 Jul 2018 14:21:28 +0000 (23:21 +0900)] 
locale: increment reference count of sd_bus_message

5 years agotimedate: increment reference count of sd_bus_message
Yu Watanabe [Sat, 21 Jul 2018 14:07:53 +0000 (23:07 +0900)] 
timedate: increment reference count of sd_bus_message

The commit 5d280742b645a69a19e7f9131adc0c95f5c7fa07 introduces a
barrier to suppress calling context_update_ntp_status() multiple times.
However, it just stores the address of sd_bus_message object. So,
when an address is reused on the subsequent message, then the status
of NTP clients are not updated.

This makes the stored message object is referenced by the context
object. So, the subsequent message is on cirtainly different address.

5 years agoNEWS: add entry about Type=exec and announce that systemd-run is going to default... 9620/head
Lennart Poettering [Wed, 25 Jul 2018 18:36:11 +0000 (20:36 +0200)] 
NEWS: add entry about Type=exec and announce that systemd-run is going to default to it in 241

5 years agotest: add test for Type=exec
Lennart Poettering [Tue, 17 Jul 2018 10:35:12 +0000 (12:35 +0200)] 
test: add test for Type=exec

5 years agoman: document the new Type=exec type
Lennart Poettering [Tue, 17 Jul 2018 10:01:26 +0000 (12:01 +0200)] 
man: document the new Type=exec type

And while we are at it, let's rearrange and extend the Type=
documentation a bit. Let's make it an itemized list, and let's add a
paragraph explaining which type best to use.

5 years agocore: introduce new Type=exec service type
Lennart Poettering [Tue, 17 Jul 2018 09:47:14 +0000 (11:47 +0200)] 
core: introduce new Type=exec service type

Users are often surprised that "systemd-run" command lines like
"systemd-run -p User=idontexist /bin/true" will return successfully,
even though the logs show that the process couldn't be invoked, as the
user "idontexist" doesn't exist. This is because Type=simple will only
wait until fork() succeeded before returning start-up success.

This patch adds a new service type Type=exec, which is very similar to
Type=simple, but waits until the child process completed the execve()
before returning success. It uses a pipe that has O_CLOEXEC set for this
logic, so that the kernel automatically sends POLLHUP on it when the
execve() succeeded but leaves the pipe open if not. This means PID 1
waits exactly until the execve() succeeded in the child, and not longer
and not shorter, which is the desired functionality.

Making use of this new functionality, the command line
"systemd-run -p User=idontexist -p Type=exec /bin/true" will now fail,
as expected.

5 years agoexecute: use our usual syntax for defining bit masks
Lennart Poettering [Thu, 5 Jul 2018 08:00:52 +0000 (10:00 +0200)] 
execute: use our usual syntax for defining bit masks

5 years agocore: swap order of "n_storage_fds" and "n_socket_fds" parameters
Lennart Poettering [Thu, 5 Jul 2018 07:56:54 +0000 (09:56 +0200)] 
core: swap order of "n_storage_fds" and "n_socket_fds" parameters

When process fd lists to pass to activated programs we always place the
socket activation fds first, and the storage fds last. Irritatingly in
almost all calls the "n_storage_fds" parameter (i.e. the number of
storage fds to pass) came first so far, and the "n_socket_fds" parameter
second. Let's clean this up, and specify the number of fds in the order
the fds themselves are passed.

(Also, let's fix one more case where "unsigned" was used to size an
array, while we should use "size_t" instead.)

5 years agosd-login: let's also make sd-login understand ".host"
Lennart Poettering [Tue, 17 Jul 2018 10:24:50 +0000 (12:24 +0200)] 
sd-login: let's also make sd-login understand ".host"

if sd-bus and machined grok it, then sd-login should grok it too.

5 years agosd-bus: allow connecting to the pseudo-container ".host"
Lennart Poettering [Tue, 17 Jul 2018 10:23:26 +0000 (12:23 +0200)] 
sd-bus: allow connecting to the pseudo-container ".host"

machined exposes the pseudo-container ".host" as a reference to the host
system, and this means "machinectl login .host" and "machinectl shell
.host" get your a login/shell on the host. systemd-run currently doesn't
allow that. Let's fix that, and make sd-bus understand ".host" as an
alias for connecting to the host system.

5 years agoupdate TODO
Lennart Poettering [Mon, 16 Jul 2018 10:19:05 +0000 (12:19 +0200)] 
update TODO

5 years agoMerge pull request #9667 from poettering/pam_systemd-fixes
Zbigniew Jędrzejewski-Szmek [Wed, 25 Jul 2018 20:26:46 +0000 (22:26 +0200)] 
Merge pull request #9667 from poettering/pam_systemd-fixes

pam_systemd fixes

5 years agohwdb: Add accel mount matrix for Lenovo Miix 3-830
Mario Hros [Wed, 25 Jul 2018 14:53:10 +0000 (16:53 +0200)] 
hwdb: Add accel mount matrix for Lenovo Miix 3-830

5 years agohwdb: Add information on where to find identifiers
Mario Hros [Mon, 23 Jul 2018 11:56:09 +0000 (13:56 +0200)] 
hwdb: Add information on where to find identifiers

5 years agotree-wide: increase granularity of percent specifications all over the place to permille 9484/head
Lennart Poettering [Mon, 2 Jul 2018 16:52:42 +0000 (18:52 +0200)] 
tree-wide: increase granularity of percent specifications all over the place to permille

We so far had various placed we'd parse percentages with
parse_percent(). Let's make them use parse_permille() instead, which is
downward compatible (as it also parses percent values), and increases
the granularity a bit. Given that on the wire we usually normalize
relative specifications to something like UINT32_MAX anyway changing
from base-100 to base-1000 calculations can be done easily without
breaking compat.

This commit doesn't document this change in the man pages. While
allowing more precise specifcations permille is not as commonly
understood as perent I guess, hence let's keep this out of the docs for
now.

5 years agoparse-util: in parse_permille() check negative earlier
Lennart Poettering [Mon, 2 Jul 2018 16:50:25 +0000 (18:50 +0200)] 
parse-util: in parse_permille() check negative earlier

If 'v' is negative, it's wrong to add the decimal to it, as we'd
actually need to subtract it in this case. But given that we don't want
to allow negative vaues anyway, simply check earlier whether what we
have parsed so far was negative, and react to that before adding the
decimal to it.

5 years agoman: update pam_systemd to reflect recent changes 9667/head
Lennart Poettering [Fri, 20 Jul 2018 09:53:34 +0000 (11:53 +0200)] 
man: update pam_systemd to reflect recent changes

1. Document the new desktop= parameter

2. Clarify that we set XDG_SESSION_DESKTOP, XDG_SESSION_CLASS,
   XDG_SESSION_TYPE if we have the data, and don't just read it.

5 years agopam_systemd: cast calls whose result we knowingly ignore to (void)
Lennart Poettering [Fri, 20 Jul 2018 09:43:38 +0000 (11:43 +0200)] 
pam_systemd: cast calls whose result we knowingly ignore to (void)

5 years agopam_systemd: reduce append_session_cg_weight() indentation level a bit by moving...
Lennart Poettering [Fri, 20 Jul 2018 09:41:17 +0000 (11:41 +0200)] 
pam_systemd: reduce append_session_cg_weight() indentation level a bit by moving to early exit

5 years agopam_systemd: move socket_from_display() from util.[ch] to pam_systemd.c
Lennart Poettering [Fri, 20 Jul 2018 09:36:10 +0000 (11:36 +0200)] 
pam_systemd: move socket_from_display() from util.[ch] to pam_systemd.c

It's highly specific, kinda legacy (X11…) and only used at one place,
let's move this out of the common code, and into pam_systemd.c where it
is used.