1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-05 06:52:22 +03:00
Commit Graph

43265 Commits

Author SHA1 Message Date
Lennart Poettering
9ab0d3ebe5 pam-systemd: port over to use a UserRecord structure
Later on this allows us to set various session properties from user
record.
2020-01-15 15:29:55 +01:00
Lennart Poettering
355c9966c2 pam-systemd: share bus connection with pam_systemd_home if we can
Let's use the pam-util.h provided helpers to acquire them.
2020-01-15 15:29:52 +01:00
Lennart Poettering
d750dde2a6 pam-systemd: port to pam_bus_log_{create|parse}_error() and pam_log_oom() 2020-01-15 15:29:48 +01:00
Lennart Poettering
cef9f2a647 shared: add pam utility helpers 2020-01-15 15:29:31 +01:00
Lennart Poettering
d510589fd0 logind: honour per-user stopDelayUSec property 2020-01-15 15:29:27 +01:00
Lennart Poettering
156a363750 logind: honour killProcesses field of user record 2020-01-15 15:29:24 +01:00
Lennart Poettering
e8e4b7a0b6 logind: enforce user record resource settings when user logs in 2020-01-15 15:29:21 +01:00
Lennart Poettering
22c902facc logind: port to UserRecord object
This changes the user tracking of logind to use the new-style UserRecord
object.

In a later commit this enables us to do per-user resource management.
2020-01-15 15:29:17 +01:00
Lennart Poettering
1684c56f40 nss: hook up nss-systemd with userdb varlink bits
This changes nss-systemd to use the new varlink user/group APIs for
looking up everything.

(This also changes the factory /etc/nsswitch.conf line to use for
hooking up nss-system to use glibc's [SUCCESS=merge] feature so that we
can properly merge group membership lists).

Fixes: #12492
2020-01-15 15:29:07 +01:00
Lennart Poettering
19d22d433d core: add user/group resolution varlink interface to PID 1 2020-01-15 15:28:55 +01:00
Lennart Poettering
4bad7eedae core: make return parameter of dynamic_user_lookup_name() optional 2020-01-15 15:28:52 +01:00
Lennart Poettering
1604937f83 userdbd: add userdbctl tool as client for userdbd 2020-01-15 15:28:42 +01:00
Lennart Poettering
d093b62c94 userdbd: add new service that can merge userdb queries from multiple clients 2020-01-15 15:28:17 +01:00
Lennart Poettering
295c1a6e45 shared: add helpers for displaying new-style user/group records to users 2020-01-15 15:27:59 +01:00
Lennart Poettering
ec8e4a0ef1 shared: add internal API for querying JSON user records via varlink
This new API can be used in place of NSS by our own internal code if
more than the classic UNIX records are needed.
2020-01-15 15:27:41 +01:00
Lennart Poettering
9b2d907877 shared: add helpers for converting NSS passwd/group structures to new JSON objects
These new calls may be used to convert classic UNIX/glibc NSS struct
passwd and struct group records into new-style JSON-based user/group
objects.
2020-01-15 15:27:23 +01:00
Lennart Poettering
71d0b9d422 shared: add generic user/group record structures and JSON parsers 2020-01-15 15:27:04 +01:00
Lennart Poettering
64aa2622a3 libcrypt-util: add superficial validator for UNIX hashed password strings 2020-01-15 15:26:51 +01:00
Lennart Poettering
42f3b2f975 shared: split out crypt() specific helpers into its own .c/.h in src/shared/
This way we can use libxcrypt specific functionality such as
crypt_gensalt() and thus take benefit of the newer algorithms libxcrypt
implements. (Also adds support for a new env var $SYSTEMD_CRYPT_PREFIX
which may be used to select the hash algorithm to use for libxcrypt.)

