summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* doc: add a new doc/ directory, and move two markdown docs into themLennart Poettering2018-02-2712-20/+22
| | | | | | | | | I figure sooneror later we'll have more of these docs, hence let's give them a clean place to be. This leaves NEWS and README/README.md as well as the LICENSE texts in the root directory of the project since that appears to be customary for Free Software projects.
* missing_syscall: add pkey_mprotect for ppc (#8292)Zbigniew Jędrzejewski-Szmek2018-02-271-0/+2
| | | Accurate for both ppc and ppc64 according to https://fedora.juszkiewicz.com.pl/syscalls.html.
* Merge pull request #8282 from poettering/khash-enokeyEvgeny Vereshchagin2018-02-274-5/+77
|\ | | | | deal with borked ENOKEY on centos kernel's AF_ALG support
| * khash: try to detect broken AF_ALG support in centos kernelsLennart Poettering2018-02-264-5/+77
| | | | | | | | Fixes: #8278
* | po: update Catalan translation (#8267)Robert Antoni Buj Gelonch2018-02-271-230/+373
| |
* | man: suggests TemporaryFileSystem= when people want to nest bind mounts ↵Yu Watanabe2018-02-271-3/+7
| | | | | | | | | | | | inside InaccessiblePaths= (#8288) Suggested by @sourcejedi in #8242. Closes #7895, #7153, and #2780.
* | Merge pull request #8285 from poettering/logind-close-fixesZbigniew Jędrzejewski-Szmek2018-02-277-77/+77
|\ \ | | | | | | various smaller logind fixes
| * | sd-login: make use of _cleanup_close_ where possibleLennart Poettering2018-02-261-16/+9
| | |
| * | journal-upload: make use of safe_close() where appropriateLennart Poettering2018-02-261-3/+1
| | |
| * | logind: make sure we don't trip up on half-initialized session devicesLennart Poettering2018-02-261-1/+1
| | | | | | | | | | | | Fixes: #8035
| * | logind: check file is device node before using .st_rdevLennart Poettering2018-02-261-0/+6
| | |
| * | logind: let's pack a few struct fields we can packLennart Poettering2018-02-261-3/+3
| | |
| * | logind: fd 0 is a valid fdLennart Poettering2018-02-262-2/+2
| | |
| * | logind: let's reduce one level of indentationLennart Poettering2018-02-261-16/+19
| | |
| * | logind: propagate the right error, don't make up ENOMEMLennart Poettering2018-02-261-3/+1
| | |
| * | logind: rework sd_eviocrevoke()Lennart Poettering2018-02-261-7/+5
| | | | | | | | | | | | | | | Let's initialize static variables properly and get rid of redundant variables.
| * | logind: trivial improvementsLennart Poettering2018-02-263-26/+30
| |/ | | | | | | | | Just some addition whitespace, some additional assert()s, and removal of redundant variables.
* | fstab-generator: downgrade message when we can't canonicalize fstab entries ↵Lennart Poettering2018-02-271-12/+9
| | | | | | | | | | | | | | | | (#8281) Let's make this LOG_DEBUG, as this didn't used to be an issue, and shouldn't really be still. Replaces: #8132
* | Merge pull request #8284 from keszybz/gcc-warning-fixesLennart Poettering2018-02-268-35/+42
|\ \ | | | | | | Gcc warning fixes
| * | core/unit: voidify one snprintf statementZbigniew Jędrzejewski-Szmek2018-02-261-1/+1
| | | | | | | | | | | | One more follow-up for f810b631cd.
| * | core/path: add one more assertZbigniew Jędrzejewski-Szmek2018-02-261-1/+2
| | |
| * | basic/xattr-util: do not cast ssize_t to intZbigniew Jędrzejewski-Szmek2018-02-263-14/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc warns about unitialized memory access because it notices that ssize_t which is < 0 could be cast to positive int value. We know that this can't really happen because only -1 can be returned, but OTOH, in principle a large *positive* value cannot be cast properly. This is unlikely too, since xattrs cannot be too large, but it seems cleaner to just use a size_t to return the value and avoid the cast altoghter. This makes the code simpler and gcc is happy too. The following warning goes away: [113/1502] Compiling C object 'src/basic/basic@sta/xattr-util.c.o'. In file included from ../src/basic/alloc-util.h:28:0, from ../src/basic/xattr-util.c:30: ../src/basic/xattr-util.c: In function ‘fd_getcrtime_at’: ../src/basic/macro.h:207:60: warning: ‘b’ may be used uninitialized in this function [-Wmaybe-uninitialized] UNIQ_T(A,aq) < UNIQ_T(B,bq) ? UNIQ_T(A,aq) : UNIQ_T(B,bq); \ ^ ../src/basic/xattr-util.c:155:19: note: ‘b’ was declared here usec_t a, b; ^
| * | basic/exec-util: use _exit() to return from childZbigniew Jędrzejewski-Szmek2018-02-261-1/+1
| | |
| * | basic: shorten the code a bit in two placesZbigniew Jędrzejewski-Szmek2018-02-262-18/+8
| |/ | | | | | | gcc complains that len might be used unitialized, but afaict, this is not true.
* / tree-wide: use reallocarray instead of our home-grown realloc_multiply (#8279)Zbigniew Jędrzejewski-Szmek2018-02-269-13/+16
|/ | | | | | | There isn't much difference, but in general we prefer to use the standard functions. glibc provides reallocarray since version 2.26. I moved explicit_bzero is configure test to the bottom, so that the two stdlib functions are at the bottom.
* Merge pull request #8270 from dmedri/masterZbigniew Jędrzejewski-Szmek2018-02-262-121/+197
|\ | | | | po: updates and basic notes for translators
| * Some notes for translatorsDaniele Medri2018-02-231-0/+27
| |
| * po: update Italian translationDaniele Medri2018-02-231-121/+170
| |
* | Merge pull request #8273 from yuwata/fix-test-executeZbigniew Jędrzejewski-Szmek2018-02-266-10/+11
|\ \ | | | | | | test: cleanups for test-execute
| * | test: use "$$" to pass a literal dollar signYu Watanabe2018-02-261-5/+5
| | | | | | | | | | | | Follow-up for 932329865741054f52dee2e7fc9bd6159b791fee.
| * | test: use setup_fake_runtime_dir() in test-executeYu Watanabe2018-02-265-5/+6
|/ /
* | systemd-sysv-install: avoid using ROOT variable from the environmentZbigniew Jędrzejewski-Szmek2018-02-231-0/+2
| | | | | | | | Fixes #8180.
* | basic/virt: provide a nicer message is /proc/cpuinfo is not availableZbigniew Jędrzejewski-Szmek2018-02-231-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ sudo systemd-run -p RootDirectory=/usr -E LD_LIBRARY_PATH=/lib/systemd/ -E SYSTEMD_LOG_LEVEL=debug /bin/systemd-detect-virt Before systemd-detect-virt[18498]: No virtualization found in DMI systemd-detect-virt[18498]: No virtualization found in CPUID systemd-detect-virt[18498]: Virtualization XEN not found, /proc/xen does not exist systemd-detect-virt[18498]: This platform does not support /proc/device-tree systemd-detect-virt[18498]: Failed to check for virtualization: No such file or directory The first four lines are at debug level, so the user would only see that last one usually, which is not very enlightening. This now becomes: systemd-detect-virt[21172]: No virtualization found in DMI systemd-detect-virt[21172]: No virtualization found in CPUID systemd-detect-virt[21172]: Virtualization XEN not found, /proc/xen does not exist systemd-detect-virt[21172]: This platform does not support /proc/device-tree systemd-detect-virt[21172]: /proc/cpuinfo not found, assuming no UML virtualization. systemd-detect-virt[21172]: This platform does not support /proc/sysinfo systemd-detect-virt[21172]: Found VM virtualization none systemd-detect-virt[21172]: none We do more checks, which is good too.
* | hwdb: Fix Chuwi Hi12 orientation sensor (#8266)Giacomo Longo2018-02-231-0/+4
| | | | | | hwdb: Fix Chuwi Hi12 orientation sensor
* | Merge pull request #8258 from keszybz/log-issuesLennart Poettering2018-02-239-117/+139
|\ \ | | | | | | Fix some logging issues
| * | basic/log: add an assert that does not recurse into logging functionsZbigniew Jędrzejewski-Szmek2018-02-231-2/+12
| | | | | | | | | | | | | | | | | | Then it can be used in the asserts in logging functions without causing infinite recursion. The error is just printed to stderr, it should be good enough for the common case.
| * | udev/net-id: check all snprintf return valuesZbigniew Jędrzejewski-Szmek2018-02-232-37/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc-8 throws an error if it knows snprintf might truncate output and the return value is ignored: ../src/udev/udev-builtin-net_id.c: In function 'dev_pci_slot': ../src/udev/udev-builtin-net_id.c:297:47: error: '%s' directive output may be truncated writing up to 255 bytes into a region of size between 0 and 4095 [-Werror=format-truncation=] snprintf(str, sizeof str, "%s/%s/address", slots, dent->d_name); ^~ ../src/udev/udev-builtin-net_id.c:297:17: note: 'snprintf' output between 10 and 4360 bytes into a destination of size 4096 snprintf(str, sizeof str, "%s/%s/address", slots, dent->d_name); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors Let's check all return values. This actually makes the code better, because there's no point in trying to open a file when the name has been truncated, etc.
| * | udev/net-id: use _cleanup_Zbigniew Jędrzejewski-Szmek2018-02-231-15/+11
| | | | | | | | | | | | This fixes a minor memleak of 'address' if the file could not be read.
| * | systemctl: do not hint logs when a unit cannot be reloadedZbigniew Jędrzejewski-Szmek2018-02-231-1/+2
| | | | | | | | | | | | The logs don't contain any additional information.
| * | basic/log: make sure header is printed correctly, add testZbigniew Jędrzejewski-Szmek2018-02-232-38/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If log_do_header() was called with overly long parameters, it'd generate improper output. Essentially, it'd be truncated at random point, in particular missing a newline at the end, so it'd run with the next field, usually MESSAGE=. log_do_header is called with parameters from compiled code (file name, lien nubmer, etc), so in practice this was unlikely to ever be a problem, but it is possible. In particular, if systemd was compiled from sources in some deeply nested directory (which happens for example in mock and other build roots), the filename could be very long. As a safety measure, let's truncate all parameters to 256 bytes. So we have 5 fields which are 256 bytes (plus the field name prefix), and a few other fields with fixed width. This must always fit in the 2048 byte buffer. I don't think there's much gain in calculating the required length precisely, since it's a lot of fields and a few bytes allocated on the stack don't matter.
| * | basic/log: fix confusion with parameters to log_dispatch_internalZbigniew Jędrzejewski-Szmek2018-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | log_dispatch_internal has only one caller where the extra_field/extra params are not null: log_unit_full. When log_unit_full() was called, when we got to log_dispatch_internal, our header would look like this: PRIORITY=7 SYSLOG_FACILITY=3 CODE_FILE=../src/core/manager.c CODE_LINE=2145 CODE_FUNC=manager_invoke_sigchld_event USER_UNIT=gnome-terminal-server.service 65dffa7a3b984a6d9a46f0b8fb57710bUSER_INVOCATION_ID= SYSLOG_IDENTIFIER=systemd It took me a while to understand why I'm not seeing mangled messages in the journal (after all, "" is a valid rvalue for log messages). The answer is that journald rejects any field name which starts with a digit, and the MESSAGE_ID that was used here starts with a digit. Hence, those lines would be silently filtered out.
| * | journal: drop left-over header lineZbigniew Jędrzejewski-Szmek2018-02-231-2/+0
| | | | | | | | | | | | Fixup for 53978b98f9ecc16dca216e8dab17d0d5622c9056.
| * | basic/log: make log_object_internalv staticZbigniew Jędrzejewski-Szmek2018-02-232-14/+2
| | | | | | | | | | | | | | | It makes the code easier to read, because it's obvious that the function cannot be called from elsewhere.
| * | basic/log: voidify snprintf statementsZbigniew Jędrzejewski-Szmek2018-02-231-6/+6
| | | | | | | | | | | | | | | The buffers are fixed size, so the message may not fit, but we don't particularly care.
| * | Revert "Replace use of snprintf with xsprintf"Zbigniew Jędrzejewski-Szmek2018-02-234-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a7419dbc59da5c8cc9e90b3d96bc947cad91ae16. _All_ changes in that commit were wrong. Fixes #8211.
* | | Merge pull request #8252 from keszybz/set-property-manLennart Poettering2018-02-233-100/+102
|\ \ \ | |_|/ |/| | set-property man-page adjust-ments
| * | systemctl: use VARIABLE as the placeholder for a variable nameZbigniew Jędrzejewski-Szmek2018-02-221-3/+3
| | | | | | | | | | | | The man page was already using VARIABLE=VALUE, so no change there.
| * | systemctl,man: use PROPERTY as the placeholder for a property nameZbigniew Jędrzejewski-Szmek2018-02-222-78/+78
| | |
| * | systemctl,man: use UNIT as the placeholder for a unit nameZbigniew Jędrzejewski-Szmek2018-02-222-42/+42
| | | | | | | | | | | | | | | | | | | | | | | | NAME is kind of meaningless, because everything has a name. "Unit" makes it more obvious that a name of a unit is necessary. I was always momentarily baffled by "set-property NAME ASSIGNMENT...", where there are two objects (the unit and the property), and it's not clear which of the two "NAME" is supposed to signify.
| * | man: IPAccounting for slices in now allowedZbigniew Jędrzejewski-Szmek2018-02-221-4/+6
| | | | | | | | | | | | Also split that description into paragraphs by subject.