Commit graph

4127 commits

Author SHA1 Message Date
Yu Watanabe dd0395b565 make namespace_flags_to_string() not return empty string
This improves the following debug log.

Before:
systemd[1162]: Restricting namespace to: .

After:
systemd[1162]: Restricting namespace to: n/a.
2020-03-03 21:17:38 +01:00
Zbigniew Jędrzejewski-Szmek 105a1a36cd tree-wide: fix spelling of lookup and setup verbs
"set up" and "look up" are the verbs, "setup" and "lookup" are the nouns.
2020-03-03 15:02:53 +01:00
Zbigniew Jędrzejewski-Szmek 52c222db11
Merge pull request #14992 from keszybz/syslog-address-length-fix
Syslog address length fix
2020-03-02 21:31:24 +01:00
Zbigniew Jędrzejewski-Szmek 2b43402c84 ask-password-api: drop unneeded parentheses 2020-03-02 15:56:30 +01:00
Zbigniew Jędrzejewski-Szmek f36a9d5909 tree-wide: use the return value from sockaddr_un_set_path()
It fully initializes the address structure, so no need for pre-initialization,
and also returns the length of the address, so no need to recalculate using
SOCKADDR_UN_LEN().

socklen_t is unsigned, so let's not use an int for it. (It doesn't matter, but
seems cleaner and more portable to not assume anything about the type.)
2020-03-02 15:55:44 +01:00
HATAYAMA Daisuke 27f31daf3e shared/logs-show: Remove unused OUTPUT_FOLLOW
As of the commit aae9a96d4b removing --follow
option in systemctl command, OUTPUT_FOLLOW has never been set anywhere. Let's
remove it.

The condition expression of the if-statement in show_journal() that refers to
OUTPUT_FOLLOW now thus evaluates always to true. Hence, the call of
sd_journal_wait() is in dead code, and the outer infinite for-loop is
meaningless, which we remove as cleanup.

There is no functional change by this commit.
2020-03-02 18:27:55 +09:00
Anita Zhang 96100b8a04
Merge pull request #14964 from yuwata/conf-parser-fix-line-number
conf-parser: fix line number in error message
2020-02-27 17:16:35 -08:00
Anita Zhang 9c7179bbfa
Merge pull request #14965 from keszybz/journal-rotation-hint
systemctl: be more specific when emitting warning about rotated journal
2020-02-27 17:16:02 -08:00
Zbigniew Jędrzejewski-Szmek 1a8f0ce64f systemctl: be more specific when emitting warning about rotated journal
See inline comment for disucssion.
Fixes #14281.
2020-02-27 19:52:08 +01:00
Yu Watanabe 68c1ac1568 conf-parser: fix line number in error message
Fixes #14929.
2020-02-28 02:37:15 +09:00
Yu Watanabe 15db1f3d2e
Merge pull request #14953 from yuwata/userdb-fix-groupdb
userdb: make groupdb_all() always set iterator when it returns >= 0
2020-02-27 19:53:20 +09:00
Yu Watanabe 443876d8dc userdb: make groupdb_all() always set iterator when it returns >= 0 2020-02-27 18:05:14 +09:00
Yu Watanabe 0ffbe10b81 userdb: drop unnecessary goto 2020-02-27 18:04:47 +09:00
Mike Gilbert 19bb96759a userdb: allow dots in username
This prevents an error in pam_systemd when logging in.

sshd[2623165]: pam_unix(sshd:session): session opened for user tony.stark(uid=10001) by (uid=0)
sshd[2623165]: pam_systemd(sshd:session): Failed to get user record: Invalid argument

Bug: https://bugs.gentoo.org/708824
2020-02-27 08:47:52 +01:00
Yu Watanabe 662d74daf7 userdb: make userdb_all() always set iterator when it returns >= 0
Fixes #14868.
2020-02-26 23:57:13 +09:00
Yu Watanabe 9207625d9b
Merge pull request #14800 from keszybz/ask-password-echo
ask-password: give a hint to cancel echo
2020-02-06 23:49:54 +09:00
Zbigniew Jędrzejewski-Szmek 8aaf18e08a shared/ask-password-api: show "(press TAB for no echo)"
For #8495: it is arguably useful to not show the length of the password
in public spaces. It is possible to press TAB or BS to cancel the asterisks,
but this is not very discoverable. Let's make it discoverable by showing
a message (in gray). The message is "erased" after the first character
is entered.
2020-02-06 10:51:24 +01:00
Zbigniew Jędrzejewski-Szmek 72c08a471c shared/ask-password-api: return "error" when dialogue is cancelled
test-ask-password-api would crash if ^D was pressed.
If think the callers generally expect a non-empty strv as reply. Let's
return an error if we have nothing to return.

