summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2015-07-09basic/util.c fopen_temporary(): close fd if failedcee1
2015-07-09Merge pull request #529 from dvdhrm/bus-slot-descriptionLennart Poettering
sd-bus: sd_bus_slot_get_description() should return const strings
2015-07-09sd-bus: sd_bus_slot_get_description() should return const stringsDavid Herrmann
All other *_get_description() functions use 'const char**', so make sure sd_bus_slot_get_description() does the same. This changes API, but ABI stays stable. I think this is fine, but I wouldn't mind bumping SONAME. Reported in #528.
2015-07-09Reload manager defaults at daemon-reloadThomas Blume
"systemctl daemon-reload" should also update the manager defaults from /etc/systemd/system.conf. For details, see: http://lists.freedesktop.org/archives/systemd-devel/2015-June/033062.html Amended to use manager_set_defaults() as common function.
2015-07-08machine: remove unused variablesThomas Hindoe Paaboel Andersen
2015-07-08Merge pull request #516 from utezduyar/consistent-get-callback-returnLennart Poettering
property callback returns are consistent
2015-07-08Merge pull request #500 from zonque/fileioLennart Poettering
fileio: consolidate write_string_file*()
2015-07-08Merge pull request #514 from teg/resolved-rrsig-marshalLennart Poettering
resolved: fix marshalling of RRSIG records
2015-07-08Merge pull request #510 from zonque/journal-gatewaydTom Gundersen
journal-gatewayd: fix tmpfile logic
2015-07-08Merge pull request #501 from keszybz/remove-python-systemdDaniel Mack
Remove python-systemd
2015-07-08property callback returns are consistentUmut Tezduyar Lindskog
It is no different to return 0 over 1 in the property callback. It is confusing to return 1 which made me think 1 has a special purpose. This way code is consistent with the rest of the tree.
2015-07-08resolved: fix marshalling of RRSIG recordsTom Gundersen
The key tag is 16, not 8 bits.
2015-07-07journal-gatewayd: fix tmpfile logicDaniel Mack
"rw" is not a valid mode string for f*open(). This got broken in cc02a7b33049 ("journal-gatewayd: factor out opening of temp file").
2015-07-07logind: fail on CreateSession if already in sessionDavid Herrmann
Right now, if you're already in a session and call CreateSession, we return information about the current session of yours. This is highy confusing and a nasty hack. Avoid that, and instead return a commonly known error, so the caller can detect that. This has the side-effect, that we no longer override XDG_VTNR and XDG_SEAT in pam_systemd, if you're already in a session. But this sounds like the right thing to do, anyway.
2015-07-07logind: allow sessions to share a VT if it's a greeterDavid Herrmann
Old gdm and lightdm start the user-session during login before they destroy the greeter-session. Therefore, the user-session will take over the VT from the greeter. We recently prevented this by never allowing multiple sessions on the same VT. Fix this now, by explicitly allowing this if the owning session is a GREETER. Note that gdm no longer behaves like this. Instead, due to wayland, they always use a different VT for each session. All other login-managers are highly encouraged to destroy the greeter-session _before_ starting the user-session. We now work around this, but this will probably not last forever (and will already have nasty side-effects on the greeter-session).
2015-07-07Remove repeated 'the'sZbigniew Jędrzejewski-Szmek
2015-07-06Merge pull request #502 from keszybz/login-small-cleanupDaniel Mack
Login small cleanup
2015-07-06Remove python-systemdZbigniew Jędrzejewski-Szmek
python-system has moved to it's own repository: https://github.com/systemd/python-systemd
2015-07-06treewide: fix typos of let'sZbigniew Jędrzejewski-Szmek
2015-07-06login: use normal comparison to zero for integersZbigniew Jędrzejewski-Szmek
! is supposed to be used for booleans and pointers.
2015-07-06tree-wide: fix write_string_file() user that should not create filesDaniel Mack
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.
2015-07-06fileio: consolidate write_string_file*()Daniel Mack
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.
2015-07-06fileio: add 'enforce_newline' argument to write_string_stream()Daniel Mack
Add a flag to control whether write_string_stream() should always enforce a trailing newline character in the file.
2015-07-06get_process_environ: exit early when there is nothing to readKay Sievers
2015-07-06Merge pull request #492 from ↵Lennart Poettering
richardmaw-codethink/nspawn-automatic-uid-shift-fix-v2 nspawn: Communicate determined UID shift to parent version 2
2015-07-06networkd: various fixes for the IPv6 privacy extensions supportLennart Poettering
- Make sure that the IPv6PrivacyExtensions=yes results in prefer-temporary, not prefer-public. - Introduce special enum value "kernel" to leave setting unset, similar how we have it for the IP forwarding settings. - Bring the enum values in sync with the the strings we parse for them, to the level this makes sense (specifically, rename "disabled" to "no", and "prefer-temporary" to "yes"). - Make sure we really set the value to to "no" by default, the way it is already documented in the man page. - Fix whitespace error. - Make sure link_ipv6_privacy_extensions() actually returns the correct enum type, rather than implicitly casting it to "bool". - properly size formatting buffer for ipv6 sysctl value - Don't complain if /proc/sys isn't writable - Document that the enum follows the kernel's own values (0 = off, 1 = prefer-public, 2 = prefer-temporary) - Drop redundant negating of error code passed to log_syntax() - Manpage fixes This fixes a number of issues from PR #417
2015-07-06Merge pull request #495 from poettering/forwarding-fixDaniel Mack
networkd: be more defensive when writing to ipv4/ipv6 forwarding sett…
2015-07-06bus-proxyd: fix log message and explain dbus-1 compat matchesKay Sievers
2015-07-06bus-proxyd: subscribe to unicast signals directed to the proxy connectionKay Sievers
2015-07-06sd-bus: support matching on destination namesDavid Herrmann
Right now, we never install destination matches on kdbus as the kernel did not support MATCH rules on those. With the introduction of KDBUS_ITEM_DST_ID we can now match on destination IDs, so add explicit support for those. This requires a recent kdbus module to work. However, there seems to be no user-space that uses "Destination=''" matches, yet, so old kdbus modules still work fine (we couldn't find any real user). This is needed to match on unicast signals in bus-proxy. A followup will add support for this.
2015-07-06nspawn: Communicate determined UID shift to parentRichard Maw
There is logic to determine the UID shift from the file-system, rather than having it be explicitly passed in. However, this needs to happen in the child process that sets up the mounts, as what's important is the UID of the mounted root, rather than the mount-point. Setting up the UID map needs to happen in the parent becuase the inner child needs to have been started, and the outer child is no longer able to access the uid_map file, since it lost access to it when setting up the mounts for the inner child. So we need to communicate the uid shift back out, along with the PID of the inner child process. Failing to communicate this means that the invalid UID shift, which is the value used to specify "this needs to be determined from the file system" is left invalid, so setting up the user namespace's UID shift fails.
2015-07-06networkd: be more defensive when writing to ipv4/ipv6 forwarding settingsLennart Poettering
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
2015-07-06treewide: fix typosTorstein Husebø
2015-07-06nspawn: fix indentingLennart Poettering
2015-07-06Merge pull request #443 from ssahani/lldpTom Gundersen
lldp: set correct state for processing
2015-07-05Merge pull request #417 from ssahani/ipv6-privateDaniel Mack
Ipv6 private extensions
2015-07-05login: simplify assignmentZbigniew Jędrzejewski-Szmek
2015-07-05core: fix missing bus-util.h includeDavid Herrmann
Whoopsy, forgot to 'git add' this, sorry.
2015-07-05core: don't mount kdbusfs if not wantedDavid Herrmann
Just like we conditionalize loading kdbus.ko, we should conditionalize mounting kdbusfs. Otherwise, we might run with kdbus if it is builtin, even though the user didn't want this.
2015-07-05networkd: Add support for ipv6 privacy extensionSusant Sahani
This patch add support for ipv6 privacy extensions. The variable /proc/sys/net/ipv6/conf/<if>/use_tempaddr can be changed via the boolean IPv6PrivacyExtensions=[yes/no/prefer-temporary] When true enables privacy extensions, but prefer public addresses over temporary addresses. prefer-temporary prefers temporary adresses over public addresses. Defaults to false. [Match] Name=enp0s25 [Network] IPv6PrivacyExtensions=prefer-temporary
2015-07-04bootctl: fix sdboot to systemd-bootMiguel Bernal Marin
sdboot was renamed to systemd-boot Fixes: e7dd673d1e0a ("gummiboot/sd-boot/systemd-boot: rename galore") Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
2015-07-04Merge pull request #485 from poettering/sd-bus-flush-close-unrefDavid Herrmann
sd-bus: introduce new sd_bus_flush_close_unref() call
2015-07-04core: fix coding style in agent-handlingDavid Herrmann
Avoid late bail-out based on a condition. This makes code hard to read. Instead, reverse the forwarding-condition.
2015-07-04core: harden cgroups-agent forwardingDavid Herrmann
On dbus1, we receive systemd1.Agent signals via the private socket, hence it's trusted. However, on kdbus we receive it on the system bus. We must make sure it's sent by UID=0, otherwise unprivileged users can fake it. Furthermore, never forward broadcasts we sent ourself. This might happen on kdbus, as we forward the message on the same bus we received it on, thus ending up in an endless loop.
2015-07-04busctl: flush stdout after dumping dataDavid Herrmann
Running `busctl monitor` currently buffers data for several seconds / kilobytes before writing stdout. This is highly confusing if you dump in a file, ^C busctl and then end up with a file with data of the last few _seconds_ missing. Fix this by explicitly flushing after each signal.
2015-07-03Merge pull request #484 from xnox/persistent-journalLennart Poettering
journal: in persistent mode create /var/log/journal, with all parents.
2015-07-03sd-bus: introduce new sd_bus_flush_close_unref() callLennart Poettering
sd_bus_flush_close_unref() is a call that simply combines sd_bus_flush() (which writes all unwritten messages out) + sd_bus_close() (which terminates the connection, releasing all unread messages) + sd_bus_unref() (which frees the connection). The combination of this call is used pretty frequently in systemd tools right before exiting, and should also be relevant for most external clients, and is hence useful to cover in a call of its own. Previously the combination of the three calls was already done in the _cleanup_bus_close_unref_ macro, but this was only available internally. Also see #327
2015-07-03Merge pull request #478 from ↵Daniel Mack
systemd/revert-429-nspawn-userns-uid-shift-autodetection-fix Revert "nspawn: determine_uid_shift before forking"
2015-07-03journal: in persistent mode create /var/log/journal, with all parents.Dimitri John Ledkov
systemd-journald races with systemd-tmpfiles-setup, and hence both are started at about the same time. On a bare-bones system (e.g. with empty /var, or even non-existent /var), systemd-tmpfiles will create /var/log. But it can happen too late, that is systemd-journald already attempted to mkdir /var/log/journal, ignoring the error. Thus failing to create /var/log/journal. One option, without modifiying the dependency graph is to create /var/log/journal directory with parents, when persistent storage has been requested.
2015-07-03Revert "nspawn: determine_uid_shift before forking"Lennart Poettering