Commit graph

21956 commits

Author SHA1 Message Date
David Herrmann 3df49c2877 login: support user-bus on dbus1
dbus-1.10 was just released, including systemd units to run
`dbus-daemon --session` as systemd user unit. This allows using a
user-bus with dbus1, just like we do per default with kdbus.

All the dbus libraries have already been fixed long ago to use the
user-bus as default. Hence, there's no need to set
DBUS_SESSION_BUS_ADDRESS= if we use the user-bus. However, gdm and
friends continue to spawn a session bus if this variable is not set
(instead of checking for the existence of the user-bus). Hence, we force
the user-bus, if it is available, in pam_systemd. Once gdm and friends
are fixed, we can continue to drop this again. However, that might take
a while.

With this in place, all that is needed to make the user-bus work is:
    `systemctl --global enable dbus.socket`

If dbus.socket is not enabled, the legacy session-bus is still used.

Based on a patch by: Jan Alexander Steffens <jan.steffens@gmail.com>
2015-08-31 18:12:37 +02:00
Daniel Mack d728d7faa6 Merge pull request #1093 from poettering/unified-prepare
A variety of clean-ups
2015-08-31 13:58:29 +02:00
Lennart Poettering dcd7199082 cgtop: rework error handling
Never report errors twice.
2015-08-31 13:29:46 +02:00
Lennart Poettering 556c25cf8c sd-event: improve debug message when we fail to remove and fd from an epoll
Let's help users to debug issues with epoll fd removal by printing the
name of the event source.
2015-08-31 13:20:44 +02:00
Lennart Poettering 324496eb25 cgls: pretty print root cgroup path
Make sure show it as "/" rather than empty string.
2015-08-31 13:20:44 +02:00
Lennart Poettering 90990e28c9 manager: remove ask-password fd from sd_event before closing it
Otherwise we might attempt to remove a non-existing fd from epoll.
2015-08-31 13:20:44 +02:00
Lennart Poettering 6d3eefd28e man: document relationship between keys and switches of cgtop 2015-08-31 13:20:44 +02:00
Lennart Poettering 7fcfb7ee2f cgtop: allow toggling of --recursive= and -k at runtime 2015-08-31 13:20:44 +02:00
Lennart Poettering 3cb5beea0c cgtop: recursively count cgroup member tasks
When showing the number of tasks in a cgroup, recursively count tasks in
child cgroups and include them in the number. This ensures that the
number of tasks is cummulative the same way as memory, cpu and IO
resources are.

Old behaviour can be restored by passing the new --recursive=no switch.
2015-08-31 13:20:44 +02:00
Lennart Poettering 41ba8b6e69 cgtop: ignore kernel threads when counting tasks
However, allow them to be counted in by specifying -k
2015-08-31 13:20:44 +02:00
Lennart Poettering cb88a0a4ae cgls: print the expressive error message we have 2015-08-31 13:20:44 +02:00
Lennart Poettering a6149b93af process-util: trivial optimization 2015-08-31 13:20:43 +02:00
Lennart Poettering 03af6492f0 cgtop: show resource usage relative to cgroup root only
This way the output is restricted to cgroups from a container when run
in one.
2015-08-31 13:20:43 +02:00
Lennart Poettering 52f448c3ff unit: minor simplification 2015-08-31 13:20:43 +02:00
Lennart Poettering 9797f89bf0 util: treat 'C' and 'POSIX' locale identical 2015-08-31 13:20:43 +02:00
Lennart Poettering a1b4e6e933 pager: set $LESSCHARSET when we output UTF8 chars
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.
2015-08-31 13:20:43 +02:00
Lennart Poettering d79200e26e unit: unify how we assing slices to units
This adds a new call unit_set_slice(), and simplifies
unit_add_default_slice(). THis should make our code a bit more robust
and simpler.
2015-08-31 13:20:43 +02:00
Lennart Poettering 35b7ff80e2 unit: add new macros to test for unit contexts 2015-08-31 13:20:43 +02:00
Lennart Poettering 6513d561ce core: use DUAL_TIMESTAMP_NULL where we can 2015-08-31 13:20:43 +02:00
Lennart Poettering 3f5e811594 core: don't generate stub unit file for transient units
We store the properties for transient units in drop-ins anyway, and
units don't have to have fragment files, hence don't bother with them,
and don't create them.
2015-08-31 13:20:43 +02:00
Lennart Poettering 3850d0505f build-sys: add missing Makefile symlink 2015-08-31 13:09:52 +02:00
Lennart Poettering abab50081c update TODO 2015-08-31 13:09:29 +02:00
Daniel Mack f70e92b728 Merge pull request #1091 from marmolak/master
socket: fix setsockopt call. SOL_SOCKET changed to SOL_TCP.
2015-08-31 12:15:35 +02:00
Robin Hack 172cfe8714 socket: fix setsockopt call. SOL_SOCKET changed to SOL_TCP. 2015-08-31 11:45:09 +02:00
Lennart Poettering bbc19baa50 Merge pull request #1083 from filbranden/configparse1
A few more tweaks to extract_first_word
2015-08-31 11:36:01 +02:00
Daniel Mack 6fb350fbe9 Merge pull request #1088 from filbranden/perltest2
test: udev - Signal that test was skipped when running as non-root
2015-08-31 08:47:49 +02:00
Daniel Mack cbb14ca063 Merge pull request #1084 from crrodriguez/master
misc bugfixes
2015-08-31 08:46:48 +02:00
Daniel Mack dd64f53175 Merge pull request #1087 from whot/hwdb-updates
hwdb: Add trackpoint sensitivity setting for Thinkpad X230
2015-08-31 08:44:02 +02:00
Filipe Brandenburger 4d55fc5b21 test: udev - Signal that test was skipped when running as non-root
It is more accurate to report that the test was skipped rather than
succeeded if we did not get to run it because it requires root.