Also modernize test-ask-password-api a bit.
2020-02-06 10:51:13 +01:00
Zbigniew Jędrzejewski-Szmek 5650ec7a11
Merge pull request #14156 from fbuihuu/deal-with-aliases-when-disabling
Consider aliases in /usr when disabling units
2020-02-06 10:46:21 +01:00
Yu Watanabe 1294661381 polkit: remove unused variable
Follow-up for 6374862615.
2020-02-05 12:47:32 +00:00
Zbigniew Jędrzejewski-Szmek bc130b6858 Fix typo in function name 2020-02-04 18:54:12 +01:00
Lennart Poettering 6374862615 polkit: when authorizing via PK let's re-resolve callback/userdata instead of caching it
Previously, when doing an async PK query we'd store the original
callback/userdata pair and call it again after the PK request is
complete. This is problematic, since PK queries might be slow and in the
meantime the userdata might be released and re-acquired. Let's avoid
this by always traversing through the message handlers so that we always
re-resolve the callback and userdata pair and thus can be sure it's
up-to-date and properly valid.
2020-02-04 18:47:32 +01:00
Lennart Poettering f4425c72c7 polkit: use structured initialization 2020-02-04 18:45:22 +01:00
Lennart Poettering 7f56982289 polkit: on async pk requests, re-validate action/details
When we do an async pk request, let's store which action/details we used
for the original request, and when we are called for the second time,
let's compare. If the action/details changed, let's not allow the access
to go through.
2020-02-04 18:45:22 +01:00
Lennart Poettering 95f82ae9d7 polkit: reuse some common bus message appending code 2020-02-04 18:45:22 +01:00
Lennart Poettering 773b1a7916 bus-polkit: rename return error parameter to ret_error 2020-02-04 18:45:22 +01:00
Zbigniew Jędrzejewski-Szmek dc9fd22d3d Merge pull request #14398 from poettering/mount-prep 2020-02-04 16:28:51 +01:00
Zbigniew Jędrzejewski-Szmek 2f1fc899ce
Merge pull request #14589 from keszybz/sysctl-downgrade-messages
sysctl: add glob patterns to set network settings more flexibly
2020-02-04 00:04:28 +01:00
Yu Watanabe bf2334c054 udev: add {Receive,Transmit}ChecksumOffload= settings
Closes #14661.
2020-02-03 12:31:31 +09:00
Lennart Poettering 6d4d600260 varlink: add ability to register callback for disconnections 2020-01-31 15:03:27 +01:00
Lennart Poettering c4f601f205 varlink: add API for determining number of current connections 2020-01-31 15:03:11 +01:00
Lennart Poettering d93dda3afe systemctl: show logs for correct namespace of service 2020-01-31 15:02:52 +01:00
Lennart Poettering 91dd5f7cbe core: add new LogNamespace= execution setting 2020-01-31 15:01:43 +01:00
Anita Zhang 1b9d61bcee
Merge pull request #14696 from poettering/dissect-tweaks
various tweaks to the image dissection logic
2020-01-30 12:46:03 -08:00
Zbigniew Jędrzejewski-Szmek 2a4be3c52b Various typo fixes and grammar corrections 2020-01-30 13:48:01 +01:00
Zbigniew Jędrzejewski-Szmek f3b136a484 shared/sysctl-util: normalize repeated slashes or dots to a single value
We use those strings as hash keys. While writing "a...b" looks strange,
"a///b" does not look so strange. Both syntaxes would actually result in the
value being correctly written to the file, but they would confuse our
de-deplication over keys. So let's normalize. Output also becomes nicer.

Add test.
2020-01-30 10:48:27 +01:00
Lennart Poettering cf32c48657 dissect: optionally, run fsck before mounting dissected images
Some file systems want us to run fsck before mounting, hence do so,
optionally.
2020-01-29 19:29:44 +01:00
Lennart Poettering 0f7c9a3d81 dissect: complain if partition flags are set that we don't know 2020-01-29 19:29:39 +01:00
Lennart Poettering 70a5db5822 home: add new systemd-homed service that can manage LUKS homes
Fixes more or less: https://bugs.freedesktop.org/show_bug.cgi?id=67474
2020-01-28 22:36:07 +01:00
Lennart Poettering b940fb1f4f
Merge pull request #14594 from keszybz/id128-show-gpt
Print gpt table values in systemd-id128
2020-01-28 17:23:50 +01:00
Zbigniew Jędrzejewski-Szmek d2b45da40a
Merge pull request #14633 from poettering/logind-switch-polkit
add polkit hookup for VT switching in logind
2020-01-28 16:09:09 +01:00
Lennart Poettering 8615bec7a0
Merge pull request #14667 from yuwata/boot-random-seed-mode
boot: parse random-seed-mode
2020-01-28 15:42:10 +01:00
Kevin Kuehler fc64760dda core: shared: Add ProtectClock= to systemd.exec 2020-01-26 12:23:33 -08:00
Yu Watanabe fe5a698f76 bootspec: parse random-seed-mode line in loader.conf
Fixes #14657.
2020-01-26 13:20:34 +09:00
Zbigniew Jędrzejewski-Szmek dc972b0740 systemd-id128: add new verb to print GPT partitions UUIDs 2020-01-23 23:32:13 +01:00
Zbigniew Jędrzejewski-Szmek 19ce38ce62 shared/gpt: export gpt_partition_type_uuid_{to,from}_string functions 2020-01-23 22:56:23 +01:00
Zbigniew Jędrzejewski-Szmek 5e176a4dee Merge pull request #14368 from poettering/repart 2020-01-23 19:07:02 +01:00
Anita Zhang 72528419e1
Merge pull request #14618 from poettering/growfs-rootfs
generator: order growfs for the root fs after systemd-remount-fs
2020-01-22 05:32:18 -08:00
Anita Zhang fe888c79f5
Merge pull request #14614 from poettering/import-fixlets
three small importd fixes
2020-01-22 03:48:31 -08:00
Lennart Poettering 269e4d2d6b shared: split out polkit stuff from bus-util.c → bus-polkit.c
It's enough, complex stuff to warrant its own source file.

No other changes, just splitting out.
2020-01-22 12:34:10 +01:00