summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* man: document logging downgrade in systemctlZbigniew Jędrzejewski-Szmek2020-01-301-5/+6
| | | | Fixup for 32458cc968.
* shared/sysctl-util: normalize repeated slashes or dots to a single valueZbigniew Jędrzejewski-Szmek2020-01-303-13/+67
| | | | | | | | | 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.
* shared/sysctl-util: add missing headerZbigniew Jędrzejewski-Szmek2020-01-161-1/+1
| | | | one_zero() is used later in the header...
* sysctl: downgrade message when we have no permissionZbigniew Jędrzejewski-Szmek2020-01-161-7/+10
| | | | | | | | | | | | | We need to run sysctl also in containers, because the network subtree is namespaces and may legitimately be writable. But logging all "errors" at notice level creates unwanted noise. Also downgrade message about missing sysctls to log_info. This might also be relatively common when configuration is targeted at different kernel versions. With log_debug it'll still end up in the logs, but isn't really worth of "notice" most of the time. https://bugzilla.redhat.com/show_bug.cgi?id=1609806
* sysctl: move hashmap allocation out of main functionZbigniew Jędrzejewski-Szmek2020-01-161-10/+9
| | | | | This allocation is a low level detail, and it seems nicer to keep it out of run().
* man: rework section about configuration file precedenceZbigniew Jędrzejewski-Szmek2020-01-161-41/+37
| | | | | | | | | | | | | This section is loaded in a bunch of places, so this affects many man pages. 1. point the reader to the synopsis section, which has the exact paths that are used to load files. 2. put the "reference" part first, and recommendations later, in separate paragraphs. 3. describe how individual settings and whole files are replaces. Closes #12791.
* Merge pull request #14581 from poettering/setcred-alternative-fixZbigniew Jędrzejewski-Szmek2020-01-161-3/+3
|\ | | | | alternative pam_setcred() fix
| * execute: allow pam_setcred() to fail, ignore errorsLennart Poettering2020-01-151-1/+1
| | | | | | | | | | Fixes: #14567 Alternative-To: #14569
| * execute: add const to array parameters, where possibleLennart Poettering2020-01-151-2/+2
| |
* | core: on each iteration processing /proc/self/mountinfo merge all discovery ↵Lennart Poettering2020-01-151-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | flags for each path This extends on d253a45e1c147f5174265d71d7419da7bd52a88b, and instead of merging just a single flag from previous mount entries of /proc/self/mountinfo for the same path we merge all three. This shouldn't change behaviour, but I think make things more readable. Previously we'd set MOUNT_PROC_IS_MOUNTED unconditionally, we still do. Previously we'd inherit MOUNT_PROC_JUST_MOUNTED from a previous entry on the same line, we still do. MOUNT_PROC_JUST_CHANGED should generally stay set too. Why that? If we have two mount entries on the same mount point we'd first process one and then the other, and the almost certainly different mount parameters of the two would mean we'd set MOUNT_PROC_JUST_CHANGED for the second. And with this we'll definitely do that still. This also adds a comment explaining the situation a bit, and why we get into this situation.
* | Merge pull request #14375 from poettering/userdbLennart Poettering2020-01-1565-871/+10941
|\ \ | |/ |/| New varlink API for user and group management
| * docs: add documentation for the varlink user/group APIsLennart Poettering2020-01-151-0/+267
| |
| * docs: add documentation for JSON group records, tooLennart Poettering2020-01-151-0/+158
| |
| * docs: add documentation for JSON user recordsLennart Poettering2020-01-151-0/+1023
| |
| * man: document the new nss-systemd behaviourLennart Poettering2020-01-151-7/+15
| | | | | | | | | | | | (This also changes the suggested /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).
| * man: document systemd-userdbd.serviceLennart Poettering2020-01-152-0/+70
| |
| * man: document userdbctl(1)Lennart Poettering2020-01-152-0/+259
| |
| * man: document new pam_systemd features in man pageLennart Poettering2020-01-151-8/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also updates the suggested PAM snippet in a number of way: 1. Be closer to the logic nowadays implemented in Fedora where the auth/account/password stacks are all finished off with pam_{deny|permit}.so 2. Make pam_unix.so just "sufficient" instead of "required" (paving ground for pam_systemd_home.so being hooked in as additional sufficient module. 3. Only do pam_nologin in the "account" stack, since it's about account validity really. 4. Use modern parameters to pam_unix when changing passwords, i.e. sha512 and shadow, and use already set up passwords (preparing ground for pam_systemd_home again)
| * pam-systemd: apply user record properties to sessionLennart Poettering2020-01-151-2/+145
| | | | | | | | | | This way any component providing us with JSON user record data can use this for automatic resource management and other session properties.
| * pam-systemd: normalize return values of append_session_xyz()Lennart Poettering2020-01-151-25/+23
| | | | | | | | Let's propagate the PAM errors we got.
| * pam-systemd: port over to use a UserRecord structureLennart Poettering2020-01-151-25/+82
| | | | | | | | | | Later on this allows us to set various session properties from user record.
| * pam-systemd: share bus connection with pam_systemd_home if we canLennart Poettering2020-01-151-21/+17
| | | | | | | | Let's use the pam-util.h provided helpers to acquire them.
| * pam-systemd: port to pam_bus_log_{create|parse}_error() and pam_log_oom()Lennart Poettering2020-01-151-61/+46
| |
| * shared: add pam utility helpersLennart Poettering2020-01-153-0/+104
| |
| * logind: honour per-user stopDelayUSec propertyLennart Poettering2020-01-151-6/+24
| |
| * logind: honour killProcesses field of user recordLennart Poettering2020-01-151-1/+4
| |
| * logind: enforce user record resource settings when user logs inLennart Poettering2020-01-151-0/+97
| |
| * logind: port to UserRecord objectLennart Poettering2020-01-159-96/+144
| | | | | | | | | | | | | | 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.
| * nss: hook up nss-systemd with userdb varlink bitsLennart Poettering2020-01-156-569/+749
| | | | | | | | | | | | | | | | | | | | | | 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
| * core: add user/group resolution varlink interface to PID 1Lennart Poettering2020-01-155-1/+329
| |
| * core: make return parameter of dynamic_user_lookup_name() optionalLennart Poettering2020-01-151-3/+3
| |
| * userdbd: add userdbctl tool as client for userdbdLennart Poettering2020-01-153-0/+803
| |
| * userdbd: add new service that can merge userdb queries from multiple clientsLennart Poettering2020-01-1510-0/+1270
| |
| * shared: add helpers for displaying new-style user/group records to usersLennart Poettering2020-01-155-0/+560
| |
| * shared: add internal API for querying JSON user records via varlinkLennart Poettering2020-01-153-0/+1390
| | | | | | | | | | This new API can be used in place of NSS by our own internal code if more than the classic UNIX records are needed.
| * shared: add helpers for converting NSS passwd/group structures to new JSON ↵Lennart Poettering2020-01-155-0/+525
| | | | | | | | | | | | | | | | 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.
| * shared: add generic user/group record structures and JSON parsersLennart Poettering2020-01-155-0/+2652
| |
| * libcrypt-util: add superficial validator for UNIX hashed password stringsLennart Poettering2020-01-152-0/+13
| |
| * shared: split out crypt() specific helpers into its own .c/.h in src/shared/Lennart Poettering2020-01-158-52/+107
| | | | | | | | | | | | | | | | | | | | 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.
| * nss-util: add macros for generating getpwent()/getgrent() prototypesLennart Poettering2020-01-151-0/+32
|/ | | | | We have similar macros already for getpwuid()/getpwnam(), let's add more of this.
* Merge pull request #14579 from keszybz/docs-indexZbigniew Jędrzejewski-Szmek2020-01-153-4/+2
|\ | | | | Revert the test move and fix formatting on main page a bit
| * docs: fix width of console exampleZbigniew Jędrzejewski-Szmek2020-01-151-1/+1
| |
| * Revert "docs: rename HACKING → Hacking"Zbigniew Jędrzejewski-Szmek2020-01-152-3/+1
| | | | | | | | This reverts commit 8c5cd27dd155fbe71a6bf82096b8775c5ff453b8.
* | Merge pull request #14562 from yuwata/table-strvZbigniew Jędrzejewski-Szmek2020-01-158-213/+418
|\ \ | | | | | | introduce TABLE_STRV and use it in networkctl and resolvectl
| * | test-format-table: add tests for TABLE_STRVYu Watanabe2020-01-151-0/+114
| | |
| * | resolvectl: use format-table.[ch]Yu Watanabe2020-01-151-104/+181
| | |
| * | networkctl: use TABLE_STRVYu Watanabe2020-01-151-87/+50
| | |
| * | format-table: introduce TABLE_STRVYu Watanabe2020-01-152-3/+38
| | |
| * | strv: introduce strv_compare()Yu Watanabe2020-01-153-19/+35
| | |
* | | Merge pull request #14578 from keszybz/docs-indexZbigniew Jędrzejewski-Szmek2020-01-153-3/+7
|\ \ \ | | |/ | |/| Let's see if redirects work