Tested by running `make check` and inspecting the log file:

  $ cat test/udev-test.pl.log
  Must have root permissions to run properly.
  SKIP test/udev-test.pl (exit status: 77)

The `make check` output also reported:

  SKIP: test/udev-test.pl
2015-08-30 22:10:30 -07:00
Peter Hutterer c10919874e hwdb: move the Performance MX to 1000dpi
Original entry may have been skewed by an earlier setting on the device, we
have a confirmed 1000dpi for a new device.

https://github.com/systemd/systemd/issues/1049
2015-08-31 14:53:07 +10:00
Peter Hutterer 27c43e7ed4 hwdb: Add trackpoint sensitivity setting for Thinkpad X230
https://bugs.freedesktop.org/show_bug.cgi?id=91794
2015-08-31 14:42:38 +10:00
Filipe Brandenburger 8ab00959fb extract_first_word: Refactor EXTRACT_DONT_COALESCE_SEPARATORS handling
Refactor allocation of the result string to the top, since it is
currently done in both branches of the condition.

Remove unreachable code checking for EXTRACT_DONT_COALESCE_SEPARATORS
when state == SEPARATOR (the only place where SEPARATOR is assigned to
state follows a check for EXTRACT_DONT_COALESCE_SEPARATORS that jumps to
the end of the function.)

Tested by running test-util successfully.

Follow up to: 206644aede
2015-08-30 19:48:38 -07:00
Filipe Brandenburger d3ef6c5560 extract_first_word: Refactor allocation in empty argument case
This covers the case where an argument is an empty string, such as ''.

Instead of allocating the empty string in the individual conditions when
state == VALUE, just always allocate it at the end of state == START, at
which point we know we will have an argument.

Tested that test-util keeps passing after the refactor.

Follow up to: 14e685c29d
2015-08-30 19:48:30 -07:00
Cristian Rodríguez 0ba793fb8b sd-bus: Fix incorrect cleanup attribute in bus_match_to_string()
Must be _cleanup_fclose_ not _cleanup_free_
2015-08-30 19:21:31 -03:00
Cristian Rodríguez 82613b14ba core: add attribute printf to null_log() 2015-08-30 19:21:31 -03:00
Cristian Rodríguez 3cb063fdb2 locale: add printf attribute to log_xkb() 2015-08-30 19:21:31 -03:00
Lennart Poettering 40ec276fdf Merge pull request #1072 from piotrdrag/master
po: update Polish translation
2015-08-30 13:19:17 +02:00
Lennart Poettering 8971a0a031 Merge pull request #1073 from phomes/master
util: make malloc0 ask calloc for one block of size n
2015-08-30 13:18:14 +02:00
Lennart Poettering 16dc504902 Merge pull request #1074 from phomes/networkd-initialize-var
networkd: initialize tz to null
2015-08-30 13:16:53 +02:00
Thomas Hindoe Paaboel Andersen 0ab8a1b622 networkd: initialize tz to null
We may not set it before checking it for null.
2015-08-30 03:23:07 +02:00
Thomas Hindoe Paaboel Andersen f80bb1f7ea util: make malloc0 ask calloc for one block of size n
... instead of an array of n individual bytes.

Silences a lot of warnings in smatch.
2015-08-30 02:32:33 +02:00
Piotr Drąg ab6ee33fce po: update Polish translation 2015-08-29 20:33:02 +02:00
Lennart Poettering a19222e1d3 nspawn: don't try to extract quotes from option string, glibc doesn't do that either
Follow-up regarding #649.
2015-08-29 19:43:48 +02:00
Lennart Poettering e9916ffdba Merge pull request #649 from eyakubovich/nspawn-rbind
nspawn: add --rbind and --rbind-ro options
2015-08-29 19:42:36 +02:00
Lennart Poettering a13ef8c632 Merge pull request #1069 from evverx/networkctl-bash-completion
shell-completion: bash: add networkctl completion
2015-08-29 19:40:32 +02:00
Eugene Yakubovich 5e5bfa6e1c nspawn: add (no)rbind option to --bind and --bind-ro
--bind and --bind-ro perform the bind mount
non-recursively. It is sometimes (often?) desirable
to do a recursive mount. This patch adds an optional
set of bind mount options in the form of:
	--bind=src-path:dst-path:options
options are comma separated and currently only
"rbind" and "norbind" are allowed.
Default value is "rbind".
2015-08-28 18:06:05 -07:00
David Herrmann d981d5163a Merge pull request #1058 from spasche/hwdb-logitech-mice
hwdb: add DPI data for a few Logitech mice
2015-08-29 00:21:46 +02:00
David Herrmann 89c9869c35 Merge pull request #1071 from phomes/master
hwdb: update the mouse db
2015-08-29 00:20:25 +02:00
Thomas Hindoe Paaboel Andersen c7c9fd04bd hwdb: update entry for logitech RX 250
I tested a RX 250 and measured 1000 DPI. The spec for the mouse
agrees:
http://www.logitech.com/en-gb/product/rx250-optical-mouse-business

This is an optical mouse so it is extra sensitive to what kind of
surface it is tested on.
2015-08-28 23:47:48 +02:00
Thomas Hindoe Paaboel Andersen 23c4147f2b hwdb: add a few more mice 2015-08-28 23:47:44 +02:00