summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-08-16zsh: _journalctl: do not complete exclusive modes (#3957)Daniel Hahler
After `journalctl -D /var/log/journal` "--directory", "--file", "--machine" and "--root" should not be available for completion, because they are exclusive. But multiple `--file` arguments are allowed.
2016-08-14Merge pull request #3905 from htejun/cgroup-v2-cpuZbigniew Jędrzejewski-Szmek
core: add cgroup CPU controller support on the unified hierarchy (zj: merging not squashing to make it clear against which upstream this patch was developed.)
2016-08-13units: do not start load-random-seed in containers (#3941)Zbigniew Jędrzejewski-Szmek
Random numbers are provided by the host kernel, we don't need to do anything. https://bugzilla.redhat.com/show_bug.cgi?id=1329124
2016-08-13hwdb: normalize spacing in 60-keyboard.hwdb (#3954)Zbigniew Jędrzejewski-Szmek
2016-08-13zsh: _systemctl: do not attempt to use "--system" by default (#3951)Daniel Hahler
In 68c4f6d the following was added: local -a _modes; _modes=("--user" "--system") local _sys_service_mgr=${${words:*_modes}[(R)(${(j.|.)_modes})]:---system} With the following comment: > If neither are on the line, --system is set; for system services to be > completed. But it does not work as documented: % _modes=(--user --system) % words=() % echo ${${words:*_modes}[(R)(${(j.|.)_modes})]:---system} However, it should not use `--system` in that case anyway, so this patch removes the part that should cause a default to be used and adds some comments.
2016-08-13zsh: _journalctl: improve support for handling mode args (#3952)Daniel Hahler
This only completes fields from `journalctl --user` in _journal_fields when `--user` is used. It also changes $_sys_service_mgr to include both `--system` and `--user`, because `journalctl` behaves different from `systemctl` in this regard. No attempt is made to filter out invalid combinations, e.g. when using both `--directory` and `--system` (see https://github.com/systemd/systemd/issues/3949).
2016-08-11Merge pull request #3942 from blueyed/zsh-respect-user-moreZbigniew Jędrzejewski-Szmek
zsh completion: handle --user mode when filtering by state and in journalctl commands
2016-08-11zsh: _journalctl: handle --user in _journal_noneDaniel Hahler
This uses the same mechanism from _systemctl to inject `--user` into the `journalctrl -F _EXE` call to list executables. Before this patch the "commands" section would list executables from system units always.
2016-08-11zsh: _filter_units_by_property: respect --userDaniel Hahler
Use `$_sys_service_mgr` to handle `--user`, so that `systemctl --user stop` will correctly filter the active (user) units. Before this patch, only user units that also exist as system units and are stoppable there would be listed.
2016-08-11man: add "timeout" to status table (#3919)Zbigniew Jędrzejewski-Szmek
2016-08-11coredump: treat RLIMIT_CORE below page size as disabling coredumps (#3932)Zbigniew Jędrzejewski-Szmek
The kernel treats values below a certain threshold (minfmt->min_coredump which is initialized do ELF_EXEC_PAGESIZE, which varies between architectures, but is usually the same as PAGE_SIZE) as disabling coredumps [1]. Any core image below ELF_EXEC_PAGESIZE will yield an invalid backtrace anyway [2], so follow the kernel and not try to parse or store such images. [1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/fs/coredump.c#n660 [2] systemd-coredump[16260]: Process 16258 (sleep) of user 1002 dumped core. Stack trace of thread 16258: #0 0x00007f1d8b3d3810 n/a (n/a) https://bugzilla.redhat.com/show_bug.cgi?id=1309172#c19
2016-08-11Merge pull request #3933 from keszybz/hwdb-parserLennart Poettering
Add hwdb parser to check for inconsistencies
2016-08-09install: follow config_path symlink (#3362)Rhys
Under NixOS, the config_path /etc/systemd/system is a symlink to /etc/static/systemd/system. Commands such as `systemctl list-unit-files` and `systemctl is-enabled` did not work as the symlink was not followed. This does not affect how symlinks are treated within the config_path directory.
2016-08-09sd-journal: watch logs below container's /{var,run}/log/journal (instead of ↵Evgeny Vereshchagin
the /) (#3934) Fixes #3927.
2016-08-09added Zelotes gaming mouse (#3925)romanstingler
2016-08-09build-sys: hook up the hwdb parser to checkZbigniew Jędrzejewski-Szmek
2016-08-09hwdb: comment out a duplicated key for the XOZbigniew Jędrzejewski-Szmek
It's hard to say which one of the two mappings should stay. But the later one would win (when both very present), and nobody complained, so let's assume that that's the one.
2016-08-09hwdb: use lowercase hex for key numbersZbigniew Jędrzejewski-Szmek
It seems awkward to have both cases mixes. Note that the real parser accepts both cases, and this only standarizes the usage in the systemd database.
2016-08-09hwdb: remove duplicated matches for old Logitech unifying receiverZbigniew Jędrzejewski-Szmek
Quoting https://github.com/systemd/systemd/pull/3906#discussion_r73828368: > According to > http://support.logitech.com/en_us/product/v220-cordless-optical-mouse-for-notebooks > it seems the mouse is using a pre-version of the small unifying receiver we > know now. If there are 2 mice with the same receiver, that means that the > values should both be dropped IMO.
2016-08-09tests: add python parser for hwdb grammarZbigniew Jędrzejewski-Szmek
This works for hwdb/[67]0-*.hwdb. I also added code to parse hwdb/20-*, but those files are huge, and parsing them using this parser is annoyingly slow (about one minute for the biggest files). So I removed the support for hwdb/20-*, a much simpler hand-generated parser should suffice for those. Current output: hwdb/60-evdev.hwdb: 24 match groups, 35 matches, 88 properties, 0.19323015213012695s to parse Match 'evdev:input:b0003v05ACp0259*' is duplicated Match 'evdev:input:b0003v05ACp025A*' is duplicated Match 'evdev:input:b0003v05ACp025B*' is duplicated hwdb/60-keyboard.hwdb: 122 match groups, 188 matches, 638 properties, 1.0906572341918945s to parse Failed to parse: 'KEYBOARD_KEY_8F=switchvideomode' Failed to parse: 'KEYBOARD_KEY_C0183=media' Failed to parse: 'KEYBOARD_KEY_C0201=new' Failed to parse: 'KEYBOARD_KEY_C0289=reply' Failed to parse: 'KEYBOARD_KEY_C028B=forwardmail' Failed to parse: 'KEYBOARD_KEY_C028C=send' Failed to parse: 'KEYBOARD_KEY_C021A=undo' Failed to parse: 'KEYBOARD_KEY_C0279=redo' Failed to parse: 'KEYBOARD_KEY_C0208=print' Failed to parse: 'KEYBOARD_KEY_C0207=save' Failed to parse: 'KEYBOARD_KEY_C0194=file' Failed to parse: 'KEYBOARD_KEY_C01A7=documents' Failed to parse: 'KEYBOARD_KEY_C01B6=images' Failed to parse: 'KEYBOARD_KEY_C01B7=sound' Property KEYBOARD_KEY_c7 is duplicated Failed to parse: 'KEYBOARD_KEY_cF=end' hwdb/70-mouse.hwdb: 62 match groups, 93 matches, 68 properties, 0.34186625480651855s to parse Match 'mouse:usb:v046dpc51b:name:Logitech USB Receiver:' is duplicated hwdb/70-pointingstick.hwdb: 5 match groups, 14 matches, 7 properties, 0.06518816947937012s to parse hwdb/70-touchpad.hwdb: 3 match groups, 5 matches, 3 properties, 0.039690494537353516s to parse Subsequest commits will clean those issues up.
2016-08-09hwdb: indent commented propertiesZbigniew Jędrzejewski-Szmek
This way it's clear that the property block does not end at the comment. The python checker will complain if this is not the case. We had a few bugs before where two match blocks were merged by mistake, and this change should help avoid that.
2016-08-09hwdb: remove extra spacesZbigniew Jędrzejewski-Szmek
2016-08-09journal-gatewayd: fix typo; s/Certificat/Certificate/ (#3931)Vito Caputo
2016-08-09hwdb: fix duplicate entry for Apple touchpads (#3921)Peter Hutterer
Copy-paste error, correct IDs from the kernel's drivers/input/mouse/bcm5974.c Fixes: https://github.com/systemd/systemd/pull/3906/
2016-08-08core: amend policy to open up dynamic user queries (#3920)Zbigniew Jędrzejewski-Szmek
2016-08-07hwdb: add multimedia keys for Medion Akoya series (#3918)romanstingler
2016-08-07core: add cgroup CPU controller support on the unified hierarchyTejun Heo
Unfortunately, due to the disagreements in the kernel development community, CPU controller cgroup v2 support has not been merged and enabling it requires applying two small out-of-tree kernel patches. The situation is explained in the following documentation. https://git.kernel.org/cgit/linux/kernel/git/tj/cgroup.git/tree/Documentation/cgroup-v2-cpu.txt?h=cgroup-v2-cpu While it isn't clear what will happen with CPU controller cgroup v2 support, there are critical features which are possible only on cgroup v2 such as buffered write control making cgroup v2 essential for a lot of workloads. This commit implements systemd CPU controller support on the unified hierarchy so that users who choose to deploy CPU controller cgroup v2 support can easily take advantage of it. On the unified hierarchy, "cpu.weight" knob replaces "cpu.shares" and "cpu.max" replaces "cpu.cfs_period_us" and "cpu.cfs_quota_us". [Startup]CPUWeight config options are added with the usual compat translation. CPU quota settings remain unchanged and apply to both legacy and unified hierarchies. v2: - Error in man page corrected. - CPU config application in cgroup_context_apply() refactored. - CPU accounting now works on unified hierarchy.
2016-08-07networkd: remove duplicate call to manager_dirty (#3917)Susant Sahani
since link_dirty itself calls manager_dirty no need to call it separately .
2016-08-07Merge pull request #3914 from keszybz/fix-man-linksLennart Poettering
Fix man links
2016-08-07man: add a table of possible exit statuses (#3910)Zbigniew Jędrzejewski-Szmek
2016-08-06Merge pull request #3884 from poettering/private-usersZbigniew Jędrzejewski-Szmek
2016-08-06man: fix some internal man page referencesZbigniew Jędrzejewski-Szmek
sd_journal-query_enumerate was an early draft, the name was changed to sd_j_enumerate_fields.
2016-08-06man: provide html links to a bunch of external man pagesZbigniew Jędrzejewski-Szmek
2016-08-06journal-gatewayd: fix segfault with certain request (#3893)Yi EungJun
When client requests to get logs with `follow` and `KEY=match` that doesn't match any log entry, journal-gatewayd segfaulted. Make request_reader_entries to return zero in such case to wait for matching entries. This fixes https://github.com/systemd/systemd/issues/3873.
2016-08-06journal-gatewayd: add --directory option (#3913)Yi EungJun
Serve journals in the specified directory instead of default journals.
2016-08-06Merge pull request #3911 from crrodriguez/asan-fixesLennart Poettering
Asan fixes
2016-08-06buildsys,journal: allow -fsanitize=address without VALGRIND definedCristian Rodríguez
Fixed (master) versions of libtool pass -fsanitize=address correctly into CFLAGS and LDFLAGS allowing ASAN to be used without any special configure tricks..however ASAN triggers in lookup3.c for the same reasons valgrind does. take the alternative codepath if __SANITIZE_ADDRESS__ is defined as well.
2016-08-06test: fix stack overflow reported by ASANCristian Rodríguez
It was meant to write to q instead of t FAIL: test-id128 ================ ================================================================= ==125770==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffd4615bd31 at pc 0x7a2f41b1bf33 bp 0x7ffd4615b750 sp 0x7ffd4615b748 WRITE of size 1 at 0x7ffd4615bd31 thread T0 #0 0x7a2f41b1bf32 in id128_to_uuid_string src/libsystemd/sd-id128/id128-util.c:42 #1 0x401f73 in main src/test/test-id128.c:147 #2 0x7a2f41336341 in __libc_start_main (/lib64/libc.so.6+0x20341) #3 0x401129 in _start (/home/crrodriguez/scm/systemd/.libs/test-id128+0x401129) Address 0x7ffd4615bd31 is located in stack of thread T0 at offset 1409 in frame #0 0x401205 in main src/test/test-id128.c:37 This frame has 23 object(s): [32, 40) 'b' [96, 112) 'id' [160, 176) 'id2' [224, 240) 'a' [288, 304) 'b' [352, 368) 'a' [416, 432) 'b' [480, 496) 'a' [544, 560) 'b' [608, 624) 'a' [672, 688) 'b' [736, 752) 'a' [800, 816) 'b' [864, 880) 'a' [928, 944) 'b' [992, 1008) 'a' [1056, 1072) 'b' [1120, 1136) 'a' [1184, 1200) 'b' [1248, 1264) 'a' [1312, 1328) 'b' [1376, 1409) 't' <== Memory access at offset 1409 overflows this variable [1472, 1509) 'q' HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext (longjmp and C++ exceptions *are* supported) SUMMARY: AddressSanitizer: stack-buffer-overflow src/libsystemd/sd-id128/id128-util.c:42 in id128_to_uuid_string Shadow bytes around the buggy address: 0x100028c23750: f2 f2 00 00 f4 f4 f2 f2 f2 f2 00 00 f4 f4 f2 f2 0x100028c23760: f2 f2 00 00 f4 f4 f2 f2 f2 f2 00 00 f4 f4 f2 f2 0x100028c23770: f2 f2 00 00 f4 f4 f2 f2 f2 f2 00 00 f4 f4 f2 f2 0x100028c23780: f2 f2 00 00 f4 f4 f2 f2 f2 f2 00 00 f4 f4 f2 f2 0x100028c23790: f2 f2 00 00 f4 f4 f2 f2 f2 f2 00 00 f4 f4 f2 f2 =>0x100028c237a0: f2 f2 00 00 00 00[01]f4 f4 f4 f2 f2 f2 f2 00 00 0x100028c237b0: 00 00 05 f4 f4 f4 00 00 00 00 00 00 00 00 00 00 0x100028c237c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x100028c237d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x100028c237e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x100028c237f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==125770==ABORTING FAIL test-id128 (exit status: 1)
2016-08-06test: test-sigbus must be skipped when -fsanitize=address is usedCristian Rodríguez
ASAN is unable to handle it.
2016-08-05Merge pull request #3818 from poettering/exit-status-envZbigniew Jędrzejewski-Szmek
beef up /var/tmp and /tmp handling; set $SERVICE_RESULT/$EXIT_CODE/$EXIT_STATUS on ExecStop= and make sure root/nobody are always resolvable
2016-08-06networkd: add support to set STP (#3903)Susant Sahani
fixes #3881
2016-08-05Merge pull request #3900 from keszybz/fix-3607Lennart Poettering
Fix 3607
2016-08-05socket: add helper function to remove code duplicationZbigniew Jędrzejewski-Szmek
2016-08-05core/socket: include remote address in the message when dropping connectionZbigniew Jędrzejewski-Szmek
Without the address the message is not very useful. Aug 04 23:52:21 rawhide systemd[1]: testlimit.socket: Too many incoming connections (4) from source ::1, dropping connection.
2016-08-05systemd: do not serialize peer, bump count when deserializing socket insteadZbigniew Jędrzejewski-Szmek
2016-08-05core/service: serialize and deserialize accept_socketZbigniew Jędrzejewski-Szmek
This fixes an issue during reexec — the count of connections would be lost: [zbyszek@fedora-rawhide ~]$ systemctl status testlimit.socket | grep Connected Accepted: 1; Connected: 1 [zbyszek@fedora-rawhide ~]$ sudo systemctl daemon-reexec [zbyszek@fedora-rawhide ~]$ systemctl status testlimit.socket | grep Connected Accepted: 1; Connected: 0 With the patch, Connected count is preserved. Also add "Accept Socket" to the dump output for services.
2016-08-05core/socket: rework SocketPeer refcountingZbigniew Jędrzejewski-Szmek
Make functions and definitions that don't need to be shared local to socket.c.
2016-08-05Merge pull request #3902 from poettering/parse-niceRonny Chevalier
util-lib: unify parsing of nice level values
2016-08-05util-lib: unify parsing of nice level valuesLennart Poettering
This adds parse_nice() that parses a nice level and ensures it is in the right range, via a new nice_is_valid() helper. It then ports over a number of users to this. No functional changes.
2016-08-05networkd: do not set NOARP unconditionally (#3891)Zbigniew Jędrzejewski-Szmek
Fixes #3890.