summaryrefslogtreecommitdiff
path: root/src/shared
Commit message (Collapse)AuthorAge
* Classify processes from sessions into cgroupsSven Eden2017-03-14
| | | | | | | Create a private cgroup tree associated with no controllers, and use it to map PIDs to sessions. Since we use our own path structure, remove internal cgroup-related helpers that interpret the cgroup path structure to pull out users, slices, and scopes.
* Remove obsolete headers and the src/core directory.Sven Eden2017-03-14
|
* Remove librt dependency.Sven Eden2017-03-14
| | | | | | | | The only function still using librt was src/shared/clean-ipc.c::clean_posix_mq(). But that function is not really needed, because elogind does not call mq_open() anywhere, or any other mqueue related functions.
* Remove unused and invalid udev definitionsSven Eden2017-03-14
| | | | | | | | | These definitions were not valid when compiling against eudev. As a nice consequence, our own copies of any udev includes are no longer needed and could be removed for good. Add label.h include to logind.c, as "udev.h" is no longer available which would have done so otherwise.
* Remove SysV compatSven Eden2017-03-14
|
* Prep v226: Mask all unneeded functionsSven Eden2017-03-14
|
* Prep v226: Fix some function prototypes in bus-util.hSven Eden2017-03-14
|
* Prep v226: Apply missing fixes and changes to src/sharedSven Eden2017-03-14
|
* pager: set $LESSCHARSET when we output UTF8 charsLennart Poettering2017-03-14
| | | | | | | | | This way we can be sure that less has the same idea of the terminal as we do. This solves issues in systems that have locale uninitalized, where systemd would output UTF-8 but less wouldn't allow it and show them as control characters.
* pager: also redirect stderrLennart Poettering2017-03-14
| | | | | | It's really confusing if stdout goes to the pager, but stderr is written directly to the screen. Hence, make sure both stdout and stderr are passed to the pager when doing autopaging.
* cgroup-show: unescape cgroups on presentationLennart Poettering2017-03-14
| | | | | Let's unescape cgroups on presentation, so that we show literal unit names.
* pager: port fallback pager to use copy_bytes()Lennart Poettering2017-03-14
|
* Prep v225: Added needed udev support and re-enabled some masked cgroup ↵Sven Eden2017-03-14
| | | | functions.
* Prep v225: Applying various fixes and changes to src/shared that got lost ↵Sven Eden2017-03-14
| | | | during git am transfer.
* Prep v225: Remove some orphaned filesSven Eden2017-03-14
|
* bus-util: make more properties settable in --property=Lennart Poettering2017-03-14
| | | | | Add a couple of new properties to the supported set we can pass in systemd-run's and systemd-nspawn's --property= switch.
* Prep v224: Major cleanup of unneeded functions and some source files.Sven Eden2017-03-14
|
* Prep v222: Update build system:Sven Eden2017-03-14
| | | | | | | | - The content of the man pages directory has been overhauled - Makefile-man.am was regenerated - Makefile.am and configure.ac needed a few addtitions and fixes - Some masked functions had to be unmasked - Now superfluous files have been removed
* Prep v221: Update and clean up build system to sync with upstreamSven Eden2017-03-14
| | | | | | | | | | | | | | This commit replays the moving around of source files that have been done between systemd-219 and systemd-221. Further the Makefile.am is synchronized with the upstream version and then "re-cleaned". A lot of functions, that are not used anywhere in elogind have been coated into #if 0/#endif directives to further shorten the list of dependencies. All unneeded files have been removed.
* Prep v220: Remove all source files, taht are not needed to build elogind.Sven Eden2017-03-14
| | | | | | | | | | Prep v220: Remove not needed headers, round 1 Prep v220: Remove not needed headers, round 2 Prep v220: Remove not needed headers, round 3 Prep v220: Remove empty source directories Prep v220: Remove non-empty source directories, that aren't needed by elogind Prep v220: Remove all root directories that aren't referenced by the elogind build chain. Prep v220: remove superfluous src/import directory and systemd configurations and policies.
* Prep v220: Use new cgroups functionsSven Eden2017-03-14
| | | | | Prep v220: Update logind and loginctl to upstream version. Prep v220: src/shared/rm-rf.c does not need to be able to handle btrfs subvolumes for elogind.
* Classify processes from sessions into cgroupsAndy Wingo2017-03-14
| | | | | | | Create a private cgroup tree associated with no controllers, and use it to map PIDs to sessions. Since we use our own path structure, remove internal cgroup-related helpers that interpret the cgroup path structure to pull out users, slices, and scopes.
* socket-util: library calls shouldn't log on their ownLennart Poettering2017-03-14
| | | | Instead, make sure that all callers log properly.
* networkd: vxlan add support for GBPSusant Sahani2017-03-14
| | | | | | | This patch add support for vxlan VXLAN Group Policy Option. https://tools.ietf.org/html/draft-smith-vxlan-group-policy-00 http://lwn.net/Articles/628683/
* treewide: fix typosTorstein Husebø2017-03-14
|
* resolved: rr - ignore pseudo types in NSEC(3) bitmapsTom Gundersen2017-03-14
|
* shared: dns-name - introduce dns_label_unescape_suffix()Tom Gundersen2017-03-14
| | | | | | | | | | Intended to be called repeatedly, and returns then successive unescaped labels from the most to the least significant (left to right). This is slightly inefficient as it scans the string three times (two would be sufficient): once to find the end of the string, once to find the beginning of each label and lastly once to do the actual unescaping. The latter two could be done in one go, but that seemed unnecessarily convoluted.
* shared: dns-name - use the canonical dns name orderingTom Gundersen2017-03-14
| | | | | | The canonical DNS name ordering considers the rightmost label the most significant, we were considering it the least significant. This is important when implementing NSEC, which relies on the correct order.
* shared: dns-name - add dns_name_between()Tom Gundersen2017-03-14
| | | | | | | Given three DNS names this function indicates if the second argument lies strictly between the first and the third according to the canonical DNS name order. Note that the order is circular, so the last name is considered to be before the first.
* networkd: move config_parse_vxlan_group_addressSusant Sahani2017-03-14
| | | | | move config_parse_vxlan_group_address from networkd.h to networkd-netdev-vxlan.h
* bus-proxy: never pass on unmatched broadcastsDavid Herrmann2017-03-14
| | | | | | | | | | | | | | | The lovely libvirtd goes into crazy mode if it receives broadcasts that it didn't subscribe to. With bus-proxyd, this might happen in 2 cases: 1) The kernel passes us an unmatched signal due to a false-positive bloom-match. 2) We generate NameOwnerChanged/NameAcquired/NameLost locally even though the peer didn't subscribe to it. dbus-daemon is reliable in what signals it passes on. So make sure we follow that style. Never ever send a signal to a local peer if it doesn't match an installed filter of that peer.
* networkd: tap add support for vnet_hdrSusant Sahani2017-03-14
| | | | | | | This patch adds support to configure IFF_VNET_HDR flag for a tap device. It allows whether sending and receiving large pass larger (GSO) packets. This greatly increases the achievable throughput.
* nss-mymachines: map userns users of containers to real user namesLennart Poettering2017-03-14
| | | | | | | | | | | | | Given a container "foo", that maps user id $UID to container user, using user namespaces, this NSS module extenstion will now map the $UID to a name "vu-foo-$TUID" for the translated UID $UID. Similar, userns groups are mapped to "vg-foo-$TGID" for translated GIDs of $GID. This simple change should make userns users more discoverable. Also, given that many tools like "adduser" check NSS before allocating a UID, should lower the chance of UID range conflicts between tools.
* Remove repeated 'the'sZbigniew Jędrzejewski-Szmek2017-03-14
|
* tree-wide: fix write_string_file() user that should not create filesDaniel Mack2017-03-14
| | | | | | | The latest consolidation cleanup of write_string_file() revealed some users of that helper which should have used write_string_file_no_create() in the past but didn't. Basically, all existing users that write to files in /sys and /proc should not expect to write to a file which is not yet existant.
* fileio: consolidate write_string_file*()Daniel Mack2017-03-14
| | | | | | | Merge write_string_file(), write_string_file_no_create() and write_string_file_atomic() into write_string_file() and provide a flags mask that allows combinations of atomic writing, newline appending and automatic file creation. Change all users accordingly.
* fileio: add 'enforce_newline' argument to write_string_stream()Daniel Mack2017-03-14
| | | | | Add a flag to control whether write_string_stream() should always enforce a trailing newline character in the file.
* networkd: be more defensive when writing to ipv4/ipv6 forwarding settingsLennart Poettering2017-03-14
| | | | | | | | | | 1) never bother with setting the flag for loopback devices 2) if we fail to write the flag due to EROFS (which is likely to happen in containers where /proc/sys is read-only) or any other error, check if the flag already has the right value. If so, don't complain. Closes #469
* socket: Set SO_REUSEPORT before bind()Christos Trochalakis2017-03-14
| | | | | | | | bind() fails if it is called before setting SO_REUSEPORT and another process is already binded to the same addess. A new reuse_port option has been introduced to socket_address_listen() to set the option as part of socket initialization.
* install: make unit_file_get_list aware of UNIT_FILE_INDIRECTMichal Sekletar2017-03-14
| | | | | | | | | | | | | | | | | | Commit aedd401 introduced new unit file state, UNIT_FILE_INDIRECT. Unit file is said to have indirect state if it contains [Install] section which has only Also= directive. Thus, if enable of such unit file is requested then some other unit file gets enabled. Whether or not unit file is in indirect state can be determined by calling unit_file_can_install. Function unit_file_get_list populates list of unit files present in given lookup location. So far it did call unit_file_can_install in a way that would prevent finding out about unit files in indirect state. Such unit file would be incorrectly marked as static. Fixes following assertion in test-install, Assertion 'p->state == s' failed at src/test/test-install.c:59, function main(). Aborting. [1] 26868 abort (core dumped) ./test-install
* install: explicitly return 0 on successMichal Sekletar2017-03-14
| | | | | | | | | | | 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
* resolved: reference count the dns serversTom Gundersen2017-03-14
| | | | | We want to reference the servers from their active transactions, so make sure they stay around as long as the transaction does.
* install: fix bad memory accessLennart Poettering2017-03-14
|
* acl-util: various smaller fixes to parse_acl()Lennart Poettering2017-03-14
| | | | | | | | | | - 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
* logs-show: print a debug message when we skip entries without MESSAGE= fieldsLennart Poettering2017-03-14
|
* watchdog: Don't require WDIOC_SETOPTIONS/WDIOS_ENABLECARDJean Delvare2017-03-14
| | | | | | | | | | Not all watchdog drivers implement WDIOC_SETOPTIONS. Drivers which do not implement it have their device always enabled. So it's fine to report an error if WDIOS_DISABLECARD is passed and the ioctl is not implemented, however failing when WDIOS_ENABLECARD is passed and the ioctl is not implemented is not good: if the device was already enabled then WDIOS_ENABLECARD was a no-op and wasn't needed in the first place. So we can just ignore the error and continue.
* turn kdbus support into a runtime optionKay Sievers2017-03-14
| | | | | | | | | | | | | ./configure --enable/disable-kdbus can be used to set the default behavior regarding kdbus. If no kdbus kernel support is available, dbus-dameon will be used. With --enable-kdbus, the kernel command line option "kdbus=0" can be used to disable kdbus. With --disable-kdbus, the kernel command line option "kdbus=1" is required to enable kdbus support.
* sd-event: make errors on EPOLL_CTL_DEL pseudo-fatalDavid Herrmann2017-03-14
| | | | | | | | | If we call EPOLL_CTL_DEL, we *REALLY* expect the file-descriptor to be present in that given epoll-set. We actually track such state via our s->io.registered flag, so it better be true. Make sure if that's not true, we treat it similar to assert_return() (ie., print a loud warning).
* hashmap: allow NULL key in ordered_hashmap_next()Michal Schmidt2017-03-14
| | | | | | There is no reason to require key to be non-NULL. Change test_ordered_hashmap_next() to use trivial_hash_ops in order to test NULL key too.
* everywhere: port everything to sigprocmask_many() and friendsLennart Poettering2017-03-14
| | | | | | | | | | | This ports a lot of manual code over to sigprocmask_many() and friends. Also, we now consistly check for sigprocmask() failures with assert_se(), since the call cannot realistically fail unless there's a programming error. Also encloses a few sd_event_add_signal() calls with (void) when we ignore the return values for it knowingly.