summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | udev: event - simplify udev_event_spawn() logicTom Gundersen2015-06-293-36/+28
| | | | | | | | | | | | | | | | | | | | Push the extraction of the envp + argv as close as possible to their use, to avoid code duplication. As a sideeffect fix logging when delaing execution.
* | | | Merge pull request #398 from teg/netlink-container-reworkDavid Herrmann2015-06-302-101/+98
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | netlink container rework Allocate containers as separate structs instead of individual arrays for each member field.
| * | | | sd-netlink: message - remove unused next_rta_offset fieldTom Gundersen2015-06-281-1/+0
| | | | | | | | | | | | | | | | | | | | This was a left-over from before we supported containers.
| * | | | netlink: rework containersTom Gundersen2015-06-282-63/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of representing containers as several arrays, make a new netlink_container struct and keep one array of these structs. We also introduce netlink_attribute structs that in the future will hold meta-information about each atribute.
| * | | | sd-netlink: make a couple of helper functions staticTom Gundersen2015-06-282-65/+57
| | | | | | | | | | | | | | | | | | | | Also rename from rtnl_* to netlink_*.
| * | | | sd-netlink: mark union containers as nestedTom Gundersen2015-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | This was an oversight, they are no different from regular containers in this respect.
* | | | | udev: remove WAIT_FOR keyKay Sievers2015-06-301-54/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This facility was never a proper solution, but only papered over real bugs in the kernel. There are no known sysfs "timing bugs" since a long time.
* | | | | Merge pull request #430 from gmacario/fix-issue404-v2Tom Gundersen2015-06-301-22/+8
|\ \ \ \ \ | | | | | | | | | | | | bootchart: Ensure that /proc/schedstat is read entirely (v2)
| * | | | | bootchart: Ensure that /proc/schedstat is read entirelyGianpaolo Macario2015-06-301-22/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On multi-core systems file /proc/schedstat may be larger than 4096 bytes and pread() will only read part of it. Fix issue https://github.com/systemd/systemd/issues/404
* | | | | | Merge pull request #429 from ↵Tom Gundersen2015-06-301-4/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | richardmaw-codethink/nspawn-userns-uid-shift-autodetection-fix nspawn: determine_uid_shift before forking
| * | | | | | nspawn: determine_uid_shift before forkingRichard Maw2015-06-301-4/+4
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is needed in one branch of the fork, but calculated in another branch. Failing to do this means using --private-users without specifying a uid shift always fails because it tries to shift the uid to UID_INVALID.
* | | | | | Merge pull request #428 from richardmaw-codethink/nspawn-userns-remount-failTom Gundersen2015-06-301-11/+11
|\ \ \ \ \ \ | | | | | | | | | | | | | | nspawn: Don't remount with fewer options
| * | | | | | nspawn: Don't remount with fewer optionsRichard Maw2015-06-301-11/+11
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we do a MS_BIND mount, it inherits the flags of its parent mount. When we do a remount, it sets the flags to exactly what is specified. If we are in a user namespace then these mount points have their flags locked, so you can't reduce the protection. As a consequence, the default setup of mount_all doesn't work with user namespaces. However if we ensure we add the mount flags of the parent mount when remounting, then we aren't removing mount options, so we aren't trying to unlock an option that we aren't allowed to.
* | | | | | core: handle --log-target=null when calling systemd-shutdownIago López Galeiras2015-06-301-0/+4
| |/ / / / |/| | | | | | | | | | | | | | | | | | | When shutting down, if systemd was started with --log-target=null, systemd-shutdown was being called with --log-target=console.
* | | | | sysv-generator: escape names when translating from sysv nameFelipe Sateler2015-06-291-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While the LSB suggests only [A-Za-z0-9], that doesn't prevent admins from doing the wrong thing. Lets not generate invalid names in that case.
* | | | | sysv-generator: detect invalid provided unit namesFelipe Sateler2015-06-291-2/+8
| |_|/ / |/| | | | | | | | | | | Do not assume that a non-service unit type is a target.
* | | | Merge pull request #387 from kaysievers/wipTom Gundersen2015-06-292-304/+0
|\ \ \ \ | |_|_|/ |/| | | udev: Remove accelerometer helper
| * | | udev: Remove accelerometer helperBastien Nocera2015-06-272-304/+0
| | |/ | |/| | | | | | | It's moved to the iio-sensor-proxy D-Bus service.
* | | Merge pull request #402 from ↵Daniel Mack2015-06-291-1/+1
|\ \ \ | | | | | | | | | | | | | | | | systemd-mailing-devs/1435512180-3659-1-git-send-email-ebiggers3@gmail.com util: fix incorrect escape sequence in string_is_safe()
| * | | util: fix incorrect escape sequence in string_is_safe()Eric Biggers2015-06-281-1/+1
| |/ /
* | | bootchart: reset list_sample_data head before generating SVGGianpaolo Macario2015-06-281-2/+2
|/ / | | | | | | | | | | | | Until commit 1f2ecb0 ("bootchart: kill a bunch of global variables") variable "head" was declared global and this action was performed by svg_header. Now that "head" is local and passed to each function called by svg_do(...) move the code at the beginning of svg_do(...) to restore the correct behaviour.
* | logind: fix delayed execution regressionDaniel Mack2015-06-253-7/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit c0f32805 ("logind: use sd_event timer source for inhibitor logic") reworked the main loop logic of logind so that it uses a real timeout callback handler to execute delayed functions. What the old code did, however, was to call those functions on every iteration in the main loop, not only when the timeout expired. Restore that behavior by bringing back manager_dispatch_delayed(), and call it from manager_run(). The internal event source callback manager_inhibit_timeout_handler() was turned into a wrapper of manager_dispatch_delayed() now.
* | Merge pull request #367 from msekletar/install-unit-file-list-assertDaniel Mack2015-06-251-1/+1
|\ \ | | | | | | install: explicitly return 0 on success
| * | install: explicitly return 0 on successMichal Sekletar2015-06-251-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | Maybe there is some left-over value stored in r from previous function call. Let's make sure we always return consistent error code when we reach end of the function body. Fixes following crash of test-install, Assertion 'r == 0' failed at src/test/test-install.c:52, function main(). Aborting. [1] 11703 abort (core dumped) ./test-install
* | bootchart: Account CPU time spent in non-main threads of processes (v5)Gianpaolo Macario2015-06-251-0/+58
|/ | | | | | | Fix for issue https://github.com/systemd/systemd/issues/139 - Implement fixes suggested by @teg to -v2 - Implement fixes suggested by @zonque to -v3 and -v4
* Merge pull request #363 from zonque/proxyKay Sievers2015-06-251-1/+1
|\ | | | | bus-proxy: ignore 'log' attributes in XML policy
| * bus-proxy: ignore 'log' attributes in XML policyDaniel Mack2015-06-251-1/+1
| | | | | | | | | | 'log' is unsupported but nothing to warn about. Ignore it just like we ignore 'eavesdrop'.
* | Merge pull request #355 from dvdhrm/netlinkTom Gundersen2015-06-256-325/+377
|\ \ | |/ |/| sd-netlink cleanups
| * sd-netlink: don't export internal type-system detailsDavid Herrmann2015-06-244-26/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kernel bonding layer allows passing an array of ARP IP targets as bond-configuration. Due to the weird implementation of arrays in netlink (which we haven't figure out a generic way to support, yet), we usually hard-code the supported array-sizes. However, this should not be exported from sd-netlink. Instead, make sure the caller just uses it's current hack of enumerating the types, and the sd-netlink core will have it's own list of supported array-sizes (to be removed in future extensions, btw!). If either does not match, we will just return a normal error. Note that we provide 2 constants for ARP_IP_TARGETS_MAX now. However, both have very different reasons: - the constant in netdev-bond.c is used to warn the user that the given number of targets might not be supported by the kernel (even though the kernel might increase that number at _any_ time) - the constant in sd-netlink is solely used due to us missing a proper array implementation. Once that's supported in the type-system, it can be removed without notice Last but not least, this patch turns the log_error() into a log_warning(). Given that the previous condition was off-by-one, anyway, it never hit at the right time. Thus, it was probably of no real use.
| * sd-netlink: don't treat NULL as root type-systemDavid Herrmann2015-06-244-8/+7
| | | | | | | | | | | | | | | | | | | | Explicitly export the root type-system to the type-system callers. This avoids treating NULL as root, which for one really looks backwards (NULL is usually a leaf, not root), and secondly prevents us from properly debugging calling into non-nested types. Also rename the root to "type_system_root". Once we support more than rtnl, well will have to revisit that, anyway.
| * sd-netlink: don't treat type_system->count==0 as invalidDavid Herrmann2015-06-241-1/+1
| | | | | | | | | | | | | | Empty type-systems are just fine. Avoid the nasty hack in union-type-systems that treat empty type-systems as invalid. Instead check for the actual types-array and make sure it's non-NULL (which is even true for empty type-systems, due to "empty_types" array).
| * sd-netlink: make sure the root-level type is nestedDavid Herrmann2015-06-241-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In sd-netlink-message, we always guarantee that the currently selected type-system is non-NULL. Otherwise, we would be unable to parse any types in the current container level. Hence, this assertion must be true: message->container_type_system[m->n_containers] != NULL During message_new() we currently do not verify that this assertion is true. Instead, we blindly access nl_type->type_system and use it (which might be NULL for basic types and unions). Fix this, by explicitly checking that the root-level type is nested. Note that this is *not* a strict requirement of netlink, but it's a strict requirement for all message types we currently support. Furthermore, all the callers of message_new() already verify that only supported types are passed, therefore, this is a pure cosmetic check. However, it might be needed on the future, so make sure we don't trap into this once we change the type-system.
| * sd-netlink: drop NETLINK_TYPE_METADavid Herrmann2015-06-242-3/+11
| | | | | | | | | | | | | | | | | | The NETLINK_TYPE_META pseudo-type is actually equivalent to an empty nested type. Drop it and define an empty type-system instead. This also has the nice side-effect that m->container_type_system[0] is never NULL (which has really nasty side-effects if you try to read attributes).
| * sd-netlink: turn 'max' into 'count' to support empty type-systemsDavid Herrmann2015-06-243-38/+38
| | | | | | | | | | | | | | | | | | | | Right now we store the maximum type-ID of a type-system. This prevents us from creating empty type-systems. Store the "count" instead, which should be treated as max+1. Note that type_system_union_protocol_get_type_system() currently has a nasty hack to treat empty type-systems as invalid. This might need some modification later on as well.
| * sd-netlink: avoid casting size_t into intDavid Herrmann2015-06-241-25/+24
| | | | | | | | | | | | size_t is usually 64bit and int 32bit on a 64bit machine. This probably does not matter for netlink message sizes, but nevertheless, avoid hard-coding it anywhere.
| * sd-netlink: make NLTypeSystem internalDavid Herrmann2015-06-243-7/+14
| | | | | | | | | | | | | | | | | | | | Same as NLType, move NLTypeSystem into netlink-types.c and hide it from the outside. Provide an accessor function for the 'max' field that is used to allocate suitable array sizes. Note that this will probably be removed later on, anyway. Once we support bigger type-systems, it just seems impractical to allocate such big arrays for each container entry. An RBTree would probably do just fine.
| * sd-netlink: make NLType internalDavid Herrmann2015-06-244-26/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If we extend NLType to support arrays and further extended types, we really want to avoid hard-coding the type-layout outside of netlink-types.c. We already avoid accessing nl_type->type_system outside of netlink-types.c, extend this to also avoid accessing any other fields. Provide accessor functions for nl_type->type and nl_type->size and then move NLType away from the type-system header. With this in place, follow-up patches can safely turn "type_system" and "type_system_union" into a real "union { }", and then add another type for arrays.
| * sd-netlink: don't access type->type_system[_union] directlyDavid Herrmann2015-06-243-13/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * sd-netlink: rename NLA_ to NETLINK_TYPE_David Herrmann2015-06-243-215/+215
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #335 from aroig/gh/fix_check_unneededLennart Poettering2015-06-241-1/+1
|\ \ | |/ |/| core: fix reversed dependency check in unit_check_unneeded
| * core: fix reversed dependency check in unit_check_unneededAbdo Roig-Maranges2015-06-231-1/+1
| | | | | | | | | | This was introduced by commit be7d9ff730cb88d7c6a8 and breaks StopWhenUnneeded=true in the presence of a Requisite dependency.
* | Merge pull request #346 from poettering/install-bad-memoryDaniel Mack2015-06-241-1/+1
|\ \ | | | | | | install: fix minor bad memory access
| * | install: fix bad memory accessLennart Poettering2015-06-231-1/+1
| | |
* | | ata_id: unbotch format specifierJan Engelhardt2015-06-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge pull request #339 from teg/udev-coverityDaniel Mack2015-06-244-27/+89
|\ \ \ | | | | | | | | coverity fixes in udev
| * | | udevadm: trigger - check return valuesTom Gundersen2015-06-231-11/+51
| | | | | | | | | | | | | | | | Fixes CID#1296243.
| * | | udev: worker - check return value of udev_monitor_enable_receiving()Tom Gundersen2015-06-231-3/+4
| | | | | | | | | | | | | | | | Fixes CID#1297430.
| * | | udev: event - check return code of dup2()Tom Gundersen2015-06-231-10/+28
| | | | | | | | | | | | | | | | This fixes CID#1304688.
| * | | udev: bulitin-hwdb - fix memory leakTom Gundersen2015-06-231-3/+6
| | | | | | | | | | | | | | | | This fixes CID#1292782.
* | | | test: fix test-copy without /etc/os-release.Dimitri John Ledkov2015-06-231-1/+3
| | | |