Also, let's move the weird crypt.h inclusion into libcrypt.h so that
there's a single place for it.
2020-01-15 15:26:27 +01:00
Lennart Poettering
2ee4b118fa nss-util: add macros for generating getpwent()/getgrent() prototypes
We have similar macros already for getpwuid()/getpwnam(), let's add more
of this.
2020-01-15 15:25:32 +01:00
Zbigniew Jędrzejewski-Szmek
4a9a2a36b0
Merge pull request #14579 from keszybz/docs-index
Revert the test move and fix formatting on main page a bit
2020-01-15 14:26:39 +01:00
Zbigniew Jędrzejewski-Szmek
98f44b97bb
Merge pull request #14562 from yuwata/table-strv
introduce TABLE_STRV and use it in networkctl and resolvectl
2020-01-15 13:59:11 +01:00
Zbigniew Jędrzejewski-Szmek
65e2766f64 docs: fix width of console example 2020-01-15 13:46:16 +01:00
Zbigniew Jędrzejewski-Szmek
5425f8a57c Revert "docs: rename HACKING → Hacking"
This reverts commit 8c5cd27dd1.
2020-01-15 13:45:04 +01:00
Zbigniew Jędrzejewski-Szmek
a50414fce5
Merge pull request #14578 from keszybz/docs-index
Let's see if redirects work
2020-01-15 13:43:24 +01:00
Zbigniew Jędrzejewski-Szmek
8c5cd27dd1 docs: rename HACKING → Hacking
Let's see if this works at all.
2020-01-15 12:38:12 +01:00
Zbigniew Jędrzejewski-Szmek
b6bcde2623 docs: shift console log on index page to the left 2020-01-15 11:58:08 +01:00
Lennart Poettering
eea45a3399
Merge pull request #14424 from poettering/watch-bus-name-rework
pid1: simplify drastically how we watch bus names for service's BusName= setting
2020-01-15 11:46:11 +01:00
Lennart Poettering
f6160131e7
Merge pull request #14573 from keszybz/docs-index
Docs index
2020-01-15 10:25:06 +01:00
Zbigniew Jędrzejewski-Szmek
6af0a04428 docs: add the systemd output example
It is still nice...
2020-01-15 08:57:37 +01:00
Zbigniew Jędrzejewski-Szmek
4e96d758f8 docs: update old para with links to the blog stories
They are of historical interest, but without links not very useful.
2020-01-15 08:57:37 +01:00
Zbigniew Jędrzejewski-Szmek
48f60ea9ad docs: remove markup from title
Github uses a different background for backticked text, and this stands out
(in a bad way) on the title page.
2020-01-15 08:57:37 +01:00
Zbigniew Jędrzejewski-Szmek
d00386fc0b man: add commas and reword a sentence
On more careful reading, "exit status ... do not cause the unit to enter a
failure state" is not gramatically or logically correct.
2020-01-15 08:57:37 +01:00
Yu Watanabe
222a6aace7
Merge pull request #14547 from keszybz/networkctl-matching
networkctl: return error or warning when interfaces are not matched
2020-01-15 11:56:01 +09:00
Yu Watanabe
bbaba5748d test-format-table: add tests for TABLE_STRV 2020-01-15 11:52:40 +09:00
Yu Watanabe
29e15e98c7 resolvectl: use format-table.[ch] 2020-01-15 11:52:40 +09:00
Yu Watanabe
536cdd07b3 networkctl: use TABLE_STRV 2020-01-15 11:52:40 +09:00
Yu Watanabe
4618660d10 format-table: introduce TABLE_STRV 2020-01-15 11:52:40 +09:00
Yu Watanabe
8b75798d12 strv: introduce strv_compare() 2020-01-15 11:52:40 +09:00
Zbigniew Jędrzejewski-Szmek
dbca733213
Merge pull request #14571 from poettering/assorted-fixlets
two minor fixes for recent merges
2020-01-14 21:22:13 +01:00
Lennart Poettering
3fec552468 docs: rework HTML into GitHub Markdown table
Presumably this should render better on https://systemd.io/DISCOVERABLE_PARTITIONS then.

As pointed out on: https://github.com/systemd/systemd/pull/14390#issuecomment-574205631
2020-01-14 16:58:05 +01:00
Lennart Poettering
c238a2f889 cgroup: minor comment improvement
As pointed out here:

https://github.com/systemd/systemd/pull/14564#discussion_r366305882
2020-01-14 16:57:51 +01:00
Lennart Poettering
550979c8ae
Merge pull request #14570 from keszybz/resource-docs
Modernize links to cgroups docs
2020-01-14 16:17:38 +01:00
Lennart Poettering
be2bb14f00 logind: refuse overriding idle hint on tty sessions
Previously we'd allow marking TTY sessions as idle, but when the user
tried to unmark it as idle again it we'd just revert to automatic TTY
atime idle detection, thus making it impossible to mark the session as
non-idle, unless its TTY is atime-touched all the time. But of course,
marking a session as idle is pretty much fatal if you never can mark it
as non-idle again.

This change is triggred by bug reports such as this:

https://github.com/systemd/systemd/issues/14053

With this patch we will now output a clean, clear error message if a
client tries to manipulate the idle state of a non-graphical session.
This means we now have clear rules: "manual" idle logic for graphical
sessions, and TTY based ones for all others that have a TTY of some
form.

I considered allowing the idle state to be overriden both ways for tty
sessions but that's problematic: for sessions that are temporarily
upgraded from tty to graphical and thus suddenly want to manage their
own idle state we'd need to a way to detect when the upgrade goes away
and thus we should revert to old behaviour. Without reverting to the
previous TTY idle auto-magic we'd otherwise be stuck in an eternally
idle or eternally non-idle state, with really bad effects in case
auto-suspend is used. Thus, let's instead generate a proper error
message, saying clearly we don't support it.

(Also includes some other fixes and clean-ups in related code)

Closes: #14053
2020-01-14 16:11:39 +01:00
Zbigniew Jędrzejewski-Szmek
952805a9e3
Merge pull request #14564 from poettering/cgroup-realize-fix
pid1: cgroup realization fix
2020-01-14 15:52:56 +01:00
Zbigniew Jędrzejewski-Szmek
ea7fe1d1c2
Merge pull request #14390 from poettering/gpt-var-tmp
introduce GPT partition types for /var and /var/tmp and support them for auto-discovery
2020-01-14 15:37:53 +01:00
Frantisek Sumsal
de9a8fe18e systemctl: use format-table.[ch] for tables 2020-01-14 15:26:21 +01:00
Zbigniew Jędrzejewski-Szmek
7c286cd6a6
Merge pull request #14505 from poettering/refuse-on-failure
refuse OnFailure= deps on units that have no failure state
2020-01-14 14:19:04 +01:00
Zbigniew Jędrzejewski-Szmek
92d4af9dab
Merge pull request #14563 from poettering/less-the-markdown
trivial markdown fixlets
2020-01-14 13:23:50 +01:00
Zbigniew Jędrzejewski-Szmek
191a3f1634 basic/strv: drop flags argument from strv_fnmatch() 2020-01-14 13:10:29 +01:00