summaryrefslogtreecommitdiffstats
path: root/test (unfollow)
Commit message (Collapse)AuthorFilesLines
2016-11-04kernel-install: use exit instead of return (#4565)Yu Watanabe1-2/+2
/bin/kernel-install: line 143: return: can only `return' from a function or sourced script https://bugzilla.redhat.com/show_bug.cgi?id=1391829
2016-11-04man: update kernel-install(8) to match reality (#4563)Zbigniew Jędrzejewski-Szmek1-4/+5
2016-11-04doc: clarify NoNewPrivileges (#4562)Kees Cook1-4/+4
Setting no_new_privs does not stop UID changes, but rather blocks gaining privileges through execve(). Also fixes a small typo.
2016-11-03build-sys: link test-seccomp against seccomp libs (#4560)Martin Pitt1-1/+2
Fixes build error on recent toolchains: ../src/test/test-seccomp.c:35: error: undefined reference to 'seccomp_arch_native' collect2: error: ld returned 1 exit status
2016-11-03analyze: fix build w/o seccompZbigniew Jędrzejewski-Szmek1-0/+8
2016-11-03Revert "sd-bus: use PRIu64 instead of casting" (#4556)v232Zbigniew Jędrzejewski-Szmek1-2/+4
This reverts commit 75ead2b753cb9586f3f208326446081baab70da1. Follow up for #4546: > @@ -848,8 +848,7 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) { if (k->src_id == KDBUS_SRC_ID_KERNEL) bus_message_set_sender_driver(bus, m); else { - xsprintf(m->sender_buffer, ":1.%llu", - (unsigned long long)k->src_id); + xsprintf(m->sender_buffer, ":1.%"PRIu64, k->src_id); This produces: src/libsystemd/sd-bus/bus-kernel.c: In function ‘bus_kernel_make_message’: src/libsystemd/sd-bus/bus-kernel.c:851:44: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘__u64 {aka long long unsigned int}’ [-Wformat=] xsprintf(m->sender_buffer, ":1.%"PRIu64, k->src_id); ^
2016-11-03hwdb update for 232 (#4557)Lennart Poettering4-2256/+6651
2016-11-03final NEWS update for 232 (#4558)Lennart Poettering1-2/+2
let's get this out today!
2016-11-03seccomp-util, analyze: export comments as a help stringZbigniew Jędrzejewski-Szmek4-19/+23
Just to make the whole thing easier for users.
2016-11-03seccomp-util: move @default to the first positionZbigniew Jędrzejewski-Szmek2-19/+20
Now that the list is user-visible, @default should be first.
2016-11-03analyze: add syscall-filter verbZbigniew Jędrzejewski-Szmek5-25/+101
This should make it easier for users to understand what each filter means as the list of syscalls is updated in subsequent systemd versions.
2016-11-03test: test DynamicUser= with SupplementaryGroups=Djalal Harouni3-0/+10
2016-11-03test: test DynamicUser= with a fixed userDjalal Harouni4-0/+25
2016-11-03core: intialize user aux groups and SupplementaryGroups= when DynamicUser= ↵Djalal Harouni1-13/+12
is set Make sure that when DynamicUser= is set that we intialize the user supplementary groups and that we also support SupplementaryGroups= Fixes: https://github.com/systemd/systemd/issues/4539 Thanks Evgeny Vereshchagin (@evverx)
2016-11-03parse_hwdb: add import fallback for python2Zbigniew Jędrzejewski-Szmek1-2/+8
2016-11-03udev/udev-watch: calculate the real buffer sizes neededZbigniew Jędrzejewski-Szmek2-5/+5
2016-11-03Do not raise in switch root if paths are too longZbigniew Jędrzejewski-Szmek1-7/+18
If we encounter the (unlikely) situation where the combined path to the new root and a path to a mount to be moved together exceed maximum path length, we shouldn't crash, but fail this path instead.
2016-11-03sd-bus: use PRIu64 instead of castingZbigniew Jędrzejewski-Szmek1-4/+2
2016-11-03Revert some uses of xsprintfZbigniew Jędrzejewski-Szmek4-10/+11
This reverts some changes introduced in d054f0a4d4. xsprintf should be used in cases where we calculated the right buffer size by hand (using DECIMAL_STRING_MAX and such), and never in cases where we are printing externally specified strings of arbitrary length. Fixes #4534.
2016-11-03core: make a constant table actually constantLennart Poettering1-8/+8
2016-11-03core: don't hit an assert when printing status messages about units with ↵Lennart Poettering1-1/+2
overly long description strings This essentially reverts one part of d054f0a4d451120c26494263fc4dc175bfd405b1. (We might also choose to use proper ellipsation here, but I wasn't sure the memory allocation this requires wouöld be a good idea here...) Fixes: #4534
2016-11-03man: fix two typos (is → are) (#4544)Lucas Werkmeister1-2/+2
2016-11-02systemctl: fix incorrect "need reload" on cat (#4535)Lucas Werkmeister1-1/+1
Reported by @evverx in #4493.
2016-11-02build-sys: bump package and library version in preparation for v232Lennart Poettering2-3/+3
2016-11-02add two additional entries to NEWSLennart Poettering1-0/+9
2016-11-02NEWS: add contributor list to news fileLennart Poettering2-0/+44
Unfortunately, github drops the original commiter when a PR is "squashed" (even if it is only a single commit) and replaces it with some rubbish github-specific user id. Thus, to make the contributors list somewhat useful, update the .mailmap file and undo all the weirdness github applied there.
2016-11-02pid1: fix fd memleak when we hit FileDescriptorStoreMax limitZbigniew Jędrzejewski-Szmek1-9/+9
Since service_add_fd_store() already does the check, remove the redundant check from service_add_fd_store_set(). Also, print a warning when repopulating FDStore after daemon-reexec and we hit the limit. This is a user visible issue, so we should not discard fds silently. (Note that service_deserialize_item is impacted by the return value from service_add_fd_store(), but we rely on the general error message, so the caller does not need to be modified, and does not show up in the diff.)
2016-11-02core: change mount_synthesize_root() return to intLennart Poettering1-6/+8
Let's propagate the error here, instead of eating it up early. In a later change we should probably also change mount_enumerate() to propagate errors up, but that would mean we'd have to change the unit vtable, and thus change all unit types, hence is quite an invasive change.
2016-11-02networkd: flush DNSSL/RDNSS lists when we lose carrierLennart Poettering3-3/+14
Fixes: #3870
2016-11-02netword: minor memory leak fixLennart Poettering1-2/+2
2016-11-02nspawn: if we set up a loopback device, try to mount it with "discard"Lennart Poettering1-2/+12
Let's make sure that our loopback files remain sparse, hence let's set "discard" as mount option on file systems that support it if the backing device is a loopback.
2016-11-02systemctl: tweak the "systemctl list-units" output a bitLennart Poettering1-14/+19
Make the underlining between the header and the body and between the units of different types span the whole width of the table. Let's never make the table wider than necessary (which is relevant due the above). When space is limited and we can't show the full ID or description string prefer showing the full ID over the full description. The ID is after all something people might want to copy/paste, while the description is mostly just helpful decoration.
2016-11-02systemctl: properly turn off color after active columnLennart Poettering1-2/+2
If we turn on red color for the active column and it is not combined with underlining, then we need to turn it off explicitly afterwards. Do that.
2016-11-02sysctl: minor simplificationLennart Poettering1-2/+2
Let's place only one ternary operator.
2016-11-02sysctl: no need to check for eof twiceLennart Poettering1-1/+1
Let's only check for eof once after the fgets(). There's no point in checking EOF before the first read, and twice in each loop.
2016-11-02sysctl: when failing to process a config line, show line nrLennart Poettering1-2/+5
2016-11-02sysctl: split out condition check into its own functionLennart Poettering1-12/+20
This way, we can get rid of a label/goto.
2016-11-02sysctl: do not fail systemd-sysctl.service if /proc/sys is mounted read-onlyLennart Poettering1-5/+12
Let's make missing write access to /proc/sys non-fatal to the sysctl service. This is a follow-up to 411e869f497c7c7bd0688f1e3500f9043bc56e48 which altered the condition for running the sysctl service to check for /proc/sys/net being writable, accepting that /proc/sys might be read-only. In order to ensure the boot-up stays clean in containers lower the log level for the EROFS errors generated due to this.
2016-11-02unit: unify some code with new unit_new_for_name() callLennart Poettering7-42/+28
2016-11-02core: make the root mount perpetual tooLennart Poettering2-15/+69
Now that have a proper concept of "perpetual" units, let's make the root mount one too, since it also cannot go away.
2016-11-02core: rework the "no_gc" unit flag to become a more generic "perpetual" flagLennart Poettering5-19/+36
So far "no_gc" was set on -.slice and init.scope, to units that are always running, cannot be stopped and never exist in an "inactive" state. Since these units are the only users of this flag, let's remodel it and rename it "perpetual" and let's derive more funcitonality off it. Specifically, refuse enqueing stop jobs for these units, and report that they are "unstoppable" in the CanStop bus property.
2016-11-02core: initialize groups list before checking SupplementaryGroups= of a unit ↵Djalal Harouni1-13/+15
(#4533) Always initialize the supplementary groups of caller before checking the unit SupplementaryGroups= option. Fixes https://github.com/systemd/systemd/issues/4531
2016-11-02tests: make sure tests pass when invoked in "sudo"Lennart Poettering1-1/+1
This is a follow-up for 6309e51ea32d64524431ee65c49eecd44390da8f and makes sure we compare test results with the right user identifier.
2016-11-02man: document that too strict system call filters may affect the service managerLennart Poettering1-0/+8
If execve() or socket() is filtered the service manager might get into trouble executing the service binary, or handling any failures when this fails. Mention this in the documentation. The other option would be to implicitly whitelist all system calls that are required for these codepaths. However, that appears less than desirable as this would mean socket() and many related calls have to be whitelisted unconditionally. As writing system call filters requires a certain level of expertise anyway it sounds like the better option to simply document these issues and suggest that the user disables system call filters in the service temporarily in order to debug any such failures. See: #3993.
2016-11-02execute: apply seccomp filters after changing selinux/aa/smack contextsLennart Poettering1-31/+39
Seccomp is generally an unprivileged operation, changing security contexts is most likely associated with some form of policy. Moreover, while seccomp may influence our own flow of code quite a bit (much more than the security context change) make sure to apply the seccomp filters immediately before executing the binary to invoke. This also moves enforcement of NNP after the security context change, so that NNP cannot affect it anymore. (However, the security policy now has to permit the NNP change). This change has a good chance of breaking current SELinux/AA/SMACK setups, because the policy might not expect this change of behaviour. However, it's technically the better choice I think and should hence be applied. Fixes: #3993
2016-11-02seccomp: add two new syscall groupsLennart Poettering3-0/+44
@resources contains various syscalls that alter resource limits and memory and scheduling parameters of processes. As such they are good candidates to block for most services. @basic-io contains a number of basic syscalls for I/O, similar to the list seccomp v1 permitted but slightly more complete. It should be useful for building basic whitelisting for minimal sandboxes
2016-11-02man: two minor fixesLennart Poettering1-2/+2
2016-11-02seccomp: include pipes and memfd in @ipcLennart Poettering2-2/+5
These system calls clearly fall in the @ipc category, hence should be listed there, simply to avoid confusion and surprise by the user.
2016-11-02seccomp: drop execve() from @process listLennart Poettering2-2/+1
The system call is already part in @default hence implicitly allowed anyway. Also, if it is actually blocked then systemd couldn't execute the service in question anymore, since the application of seccomp is immediately followed by it.
2016-11-02seccomp: add clock query and sleeping syscalls to "@default" groupLennart Poettering2-25/+22
Timing and sleep are so basic operations, it makes very little sense to ever block them, hence don't.