summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2015-09-23sd-dhcp6-client: Prevent setting and restarting of DHCPv6 clientPatrik Flykt
Prevent modifications to index, MAC address, DUID and Information Request while the DHCPv6 client is running. Require the DHCPv6 client to be stopped first instead of always unconditionally restarting it if the caller calls sd_dhcp6_client_start() more than once. With this change, handling of for example incoming Router Advertisments becomes much easier.
2015-09-23exec: call setup_pam() after SMACK labelingSangjung Woo
When 'SmackProcessLabel=' is used in user@.service file, all processes launched in systemd user session should be labeled as the designated name of 'SmackProcessLabel' directive. However, if systemd has its own smack label using '--with-smack-run-label' configuration, '(sd-pam)' is labeled as the specific name of '--with-smack-run-label'. If 'SmackProcessLabel=' is used in user@.service file without '--with-smack-run-label' configuration, (sd-pam) is labeled as "_" since systemd (i.e. pid=1) is labeled as "_". This is mainly because setup_pam() function is called before applying smack label to child process. This patch fixes it by calling setup_pam() after setting the smack label.
2015-09-23Merge pull request #1339 from alkino/masterDaniel Mack
Hook more properties for transient units
2015-09-23Set accept_ra to "2" if enabled in configGeorg Müller
This causes the kernel to accept router advertisments even if ip forwarding is enabled for this interface. This fixes #1340.
2015-09-23Hook more properties for transient unitsNicolas Cornu
systemd-run can now launch units with WorkingDirectory, RootDirectory set.
2015-09-23core: make setup_pam() synchronousDavid Herrmann
If we spawn a unit with a non-empty 'PAMName=', we fork off a child-process _inside_ the unit, known as '(sd-pam)', which watches the session. It waits for the main-process to exit and then finishes it via pam_close_session(3). However, the '(sd-pam)' setup is highly asynchronous. There is no guarantee that process gets spawned before we finish the unit setup. Therefore, there might be a root-owned process inside of the cgroup of the unit, thus causing cg_migrate() to error-out with EPERM. This patch makes setup_pam() synchronous and waits for the '(sd-pam)' setup to finish before continuing. This guarantees that setresuid(2) was at least tried before we continue with the child setup of the real unit. Note that if setresuid(2) fails, we already warn loudly about it. You really must make sure that you own the passed user if using 'PAMName='. It seems very plausible to rely on that assumption.
2015-09-23Merge pull request #1346 from dvdhrm/user-shutdownLennart Poettering
core: fix shutdown of --user
2015-09-23busctl: also monitor messages to SERVICE argumentsLars Uebernickel
Add a 'destination' match rule for every SERVICE argument in addition to the 'sender' rule. This is consistent with busctl(1), which documents monitor as dumping "messages to or from this peer".
2015-09-22core: fix shutdown of --userDavid Herrmann
Shutting down a user session currently fails with: Sep 22 22:35:38 david-t2 systemd[640]: Reached target Shutdown. Sep 22 22:35:38 david-t2 systemd[640]: Starting Exit the Session... Sep 22 22:35:38 david-t2 systemd[640]: Received SIGRTMIN+24 from PID 659 (kill). Sep 22 22:35:38 david-t2 systemd[640]: Shutting down. Sep 22 22:35:38 david-t2 systemd[640]: Not executed by init (PID 1). Sep 22 22:35:38 david-t2 systemd[640]: Critical error while doing system shutdown: Operation not permitted This is a regression from: commit 287419c119ef961db487a281162ab037eba70c61 Author: Alban Crequy <alban.crequy@gmail.com> Date: Fri Sep 18 13:37:34 2015 +0200 containers: systemd exits with non-zero code Make sure we never ever execute systemd-shutdown from within a user-manager. Restore the previous behavior by partially reverting given commit.
2015-09-22Merge pull request #1338 from kaysievers/pamLennart Poettering
pam: systemd-user - call selinux module
2015-09-22udev: ata_id - ATA_ID_SATA_CAPABILITY == 76Kay Sievers
2015-09-22pam: systemd-user - call selinux moduleKay Sievers
https://bugzilla.redhat.com/show_bug.cgi?id=1262933
2015-09-22Merge pull request #1334 from poettering/sd-bus-default-flush-closeDavid Herrmann
sd-bus: introduce new sd_bus_default_flush_close() call
2015-09-22Merge pull request #1324 from pugs/masterKay Sievers
Fixup WWN bytes for big-endian systems
2015-09-22Merge pull request #1335 from poettering/some-fixesDaniel Mack
A variety of mostly unrelated fixes
2015-09-22Merge pull request #1336 from pszewczyk/functionfs_sockets_v3Lennart Poettering
core: add support for usb functionfs v3
2015-09-22importd: make sure we don't accidentally close fd 0Lennart Poettering
Fixes #1330
2015-09-22core: Add FFSDescriptors and FFSStrings service parametersPawel Szewczyk
By using these parameters functionfs service can specify ffs descriptors and strings which should be written to ep0.
2015-09-22core: Add socket type for usb functionfs endpointsPawel Szewczyk
For handling functionfs endpoints additional socket type is added.
2015-09-22notify: sort header files, follow CODING_STYLELennart Poettering
2015-09-22util: drop UID_IS_INVALID() in favour of uid_is_valid()Lennart Poettering
No need to keep both functions, settle on uid_is_valid() for everything.
2015-09-22util.h: order includes, as suggested by CODING_STYLELennart Poettering
Of course, because Linux is broken we cannot actually really order it, and must keep linux/fs.h after sys/mount.h... Yay for Linux!
2015-09-22util: clean-ups to enum parsersLennart Poettering
Never log when we fail due to OOM when translating enums, let the caller do that. Translating basic types like enums should be something where the caller logs, not the translatior functions. Return -1 when NULL is passed to all enum parser functions. The non-fallback versions of the enum translator calls already handle NULL as failure, instead of hitting an assert, and we should do this here, too.
2015-09-22cgtop: make sure help text doesn't cause main contents to moveLennart Poettering
Let's always keep space for the full help text. (We used to do that, but recently another line of help was added which broke this.)
2015-09-22util: minor cleanups for loop_read() and friendsLennart Poettering
When 0 bytes are to be written, make sure to go into read() at least once, in order to validate the parameters, such as the passed fd. Return error on huge values, add a couple of asserts and casts where appropriate.
2015-09-22cgtop: underline table headerLennart Poettering
Let's underline the header line of the table shown by cgtop, how it is customary for tables. In order to do this, let's introduce new ANSI underline macros, and clean up the existing ones as side effect.
2015-09-22sd-id128: make size constraints a bit more obviousLennart Poettering
2015-09-22util: add safe_closedir() similar to safe_fclose()Lennart Poettering
2015-09-22copy: make copy_bytes() return whether we hit EOF or notLennart Poettering
2015-09-22copy: be more careful when trying to reflinkLennart Poettering
2015-09-22sd-bus: introduce new sd_bus_default_flush_close() callLennart Poettering
If code enqueues a message on one of the default busses, but doesn't sync on it, and immediately drops the reference to the bus again, it will stay queued and consume memory. Intrdouce a new call sd_bus_default_flush_close() that can be invoked at the end of programs (or threads) and flushes out all unsent messages on any of the default busses.
2015-09-22login: support more than just power-gpio-keydoubleodoug
Adding additional keys prevents this gpio-keys powerswitch from working, e.g. this wouldn't poweroff: button@23 { label = "power-switch"; linux,code = <116>; gpios = <&gpio 23 1>; }; button@25 { label = "KEY_A"; linux,code = <30>; gpios = <&gpio 25 1>; }; Changing ATTRS{keys}=="116" to ATTRS{keys}=="*116*" makes the power-switch and the A key both work properly. (David: rephrase and merge-commits)
2015-09-22Merge pull request #1333 from dvdhrm/sd-network-cleanupLennart Poettering
sd-network: random API cleanups
2015-09-22sd-lldp: hide internal detailsDavid Herrmann
Currently, sd-lldp.h exports "UPDATE_INFO".. and defines it to a magic constant '10'. This is completely bogus, so fix it to follow our coding standards: - Prefix exported symbols by SD_LLDP_* - Define a separate event-enum for event types - Translate internal state to external event-types
2015-09-22sd-lldp: hide internal informationDavid Herrmann
Don't export constant that are only used internally.
2015-09-22sd-pppoe: fix namespacingDavid Herrmann
Prefix all exported constants by SD_PPPOE_* to avoid namespacing conflicts.
2015-09-22sd-ipv4ll: fix namespacingDavid Herrmann
Prefix all exported constants with SD_IPV4LL_* to avoid namespacing conflicts.
2015-09-22sd-ipv4acd: fix namespacingDavid Herrmann
Prefix all exported constants with SD_IPV4ACD to prevent namespacing conflicts.
2015-09-22sd-icmp6-nd: fix namespacingDavid Herrmann
Prefix all exported constants by SD_ICMP6_ND_* to avoid any namespacing conflicts.
2015-09-22sd-dhcp6: fix namespacingDavid Herrmann
Prefix all exported constants with SD_DHCP6_CLIENT_* to avoid any namespacing conflicts.
2015-09-22sd-dhcp: fix namespacingDavid Herrmann
Prefix all constants with SD_DHCP_CLIENT_* to avoid namespacing conflicts.
2015-09-22sd-dhcp6: ensure canceling lease timers and refactor setting leaseThomas Haller
Factor our common code to set/clear the client lease. Resetting the lease involves canceling old timers. Also, most importantly, when resetting the lease in client_receive_advertise(), ensure to cancel the timers too. It is not immediately clear, why at that point no timers would be pending. The lease-unref from sd_dhcp6_client_unref() can be omited, because of the preceeding client_reset() call.
2015-09-22Merge pull request #986 from karelzak/monitorLennart Poettering
mount: use libmount to monitor mountinfo & utab
2015-09-22nspawn, machined: fix comments and error messagesKrzesimir Nowak
A bunch of "Client -> Child" fixes and one barrier-enumerator fix. (David: rebased on master)
2015-09-22nspawn: close unneeded sockets in outer childKrzesimir Nowak
(David: Note, this is just a cleanup and doesn't fix any bugs)
2015-09-22util: introduce {send,receive}_one_fd()David Herrmann
Introduce two new helpers that send/receive a single fd via a unix transport. Also make nspawn use them instead of hard-coding it. Based on a patch by Krzesimir Nowak.
2015-09-22core: Add list of additional file descriptors to socket portPawel Szewczyk
Some additional files related to single socket may appear in the filesystem and they should be opened and passed to related service. This commit adds optional list of file descriptors, which are dynamically discovered and opened.
2015-09-22Merge pull request #1323 from dvdhrm/mount-propagateLennart Poettering
mount: propagate error codes correctly
2015-09-21Fixup WWN bytes for big-endian systemsTom Lyon
2015-09-21Merge pull request #1317 from ronnychevalier/rc/ipv4ll_seedDaniel Mack
sd-ipv4ll: do not assert_return when seed == 0