Commit Graph
58133 Commits
Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek c6cb9d9074 userwork: use a better errno value
ESRCH is literally "No such process".
2022-06-02 07:53:14 +02:00
Zbigniew Jędrzejewski-Szmek 2e09b2235a various: add %m in messages
Sometimes we want to suppress strerror() message because the are providing
something better. But in those cases, it seems it was just forgotten.
2022-06-02 07:53:14 +02:00
Zbigniew Jędrzejewski-Szmek 14c811ff4a Merge pull request #23575 from keszybz/logind-wall-message-cleanup
Cleanup wall messages emitted by logind and systemctl
2022-06-01 16:26:29 +02:00
Zbigniew Jędrzejewski-Szmek d5254fa2f6 Merge pull request #23574 from keszybz/logind-pty-wall
Do not print logind wall message to local terminals
2022-06-01 16:26:03 +02:00
dependabot[bot] 2f9e3d5f50 build(deps): bump actions/upload-artifact from 2.3.1 to 3.1.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2.3.1 to 3.1.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/82c141cc518b40d92cc801eee768e7aafc9c2fa2...3cea5372237819ed00197afe530f5a7ea3e805c8)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-01 15:32:03 +03:00
dependabot[bot] db361cdabd build(deps): bump github/super-linter from 4.9.3 to 4.9.4
Bumps [github/super-linter](https://github.com/github/super-linter) from 4.9.3 to 4.9.4.
- [Release notes](https://github.com/github/super-linter/releases)
- [Changelog](https://github.com/github/super-linter/blob/main/docs/release-process.md)
- [Commits](https://github.com/github/super-linter/compare/431ee7836e8cdce5a460b0db682d9169563d919b...a320804d310fdeb8d1a46c6c6c1e615d443b10c9)

---
updated-dependencies:
- dependency-name: github/super-linter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-01 11:09:45 +00:00
Li kunyu b278cf2efd src: The return value of server_vacuum () is not used and could be modified to void type 2022-06-01 09:32:22 +02:00
Christian Göttsche ea74f39c24 login: do not issue wall messages on local terminals for suspend and hibernate
Fixes: #23520

[zjs: I added the comment and tweaked the patch a bit.

The call to reset_scheduled_shutdown() is moved down a bit to allow the
callback to have access to information about the operation being cancelled.
This all happens within the same function, so there should be no observable
change in behaviour.]
2022-06-01 09:30:07 +02:00
Zbigniew Jędrzejewski-Szmek b622d2f789 shared/pager: print the name of the pager we'll try next in debug message
I had a strange failure where the pager was hanging on invocation (gdm crashed
and the kernel got into a strange state where it was hanging on some tasks).
Based on the logs from 'SYSTEMCTL_LOG_LEVEL=debug journalctl', I couldn't even
tell which pager binary we're executing. So let's shorten the function a bit and
provide a bit more detail.
2022-06-01 09:27:35 +02:00
Zbigniew Jędrzejewski-Szmek 5b69a7c540 man/systemctl: improve grammar in description of --check-inhibitors 2022-06-01 09:23:55 +02:00
Zbigniew Jędrzejewski-Szmek 1cc11a0951 systemctl: drop translation of method names to descriptions in error message
We had yet-another table of descriptive strings to use in error messages.
I started thinking how to synchronize them with the strings in logind, but
ultimately I think it's better to remove those altogether. Those strings
should almost never be used: normally if the call fails, logind will provide
an error message itself, which is probably more detailed than what we can
figure out on the client side. And the most important part that we want to
show here is what exactly we called, in particular RebootWithFlags vs. Reboot,
etc. By using the "descriptive strings" we were obfuscating this. So let's just
simplify our code and print the actual method name, since this is more useful
as an error statement that is googlable and unique.

While at it, let's print the correct method name ;)
2022-06-01 09:23:55 +02:00
Zbigniew Jędrzejewski-Szmek 346840b159 systemctl: make function static 2022-06-01 09:23:55 +02:00
Zbigniew Jędrzejewski-Szmek b280061314 logind: reduce scope of a few variables 2022-06-01 09:23:55 +02:00
Zbigniew Jędrzejewski-Szmek 3dbb9bc5eb logind: rework wall message about pending shutdown/halt/reboot/…
Those messages simply *feel* dated: "The system is going for suspend NOW!".
Let's say "The system will suspend|power off|hibernate|… now!" instead.
The exclamation mark is enough to show the urgency.

Also, the "the" seemed out of place. We're not talking about a specific reboot.
2022-06-01 09:23:05 +02:00
Yu Watanabe 9db25d01ef Merge pull request #23531 from yuwata/sd-bus-drop-version-2
sd-bus: drop version 2 format support
2022-06-01 14:51:44 +09:00
Yu Watanabe cd25e17001 Merge pull request #23512 from medhefgo/efi-clang
boot: Add string functions
2022-06-01 06:16:48 +09:00
Zbigniew Jędrzejewski-Szmek 51a2b575d7 logind: do not print wall messages to local pseudoterminals
Fixes #23520. Replaces #23555.

The problem started with cdf370626f and
90b1ec03b2 which together started printing the
wall message in more cases. The motivation for those change was reasonable, but
this clearly causes problems described in #23520: users are getting unexpected
wall messages. Xterm, urxvt, (anything using libutempter?), and tmux (in some
configurations), register local pty sessions in utmp.

So let's try to suppress the message for local pseudo-terminal logins. This
patch based on #23538, but instead of filtering just on /dev/pts, it uses the
.ut_addr_v6 to only filter out local entries.
2022-05-31 22:30:08 +02:00
Zbigniew Jędrzejewski-Szmek e31355bbc1 tests: add a helper that dumps /run/utmp in detail
utmpdump doesn't print all the details. Looking at the list if useful
when trying to tweak the wall filtering logic.

This doesn't do much, but at least it serves as a smoke test for the cleanup
functions.
2022-05-31 22:30:08 +02:00
Yu Watanabe a452cfd77b sd-bus: drop constant argument for message_extend_fields() 2022-06-01 03:41:16 +09:00
Yu Watanabe 0dd4876815 sd-bus: drop D-Bus version 2 format support
It seems the format is used only by kdbus.
2022-06-01 03:41:15 +09:00
Yu Watanabe c0f664ca89 sd-bus: merge message_peek_fields() and buffer_peek() 2022-06-01 03:41:15 +09:00
Yu Watanabe 75c85c3b25 sd-bus: make several functions static
And drop 'bus_' prefix from them.
2022-06-01 03:41:15 +09:00
Yu Watanabe 590a738562 sd-bus: use UINT32_MAX 2022-06-01 03:41:15 +09:00
Yu Watanabe b7096bd690 sd-bus: drop unnecessary cast 2022-06-01 03:41:15 +09:00
Yu Watanabe 30da99bd30 sd-bus: drop redundant condition
By the previous commit, ALIGN8() is always equal to or greater than the
argument.
2022-06-01 03:41:15 +09:00
Yu Watanabe dc7be33266 sd-bus: use ALIGN8() 2022-06-01 03:41:15 +09:00
Yu Watanabe b4e7df4a47 boot: use ALIGN4() 2022-06-01 03:41:15 +09:00
Yu Watanabe 4c8d7caf1a macro: make ALIGN4() and ALIGN8() also return SIZE_MAX on overflow
This also drops unused ALIGN4_PTR(), ALIGN8_PTR(), and ALIGN_TO_PTR().
2022-06-01 03:40:20 +09:00
Yu Watanabe 394129f88b tree-wide: use ALIGN_PTR() 2022-06-01 03:12:33 +09:00
Alexander Shopov 1c1cb8ec6f Move message repeat
Original catalog file is in English
Move the repeating German message to German catalog

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2022-06-01 00:20:30 +09:00
Alexander Shopov 3e597d0d35 Update Bulgarian translation
po: catalog: Bring bg.po and catalog file to 100%

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2022-05-31 16:34:25 +02:00
Yu Watanabe a0f0cf0a6b portable: fix command option in comment
Follow-up for edea370222.
2022-05-31 16:32:09 +02:00
Zbigniew Jędrzejewski-Szmek 978af07f66 logind: use consistent casing in message
The other strings use "sentence capitalization". Let's do the
same here.
2022-05-31 15:59:40 +02:00
Zbigniew Jędrzejewski-Szmek 3c98bdce55 logind: align tables 2022-05-31 15:59:29 +02:00
Zbigniew Jędrzejewski-Szmek 1661833238 shared/utmp-wtmp: pass information if entry is local to filter function
This just adds an unused parameter for future use. No change in
behaviour.
2022-05-31 15:54:16 +02:00
Zbigniew Jędrzejewski-Szmek b5cb2d2847 tty-ask-password-agent: drop unnecessary code for non-absolute paths
utmp_wall() always prepends /dev/, so we don't need to do this a second
time here.
2022-05-31 15:54:03 +02:00
Jan Janssen 7783ab5df1 boot: Use xstrdup8/16
Note that xstrdup is now safe to call with a NULL pointer and will
just return NULL in that case.
2022-05-31 15:15:01 +02:00
Jan Janssen 101f68ff33 boot: Add xstrdup8/16 2022-05-31 15:15:01 +02:00
Jan Janssen bbc1f2eac5 boot: Use memcmp/memcpy/memset 2022-05-31 15:15:01 +02:00
Jan Janssen f7967716e3 boot: Add memcmp/memcpy/memset 2022-05-31 15:14:56 +02:00
Jan Janssen 60c2af56d6 boot: Use strsize8/16 2022-05-31 15:14:56 +02:00
Jan Janssen 96dc0dd387 boot: Add strsize8/16 2022-05-31 15:14:54 +02:00
Jan Janssen fb67588c62 boot: Use strchr8/16 2022-05-31 15:13:58 +02:00
Jan Janssen 5d7e0e8341 boot: Add strchr8/16 2022-05-31 15:13:58 +02:00
Jan Janssen 08ed842b56 boot: Use strcpy8/16 2022-05-31 15:10:48 +02:00
Jan Janssen ef4d71ad7f boot: Add strcpy8/16 2022-05-31 15:10:48 +02:00
Jan Janssen fc178cf1f8 boot: Use strtolower8/16 2022-05-31 15:10:48 +02:00
Jan Janssen 98850528bf boot: Add strtolower8/16 2022-05-31 15:10:45 +02:00
Jan Janssen 3d5127c68f boot: Use strcmp16 for cpio sorting 2022-05-31 15:09:10 +02:00
Jan Janssen ec436bdf16 boot: Use strcmp8/16
This also replaces streq and similar functions for consistency. Note
that streq16 is null pointer safe, so streq_ptr can be safely replaced
too.
2022-05-31 15:09:10 +02:00