summaryrefslogtreecommitdiff
path: root/src/shared
AgeCommit message (Collapse)Author
2013-11-28virt: split detect_vm into separate functionsZbigniew Jędrzejewski-Szmek
It didn't build on arm. Let's simplify it a bit by splitting x86 specific parts out, which should also make things easier when arm virtualization support is added.
2013-11-28bus: add new sd_bus_creds object to encapsulate process credentialsLennart Poettering
This way we can unify handling of credentials that are attached to messages, or can be queried for bus name owners or connection peers. This also adds the ability to extend incomplete credential information with data from /proc, Also, provide a convenience call that will automatically determine the most appropriate credential object for an incoming message, by using the the attached information if possible, the sending name information if available and otherwise the peer's credentials.
2013-11-28util: fix handling of trailing whitespace in split_quoted()Lennart Poettering
Inspired by a patch by Lukas Nykryn.
2013-11-27service: add the ability for units to join other unit's PrivateNetwork= and ↵Lennart Poettering
PrivateTmp= namespaces
2013-11-25conf-parser: fix memory realloc errorYin Kangkai
Otherwise there is some memory corruption and undefined behavior, e.g., in my case systemd-udev was always aborted at the _cleanup_freep_ around that code blocks.
2013-11-25shutdown: during final killing spree also send SIGHUP in addition to SIGTERM ↵Lennart Poettering
to deal with shells This makes shutdown a bit faster if debug-shell.service is enabled.
2013-11-25conf-parser: distinguish between multiple sections with the same nameTom Gundersen
Pass on the line on which a section was decleared to the parsers, so they can distinguish between multiple sections (if they chose to). Currently no parsers take advantage of this, but a follow-up patch will do that to distinguish [Address] Address=192.168.0.1/24 Label=one [Address] Address=192.168.0.2/24 Label=two from [Address] Address=192.168.0.1/24 Label=one Address=192.168.0.2/24 Label=two
2013-11-25swap: split state machine state ACTIVATING into twoLennart Poettering
We expect the event on /proc/swaps before we expect the SIGCHILD, reflect this in the state machine.
2013-11-25udev: net_setup_link - don't use Description as AliasTom Gundersen
Use Description only internally, and allow Alias to be set as a separate option. For instance SNMP uses ifalias for a specific purpose, so let's not write to it by default.
2013-11-22systemctl: indicate in list-dependencies whether a unit is already runningLennart Poettering
2013-11-22build-sys: move more files from core/ to share/ that are generic enoughLennart Poettering
2013-11-22macro: fix problem with __LINE__ macro expansionLukasz Skalski
David: I already applied a fix for that, but this patch definitely looks nicer. I changed CONCATENATE_HELPER() -> XCONCATENATE() similar to XSTRINGIFY and added the UNIQUE() helper.
2013-11-22macro: fix assert_cc() fallbackDavid Herrmann
We need two-level macro-expansion, otherwise __LINE__ will not get evaluated.
2013-11-22bus: rework sd_bus_error APIsLennart Poettering
All calls that set a sd_bus_error structure will now return the same error converted to a negative errno. This may be used as syntactic sugar to return from a function and setting a bus_error structure in one go. Also, translate all Linux Exyz (EIO, EINVAL, EUCLEAN, EPIPE, ...) automatically into counterparts in the (new) "Posix.Error." namespace. If we fail to allocate memory for the components of a sd_bus_error automatically reset it to an OOM error which we always can write.
2013-11-21bus: add API calls to escape string components of objects pathsLennart Poettering
2013-11-20core: convert PID 1 to libsystemd-busLennart Poettering
This patch converts PID 1 to libsystemd-bus and thus drops the dependency on libdbus. The only remaining code using libdbus is a test case that validates our bus marshalling against libdbus' marshalling, and this dependency can be turned off. This patch also adds a couple of things to libsystem-bus, that are necessary to make the port work: - Synthesizing of "Disconnected" messages when bus connections are severed. - Support for attaching multiple vtables for the same interface on the same path. This patch also fixes the SetDefaultTarget() and GetDefaultTarget() bus calls which used an inappropriate signature. As a side effect we will now generate PropertiesChanged messages which carry property contents, rather than just invalidation information.
2013-11-20hashmap: be a bit more conservative with pre-allocating hash tables and itemsLennart Poettering
2013-11-20install: when determining where default.target points to, accept a file ↵Lennart Poettering
instead of a symlink, too
2013-11-20calendar: support 'yearly' and 'annually' names the same way as cronLennart Poettering
2013-11-20hwclock: modernizationsLennart Poettering
2013-11-20macro: add _unlikely_() to assert_return()Lennart Poettering
As the name indicates assert_return() is really just for assertions, i.e. where it's a programming error if the assertion does not hold. Hence it is safe to add _unlikely_() decorators for the expression to check.
2013-11-20macro: change assert_cc() so that it can appear outside of functionsLennart Poettering
2013-11-20install: use const where we canLennart Poettering
2013-11-20conf-parser: don't leak section namesTom Gundersen
If we encounter an unknown section, we must free the previous section before clearing the pointer.
2013-11-18localed: match converted keymaps before legacyZbigniew Jędrzejewski-Szmek
Before, X11 keymap fr-pc105-oss would be converted to fr, even though fr-oss exists. Now, if /usr/lib/kbd/keymaps/xkb/<layout>[-<variant>].map[.gz] exists, <layout>[-<variant>] will be used as the console keymap, falling back to the legacy mappings otherwise. % sudo localectl set-x11-keymap pl pc105 % localectl System Locale: LANG=en_US.UTF-8 VC Keymap: pl (was pl2 before) X11 Layout: pl X11 Model: pc105 % sudo localectl set-x11-keymap fr pc105 oss % localectl System Locale: LANG=en_US.UTF-8 VC Keymap: fr-oss (was fr before) X11 Layout: fr X11 Model: pc105 X11 Variant: oss % sudo localectl set-x11-keymap fr pc105 % localectl System Locale: LANG=en_US.UTF-8 VC Keymap: fr X11 Layout: fr X11 Model: pc105 % sudo localectl set-x11-keymap gb % localectl System Locale: LANG=en_US.UTF-8 VC Keymap: gb (was uk before) X11 Layout: gb
2013-11-18Remove duplicate includesKarel Zak
2013-11-18use #pragma once instead of foo*foo define guardsShawn Landden
2013-11-13Resolve /dev/console to the active tty instead of just "tty0"Olivier Brunel
When resolving /dev/console one would often get "tty0" meaning the active VT. Resolving to the actual tty (e.g. "tty1") will notably help on boot when determining whether or not PID1 can output to the console.
2013-11-11timer: consider (usec_t) -1 an invalid timestampLennart Poettering
2013-11-11timer: properly format relative timestamps in the futureLennart Poettering
2013-11-09net-util: add inet address/family parsingTom Gundersen
2013-11-08shutdown: unify handling of reboot() syscall a bitLennart Poettering
2013-11-08Remove dead code and unexport some callsLennart Poettering
"make check-api-unused" informs us about code that is not used anymore or that is exported but only used internally. Fix these all over the place.
2013-11-08manager: configurable StartLimit default valuesLukas Nykryn
https://bugzilla.redhat.com/show_bug.cgi?id=821723
2013-11-08install: don't override caller's parameterLennart Poettering
2013-11-07polkit: don't spawn local client if we access a remote systemLennart Poettering
2013-11-07util: add circle to special chars we can drawLennart Poettering
2013-11-07Make hibernation test work for swap filesJan Janssen
Suspend to disk works for swap files too (even if it is located on an ecrypted file system): https://www.kernel.org/doc/Documentation/power/swsusp-and-swap-files.txt
2013-11-07Support additional argument in rebootWaLyong Cho
reboot syscall can be performed with an additional argument. In some systems this functionality can be useful to modify the mode of the next boot performed by the bootloader.
2013-11-07acpi-fpdt: break on zero or negative length readPavel Holica
https://bugzilla.redhat.com/show_bug.cgi?id=1027478
2013-11-07utf8: export utf8 validation functions as part of sd-busLennart Poettering
To write useful bus code clients need to validate utf8 frequently since the bus reacts allergic to it. Since glibc does not provide any calls for this, let's provide it as part of libsystemd-bus.
2013-11-07utf8: ascii_filter() is unused, let's remove itLennart Poettering
2013-11-07socket: rework things to have only one sockaddr formatterLennart Poettering
2013-11-06mkdir: modernize header ifdefsLennart Poettering
2013-11-06socket-proxyd: rework to support multiple sockets and splice()-based ↵Lennart Poettering
zero-copy network IO This also drops --ignore-env, which can't really work anymore if we allow multiple fds. Also adds support for pretty printing of peer identities for debug purposes, and abstract namespace UNIX sockets. Also ensures that we never take more connections than a certain limit.
2013-11-06active: rework make_socket_fd() to be based on socket_address_listen()Lennart Poettering
Among other things this makes sure we set SO_REUSEADDR which is immensely useful.
2013-11-06path-util: paths_check_timestamp() opimizationsLennart Poettering
2013-11-06util: unify reading of /proc/cmdlineLennart Poettering
Instead of individually checking for containers in each user do this once in a new call proc_cmdline() that read the file only if we are not in a container.
2013-11-05bus: delete some now used dbus1 codeLennart Poettering
2013-11-05net-util: don't use libudevTom Gundersen
Should fix linking with old toolchain.