summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2015-06-24sd-netlink: don't access type->type_system[_union] directlyDavid Herrmann
Make sure we never access type->type_system or type->type_system_union directly. This is an implementation detail of the type-system and we should always use the accessors. Right now, they only exist for 2-level accesses (type-system to type-system). This patch introduces the 1-level accessors (type to type-system) and makes use of it. This patch makes sure the proper assertions are in place, so we never accidentally access sub-type-systems for non-nested/union types. Note that this places hard-asserts on the accessors. This should be fine, as we expect callers to only access sub type-systems if they *know* they're dealing with nested types.
2015-06-24sd-netlink: rename NLA_ to NETLINK_TYPE_David Herrmann
The NLA_ names are used to name real datatypes we extract out of netlink messages. The kernel has an internal enum with the same names (NLA_foobar), which is *NOT* binary compatible to our types. Furthermore, we support a different set of types than the kernel (as we try to treat some kernel peculiarities as our own types to simplify the API). Rename NLA_ to NETLINK_TYPE_ to make clear that this is our own set of types.
2015-06-24Merge pull request #346 from poettering/install-bad-memoryDaniel Mack
install: fix minor bad memory access
2015-06-24ata_id: unbotch format specifierJan Engelhardt
Commit v218-247-g11c6f69 broke the output of the utility. "%1$" PRIu64 "x" expands to "%1$lux", essentially "%lux", which shows the problem. u and x cannot be combined, u wins as the type character, and x gets emitted verbatim to stdout. References: https://bugzilla.redhat.com/show_bug.cgi?id=1227503
2015-06-23install: fix bad memory accessLennart Poettering
2015-06-24Merge pull request #339 from teg/udev-coverityDaniel Mack
coverity fixes in udev
2015-06-23test: fix test-copy without /etc/os-release.Dimitri John Ledkov
2015-06-23udevadm: trigger - check return valuesTom Gundersen
Fixes CID#1296243.
2015-06-23udev: worker - check return value of udev_monitor_enable_receiving()Tom Gundersen
Fixes CID#1297430.
2015-06-23udev: event - check return code of dup2()Tom Gundersen
This fixes CID#1304688.
2015-06-23udev: bulitin-hwdb - fix memory leakTom Gundersen
This fixes CID#1292782.
2015-06-23Merge pull request #332 from xnox/bootchart-scalesDaniel Mack
bootchart: fix per-cpu & small scales.
2015-06-23bootchart: fix per-cpu scales.Dimitri John Ledkov
Closes systemd/systemd#330
2015-06-23Merge pull request #318 from walyong/smack_v02Daniel Mack
SMACK v02: support modify rules and add default executed process label
2015-06-23build-sys: add all source files and no built files to the tar ballKay Sievers
This fully synchronizes the content of a "make dist" and a "git archive" tar ball. http://lists.freedesktop.org/archives/systemd-devel/2015-June/033214.html
2015-06-22Merge pull request #314 from geertj/missing-exportsLennart Poettering
export sd_bus_object_added() / _removed()
2015-06-22udevd: suppress warning if we don't find cgroupTom Gundersen
This is expected on non-systemd systems, so just log it at debug level. This fixes issue #309.
2015-06-22smack: add default smack process label configWaLyong Cho
Similar to SmackProcessLabel=, if this configuration is set, systemd executes processes with given SMACK label. If unit has SmackProcessLabel=, this config is overwritten. But, do NOT be confused with SMACK64EXEC of execute file. This default execute process label(and also label which is set by SmackProcessLabel=) is set fork-ed process SMACK subject label and used to access the execute file. If the execution file has also SMACK64EXEC, finally executed process has SMACK64EXEC subject. While if the execution file has no SMACK64EXEC, the executed process has label of this config(or label which is set by SmackProcessLabel=). Because if execution file has no SMACK64EXEC then excuted process inherits label from caller process(in this case, the caller is systemd).
2015-06-22smack: support smack access change-ruleWaLyong Cho
Smack is also able to have modification rules of existing rules. In this case, the rule has additional argument to modify previous rule. /sys/fs/smackfs/load2 node can only take three arguments: subject object access. So if modification rules are written to /sys/fs/smackfs/load2, EINVAL error is happen. Those modification rules have to be written to /sys/fs/smackfs/change-rule. To distinguish access with operation of cipso2, split write_rules() for each operation. And, in write access rules, parse the rule and if the rule has four argument then write into /sys/fs/smackfs/change-rule. https://lwn.net/Articles/532340/ fwrite() or fputs() are fancy functions to write byte stream such like regular file. But special files on linux such like proc, sysfs are not stream of bytes. Those special files on linux have to be written with specific size. By this reason, in some of many case, fputs() was failed to write buffer to smack load2 node. The write operation for the smack nodes should be performed with write().
2015-06-21export sd_bus_object_added() / _removed()Geert Jansen
Fixes #306.
2015-06-21pam_systemd: Properly check kdbus availabilityJan Alexander Steffens (heftig)
This properly avoids setting DBUS_SESSION_BUS_ADDRESS if kdbus is loaded (or built into the kernel) but not wanted.
2015-06-19networkd: vlan improve loggingSusant Sahani
Replaces strerror() usage with log_netdev_error_errno()
2015-06-18Merge pull request #294 from teg/hashmap-debug-locking-2David Herrmann
hashmap: debug - lock access to the global hashmap list
2015-06-18hashmap: debug - lock access to the global hashmap listTom Gundersen
This may be used from multi-threaded programs (say through nss-resolve), so we must protect the global list. This is still only relevant for debug builds, so we do not try to handle cases where the locking fail, but simply assert.
2015-06-18nspawn: suppress warning when /etc/resolv.conf is a valid symlinkLennart Poettering
In such a case let's suppress the warning (downgrade to LOG_DEBUG), under the assumption that the user has no config file to update in its place, but a symlink that points to something like resolved's automatically managed resolve.conf file. While we are at it, also stop complaining if we cannot write /etc/resolv.conf due to a read-only disk, given that there's little we could do about it.
2015-06-18Merge pull request #288 from phomes/cgroup-utilLennart Poettering
cgroup-util: actually use the path callback
2015-06-18Merge pull request #286 from jsynacek/fix-edit-v3Lennart Poettering
systemctl: fix edit when EDITOR contains arguments
2015-06-18Merge pull request #289 from michich/hashmap-small-cleanupLennart Poettering
a tiny hashmap cleanup
2015-06-18cgroup-util: actually use the path callbackThomas Hindoe Paaboel Andersen
We allow to specify a callback but then ignore the result. Looks like a trivial typo. From 7b3fd6313c4b07b6f822a9f979d0c22350a401d9#diff-f010fa21ba7b659b519c122743e55604
2015-06-18systemctl: fix edit when EDITOR contains argumentsJan Synacek
Correctly support cases when the EDITOR environment variable and friends also contain arguments. For example, to run emacs in terminal only, one can say: EDITOR="emacs -nw" systemctl edit myservice
2015-06-18Merge pull request #247 from shaded-enmity/origin/pullfixLennart Poettering
import/pull: fix for the name/reference overwrite
2015-06-18import/pull: fix pulling by image digestPavel Odvody
When pulling by image digest the identifiers that were produced by parsing image digest were later overwritten by code parsing image tag. This resulted in invalid identifiers being used when contacting the remote endpoint, resulting in 404. Reported here: http://lists.freedesktop.org/archives/systemd-devel/2015-June/033039.html
2015-06-18test: disable test-barrier by defaultDavid Herrmann
The test-barrier binary uses real-time alarms and timeouts to test for races in the thread-barrier implementation. Hence, if your system is under high load and your scheduler decides to not run test-barrier for >BASE_TIME, then the tests are likely to fail. Two options: 1) Increase BASE_TIME. This will make the test take significantly longer for no real good. Furthermore, it is still not guaranteed that the task is scheduled. 2) Don't rely on real-time timers, but use explicit synchronization. This would basically test one barrier implementation with another.. kinda ironic.. but maybe something worth looking into. 3) Disable test-barrier by default. This patch chooses option 3) and makes sure test-barrier only runs if you pass any argument. Side note: test-barrier is written in a way that if it fails under load, but does not on idle systems, then it is very _unlikely_ that the barrier implementation is the culprit. Hence, it makes little sense to run it under load, anyway. It will not improve the test coverage of barrier.c, but rather the coverage of the test itself.
2015-06-18exit-status: add missing include for SIG* definesMichael Olbrich
Otherwise building fails with glibc 2.16. It works with glibc >= 2.17 because it is implicitly included via macro.h -> sys/param.h -> signal.h
2015-06-18Merge pull request #272 from poettering/nspawn-flush-copy-fdDaniel Mack
nspawn: when exiting, flush all remaining bytes from the pty to stdout
2015-06-18Merge pull request #276 from poettering/dbus-search-pathKay Sievers
bus-proxy: add new dbus policy search paths from /usr
2015-06-18Merge pull request #277 from poettering/journal-interleaving-monotonicLennart Poettering
journal: make sure the clock increases strict monotonic
2015-06-17Merge pull request #270 from phomes/masterTom Gundersen
udevd: remove dead code
2015-06-17journal: make sure the clock increases strict monotonicLennart Poettering
Let's work around crappy clocks in test-journal-interleaving.c too. This does the same as 98d2a5341788b49e82d628dfdc2e241af6d70dcd but for test-journal-interlaving.c rather than test-journal-stream.c.
2015-06-17Merge pull request #275 from poettering/acl-fixesMartin Pitt
acl-util: various smaller fixes to parse_acl()
2015-06-17Merge pull request #271 from poettering/test-journal-stream-crappy-clockLennart Poettering
journal: ensure test-journal-stream doesn't get confused by crappy cl…
2015-06-17bus-proxy: add new dbus policy search paths from /usrLennart Poettering
D-Bus upstream is working on extending the configuration/policy search path, follow this. See #274 for details.
2015-06-17acl-util: various smaller fixes to parse_acl()Lennart Poettering
- Make string parameter const - Don't log some OOM errors, but not others - Don't eat up errors generated by acl_from_text() - Make sure check for success of every single strv_push() call
2015-06-17libudev: device - fix typo in udev_device_get_sysattr_list_entry()Tom Gundersen
We were adding the attributes to the wrong list.
2015-06-17nspawn: when exiting, flush all remaining bytes from the pty to stdoutLennart Poettering
This is a simpler fix for #210, it simply uses copy_bytes() for the copying.
2015-06-17Merge pull request #44 from filbranden/unquote_first_word1Lennart Poettering
Replace FOREACH_WORD_QUOTED with a loop using unquote_first_word in config_parse_exec()
2015-06-17journal: ensure test-journal-stream doesn't get confused by crappy clocksLennart Poettering
This ensures that we write strictly monotonic timestamps into the journal files, to ensure that we can properly interleave everything correctly. See #175 for details.
2015-06-17udved: remove dead codeThomas Hindoe Paaboel Andersen
Leftover from 6af5e6a4c918a68b196a04346732e094e5373a36
2015-06-17logs-show: print a debug message when we skip entries without MESSAGE= fieldsLennart Poettering
2015-06-17load-fragment: reset the list on an ExecStart= containing only whitespaceFilipe Brandenburger
This is consistent with how an empty string works in an ExecStart= statement. We should not differentiate between an empty string and whitespace only (since they look the same.) Update the test case with whitespace only to reflect that the list is reset. Tested that `test-unit-file` passes and other test cases are not affected. Installed the patched systemd binaries on a machine, booted it, looked for out of the usual behavior but did not find any.