chiark / gitweb /
Lennart Poettering [Thu, 16 Apr 2015 15:27:51 +0000 (17:27 +0200)]
sd-bus: add more comments to the credential decision logic
Michael Olbrich [Tue, 14 Apr 2015 20:01:48 +0000 (22:01 +0200)]
automount: add expire support
Zbigniew Jędrzejewski-Szmek [Tue, 14 Apr 2015 16:39:40 +0000 (12:39 -0400)]
sd-device: fix typo
Tom Gundersen [Tue, 14 Apr 2015 14:55:18 +0000 (16:55 +0200)]
sd-devcie: fix typo
Zbigniew Jędrzejewski-Szmek [Tue, 14 Apr 2015 14:29:03 +0000 (10:29 -0400)]
journal: use audit event names instead of numbers
<audit-1400> is replaced by AVC, etc.
A fallback mechanism is provided for unlisted event types.
Occasionally new types are added to the kernel, but not too often.
Add a simple "test", which simply prints the mapping.
Tom Gundersen [Tue, 14 Apr 2015 14:25:06 +0000 (16:25 +0200)]
libudev: make libudev-enumerate a thin wrapper around sd-device
Tom Gundersen [Tue, 14 Apr 2015 14:22:39 +0000 (16:22 +0200)]
sd-device: add device-enumerator library
Tom Gundersen [Tue, 14 Apr 2015 14:05:53 +0000 (16:05 +0200)]
sd-device: fix reading of subsystem
Tom Gundersen [Tue, 14 Apr 2015 13:15:49 +0000 (15:15 +0200)]
sd-device: allow uevent files to be write-only
Zbigniew Jędrzejewski-Szmek [Mon, 13 Apr 2015 02:41:20 +0000 (22:41 -0400)]
pam_system: use (void) to silence coverity
CID #996284.
Zbigniew Jędrzejewski-Szmek [Sun, 12 Apr 2015 20:04:51 +0000 (16:04 -0400)]
shared/hashmap: normalize whitespace
Piotr Drąg [Sat, 11 Apr 2015 23:45:11 +0000 (01:45 +0200)]
po: update Polish translation
https://bugs.freedesktop.org/show_bug.cgi?id=89989
Zbigniew Jędrzejewski-Szmek [Sat, 11 Apr 2015 23:39:30 +0000 (19:39 -0400)]
bus-util: add articles to explanation messages
We are talking about one member of a group of things (resource limits, signals,
timeouts), without specifying which one. An indenfinite article is in order.
When we are talking about the control process, it's a specific one, so the
definite article is used.
Daniel Mack [Sat, 11 Apr 2015 17:47:12 +0000 (19:47 +0200)]
logind: make local functions static
make manager_gc(), manager_startup(), manager_new(), manager_free()
and manager_run() static, and kill their forward declarations.
Daniel Mack [Sat, 11 Apr 2015 16:44:51 +0000 (18:44 +0200)]
logind: use sd_event timer source for inhibitor logic
Instead of open-coding the delayed action and inhibit timeout logic,
switch over to a real sd_event_source based implementation.
This is not only easier to read but also allows us to add more timers
in the future.
Ronny Chevalier [Fri, 10 Apr 2015 22:25:43 +0000 (00:25 +0200)]
shared: move replace_env* from util to env-util
Ronny Chevalier [Fri, 10 Apr 2015 21:15:59 +0000 (23:15 +0200)]
shared: add terminal-util.[ch]
Ronny Chevalier [Fri, 10 Apr 2015 20:27:10 +0000 (22:27 +0200)]
shared: add random-util.[ch]
Ronny Chevalier [Fri, 10 Apr 2015 18:43:52 +0000 (20:43 +0200)]
shared: add formats-util.h
Tom Gundersen [Fri, 10 Apr 2015 18:39:43 +0000 (20:39 +0200)]
shared: move assert_return_errno() from libudev
This should not be used for any new code, as we don't set errno in new code,
but there are several legacy users, so let's keep it in shared.
Ronny Chevalier [Fri, 10 Apr 2015 17:10:00 +0000 (19:10 +0200)]
shared: add process-util.[ch]
Lennart Poettering [Fri, 10 Apr 2015 16:45:39 +0000 (18:45 +0200)]
sd-event: simplify sd_event_run()
David Herrmann [Fri, 10 Apr 2015 15:44:30 +0000 (17:44 +0200)]
bus: implement bus_path_{en,de}code_unique()
Whenever we provide a bus API that allows clients to create and manage
server-side objects, we need to provide a unique name for these objects.
There are two ways to provide them:
1) Let the server choose a name and return it as method reply.
2) Let the client pass its name of choice in the method arguments.
The first method is the easiest one to implement. However, it suffers from
a race condition: If a client creates an object asynchronously, it cannot
destroy that object until it received the method reply. It cannot know the
name of the new object, thus, it cannot destroy it. Furthermore, this
method enforces a round-trip. If the client _depends_ on the method call
to succeed (eg., it would close() the connection if it failed), the client
usually has no reason to wait for the method reply. Instead, the client
can immediately schedule further method calls on the newly created object
(in case the API guarantees in-order method-call handling).
The second method fixes both problems: The client passes an object name
with the method-call. The server uses it to create the object. Therefore,
the client can schedule object destruction even if the object-creation
hasn't finished, yet (again, requiring in-order method-call handling).
Furthermore, the client can schedule further method calls on the newly
created object, before the constructor returned.
There're two problems to solve, though:
1) Object names are usually defined via dbus object paths, which are
usually globally namespaced. Therefore, multiple clients must be able
to choose unique object names without interference.
2) If multiple libraries share the same bus connection, they must be
able to choose unique object names without interference.
The first problem is solved easily by prefixing a name with the
unique-bus-name of a connection. The server side must enforce this and
reject any other name.
The second problem is solved by providing unique suffixes from within
sd-bus. As long as sd-bus always returns a fresh new ID, if requested,
multiple libraries will never interfere. This implementation re-uses
bus->cookie as ID generator, which already provides unique IDs for each
bus connection.
This patch introduces two new helpers:
bus_path_encode_unique(sd_bus *bus,
const char *prefix,
const char *sender_id,
const char *external_id,
char **ret_path);
This creates a new object-path via the template
'/prefix/sender_id/external_id'. That is, it appends two new labels to
the given prefix. If 'sender_id' is NULL, it will use
bus->unique_name, if 'external_id' is NULL, it will allocate a fresh,
unique cookie from bus->cookie.
bus_path_decode_unique(const char *path,
const char *prefix,
char **ret_sender,
char **ret_external);
This reverses what bus_path_encode_unique() did. It parses 'path' from
the template '/prefix/sender/external' and returns both suffix-labels
in 'ret_sender' and 'ret_external'. In case the template does not
match, 0 is returned and both output arguments are set to NULL.
Otherwise, 1 is returned and the output arguments contain the decoded
labels.
Note: Client-side allocated IDs are inspired by the Wayland protocol
(which itself was inspired by X11). Wayland uses those IDs heavily
to avoid round-trips. Clients can create server-side objects and
send method calls without any round-trip and waiting for any object
IDs to be returned. But unlike Wayland, DBus uses gobally namespaced
object names. Therefore, we have to add the extra step by adding the
unique-name of the bus connection.
David Herrmann [Fri, 10 Apr 2015 15:43:04 +0000 (17:43 +0200)]
bus: implement bus_label_unescape_n()
This is like bus_label_unescape() but takes a maximum length instead of
relying on NULL-terminated strings. This is highly useful to unescape
labels that are not at the end of a path.
Ronny Chevalier [Fri, 10 Apr 2015 14:53:17 +0000 (16:53 +0200)]
core: set_put never returns -EEXIST
When the value is already there it returns 0.
Also add a test to ensure this
Michal Sekletar [Fri, 10 Apr 2015 13:56:52 +0000 (15:56 +0200)]
bus-util: be more verbose if dbus job fails
Users might have hard time figuring out why exactly their systemctl request
failed. If dbus job fails try to figure out more details about failure by
examining Result property of the service.
https://bugzilla.redhat.com/show_bug.cgi?id=
1016680
Ronny Chevalier [Fri, 10 Apr 2015 13:44:02 +0000 (15:44 +0200)]
shared: fix memleak
path was used for 2 purposes but it was not freed before being reused.
Lennart Poettering [Fri, 10 Apr 2015 12:43:37 +0000 (14:43 +0200)]
device-nodes: minor simplifications
Lennart Poettering [Fri, 10 Apr 2015 12:43:06 +0000 (14:43 +0200)]
util: unify how we parse mode_t strings
Lennart Poettering [Fri, 10 Apr 2015 10:21:44 +0000 (12:21 +0200)]
util: remove normalize_env_assignment(), it's unused
Lennart Poettering [Fri, 10 Apr 2015 10:16:54 +0000 (12:16 +0200)]
util: mark unquote() static, so that new code doesn't use this anymore
Lennart Poettering [Fri, 10 Apr 2015 09:56:04 +0000 (11:56 +0200)]
util: fix unicode decoding in unquote_first_word()
Lennart Poettering [Fri, 10 Apr 2015 09:27:47 +0000 (11:27 +0200)]
util: when unescaping C escape sequences support C++11 \u and \U unicode literals
We simply recode them in utf8.
David Herrmann [Fri, 10 Apr 2015 09:15:12 +0000 (11:15 +0200)]
hashmap: return NULL from destructor
We _always_ return NULL from destructors to allow direct assignments to
the variable holding the object. Especially on hashmaps, which treat NULL
as empty hashmap, this is pretty neat.
Thomas Hindoe Paaboel Andersen [Thu, 9 Apr 2015 21:57:35 +0000 (23:57 +0200)]
util: fix a typo in comment
Lennart Poettering [Thu, 9 Apr 2015 16:32:21 +0000 (18:32 +0200)]
util: add shell_maybe_quote() call for preparing a string for shell cmdline inclusion
If necessary the passed string is enclosed in "", and all special
characters escapes.
This also ports over usage in bus-util.c and job.c to use this, instead
of a incorrect local implementation that forgets to properly escape.
Daniel Mack [Thu, 9 Apr 2015 14:44:51 +0000 (16:44 +0200)]
logind: drop unused argument from method_do_shutdown_or_sleep()
Ronny Chevalier [Thu, 9 Apr 2015 09:00:35 +0000 (11:00 +0200)]
util: cunescape - fix memleak in error path
Lennart Poettering [Wed, 8 Apr 2015 18:47:35 +0000 (20:47 +0200)]
util: merge change_attr_fd() and chattr_fd()
Alexander Sverdlin [Wed, 8 Apr 2015 10:59:40 +0000 (12:59 +0200)]
missing.h: Define IFA_F_NOPREFIXROUTE
Fixes second systemd compilation problem against Linux 3.12 uapi
headers.
IFA_F_NOPREFIXROUTE is a usual #define appeared in Linux 3.14, so
AC_CHECK_DECLS is not necessary.
Lennart Poettering [Wed, 8 Apr 2015 10:53:50 +0000 (12:53 +0200)]
sd-rtnl: properly size attribute array if IFA_FLAGS was missing
David Herrmann [Wed, 8 Apr 2015 09:20:10 +0000 (11:20 +0200)]
bus: simplify bus_message_read_strv_extend()
Avoid unbound for(;;) loop and use the established coding-style:
while ((r = sd_bus_message_read*(...)) > 0) {
}
if (r < 0)
return r;
This is much easier to read and used all over the code base.
Ronny Chevalier [Tue, 7 Apr 2015 23:15:32 +0000 (01:15 +0200)]
remove duplicated includes
Sylvain Plantefève [Tue, 7 Apr 2015 22:40:33 +0000 (00:40 +0200)]
po: update French translation
Add strings introduced by
5bdf22430e367799dfa66c724144b624c5479518
Lennart Poettering [Tue, 7 Apr 2015 19:08:07 +0000 (21:08 +0200)]
logind: drop "interactive" parameter from SetRebootToFirmwareSetup() bus call
Newer dbus versions have an "allow interactive authentication" bit in
the message header, hence it is not necessary to take a boolean for this
explicitly.
Lennart Poettering [Tue, 7 Apr 2015 19:07:19 +0000 (21:07 +0200)]
missing.h: define IFA_FLAGS if it is missing
Ronny Chevalier [Tue, 7 Apr 2015 17:35:13 +0000 (19:35 +0200)]
zsh-completion: update loginctl
Lennart Poettering [Tue, 7 Apr 2015 14:03:45 +0000 (16:03 +0200)]
path-util: fix more path_is_mount
e792e890f fallout
David Herrmann [Tue, 7 Apr 2015 13:20:54 +0000 (15:20 +0200)]
bus: use free_and_strdup()
Save some LOCs by replacing strdup()+error-handling+free+assign with
free_and_strdup().
David Herrmann [Tue, 7 Apr 2015 11:11:18 +0000 (13:11 +0200)]
device: fix sysattr newline cutter
Right now, we always drop the last character of all values we write to
sysfs. Fix this!
Lennart Poettering [Mon, 6 Apr 2015 18:25:56 +0000 (20:25 +0200)]
polkit: rename bus_verify_polkit() to bus_test_polkit() and make it strictly non-interactive
Interactive authorization should only happen asynchronously, hence
disallow it in synchronous bus_verify_polkit(), and rename it to
bus_test_polkit(). This way even if the bus message header asks for
interactive authorization, we'll ask for non-interactive authorization
which is actually the desired behaviour if CanSuspend, CanHibernate and
friends, which call this function.
Lennart Poettering [Mon, 6 Apr 2015 18:11:41 +0000 (20:11 +0200)]
util: rework cunescape(), improve error handling
Change cunescape() to return a normal error code, so that we can
distuingish OOM errors from parse errors.
This also adds a flags parameter to control whether "relaxed" or normal
parsing shall be done. If set no parse failures are generated, and the
only reason why cunescape() can fail is OOM.
Lennart Poettering [Mon, 6 Apr 2015 13:26:59 +0000 (15:26 +0200)]
btrfs: add support for recursive btrfs snapshotting
Lennart Poettering [Mon, 6 Apr 2015 12:55:45 +0000 (14:55 +0200)]
btrfs: missing endian conversion fix
Lennart Poettering [Mon, 6 Apr 2015 09:47:25 +0000 (11:47 +0200)]
btrfs: make btrfs_subvol_snapshot() parameters a flags field
Lennart Poettering [Mon, 6 Apr 2015 08:57:17 +0000 (10:57 +0200)]
btrfs: support recursively removing btrfs snapshots
Tom Gundersen [Sun, 5 Apr 2015 10:17:29 +0000 (12:17 +0200)]
sd-device: don't use alloca() within loops
I shall not use alloca() within loops
I shall not use alloca() within loops
I shall not use alloca() within loops
I shall not use alloca() within loops
...
Lennart Poettering [Sun, 5 Apr 2015 09:28:04 +0000 (11:28 +0200)]
machined: drop btrfs subvolumes when removing container images
Lennart Poettering [Sun, 5 Apr 2015 09:26:58 +0000 (11:26 +0200)]
path-util: don't eat up ENOENT in path_is_mount_point()
There's no reason to eat up ENOENT, it should be OK to simply report the
error back.
Lennart Poettering [Sun, 5 Apr 2015 09:12:16 +0000 (11:12 +0200)]
path-util: make sure fd_is_mount_point() returns true for root directory
Lennart Poettering [Sat, 4 Apr 2015 17:20:56 +0000 (19:20 +0200)]
path-util: if parent can do name_to_handle() but relevant dir not, it's a mount point
Lennart Poettering [Sat, 4 Apr 2015 12:42:39 +0000 (14:42 +0200)]
rm-rf: never cross mount points
Lennart Poettering [Sat, 4 Apr 2015 09:52:57 +0000 (11:52 +0200)]
util: rework rm_rf() logic
- Move to its own file rm-rf.c
- Change parameters into a single flags parameter
- Remove "honour sticky" logic, it's unused these days
Tom Gundersen [Fri, 3 Apr 2015 20:51:09 +0000 (22:51 +0200)]
sd-device,udevd: fix spelling /ammend/amend/
Tom Gundersen [Fri, 3 Apr 2015 19:05:42 +0000 (21:05 +0200)]
sd-device: get_properties_{nulstr,strv} - don't recreate the buffer unnecessarily
Tom Gundersen [Fri, 3 Apr 2015 19:04:48 +0000 (21:04 +0200)]
sd-device: fix deserialization from netlink
Use the standard FOREACH_WORD* macros.
The current code was broken in the devlink case so the last one received
was being dropped, causing https://bugs.freedesktop.org/show_bug.cgi?id=89894
Jan Janssen [Fri, 3 Apr 2015 16:03:06 +0000 (18:03 +0200)]
logind,systemctl: add reboot to EFI firmware support
Hans de Goede [Fri, 3 Apr 2015 10:07:32 +0000 (12:07 +0200)]
udev: input_id: tag accelerometers as ID_INPUT_ACCELEROMETER
input_id already (tries to) tag accelerometers as such, but this only works
for absolute accelerometers. Recent kernels mark accelerometers through an
input prop. Trust that prop and always tag devices with it with
ID_INPUT_ACCELEROMETER.
Note that detection by the prop bit works the same as the existing detection
and will ensure that no other tags get set on the device.
Pablo Lezaeta Reyes [pˈaβ̞lo lˌe̞θaˈeta rˈejɛ] [Tue, 31 Mar 2015 05:47:39 +0000 (02:47 -0300)]
Separate the % sign from the number
In spanish the % sign is supposed to be separated from the number [1 and 2 both in spanish] so I separated the %% that draw the percentage sign from the number.
[1] http://www.fundeu.es/recomendacion/el-se-escribe-separado-de-la-cifra-a-la-que-acompana-802/
[2] http://aplica.rae.es/orweb/cgi-bin/v.cgi?i=QGkHLBzKcEgZrQyD
PD: I know that probably this is not the propper place but I don't know where submit the fix or if I do it right
Peter Hutterer [Thu, 26 Mar 2015 04:08:35 +0000 (14:08 +1000)]
udev: input_id: tag pointing sticks as ID_INPUT_POINTINGSTICK
Also referred to as trackpoint, trackstick. These are marked by recent kernels
through an input prop. Forward that prop as udev property so userspace can
easily determine whether there is a pointing stick present.
These devices were previously marked as ID_INPUT_MOUSE, for backwards
compatibility we keep that in place, the new property is an addition.
Peter Hutterer [Thu, 19 Mar 2015 04:19:58 +0000 (14:19 +1000)]
udev: builtin-keyboard: add support for EVDEV_ABS_*
Parse properties in the form
EVDEV_ABS_00="<min>:<max>:<res>:<fuzz>:<flat>"
and apply them to the kernel device. Future processes that open that device
will see the updated EV_ABS range.
This is particularly useful for touchpads that don't provide a resolution in
the kernel driver but can be fixed up through hwdb entries (e.g. bcm5974).
All values in the property are optional, e.g. a string of "::45" is valid to
set the resolution to 45.
The order intentionally orders resolution before fuzz and flat despite it
being the last element in the absinfo struct. The use-case for setting
fuzz/flat is almost non-existent, resolution is probably the most common case
we'll need.
To avoid multiple hwdb invocations for the same device, replace the
hwdb "keyboard:" prefix with "evdev:" and drop the separate 60-keyboard.rules
file. The new 60-evdev.rules is called for all event nodes
anyway, we don't need a separate rules file and second callout to the hwdb
builtin.
Zbigniew Jędrzejewski-Szmek [Wed, 18 Mar 2015 02:29:31 +0000 (22:29 -0400)]
bootctl: modernization
Use strjoina to avoid error handling, and openat to simplify things.
Some fixes on the way:
- ferror does not set errno, so the return value was wrong in some cases
- errors are propagated in more cases
- EFI/systemd was created, but EFI/systemd-boot was deleted
- something is always printed on error
- when checking the version, comparison was done against "systemd-bo" for some reason
- return value was converted from negative to EXIT_SUCCESS/EXIT_FAILURE twice,
resulting in EXIT_SUCCESS all the time
Zbigniew Jędrzejewski-Szmek [Mon, 16 Mar 2015 17:14:18 +0000 (13:14 -0400)]
journal: add int↔audit type name mapping
Susant Sahani [Mon, 9 Mar 2015 09:58:29 +0000 (15:28 +0530)]
networkd: Add support for bond option.
This patch adds configurational support for bond option.
Test conf:
bond.netdev
---
[NetDev]
Name=bond1
Kind=bond
[Bond]
ArpAllTargets=all
PrimaryReselect=better
ArpIntervalSec=10s
ArpIpTargets= 192.168.8.102 192.168.8.101 192.168.8.102
---
$cat /proc/net/bonding/bond1
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0
ARP Polling Interval (ms): 10000
ARP IP target/s (n.n.n.n form): 192.168.8.100, 192.168.8.101, 192.168.8.102
Susant Sahani [Thu, 5 Mar 2015 16:32:47 +0000 (22:02 +0530)]
networkd vxlan: Add support for enabling UDP checksums
Add UDPCheckSum option to enable transmitting UDP checksums when doing
VXLAN/IPv4. Add UDP6ZeroChecksumRx, and UDP6ZeroChecksumTx
options to enable sending zero checksums and receiving zero
checksums in VXLAN/IPv6
[tomegun: rebase manpage due to whitespace changes]
Daniel Mack [Fri, 20 Feb 2015 14:16:02 +0000 (15:16 +0100)]
sd-bus: teach bus_print_property() how to print SD_BUS_TYPE_INT64
Andy Wingo [Wed, 16 Mar 2016 21:47:59 +0000 (22:47 +0100)]
Release version 219.14.
Andy Wingo [Thu, 17 Mar 2016 08:21:53 +0000 (09:21 +0100)]
Clear pending action after resume from delayed sleep.
Andy Wingo [Wed, 16 Mar 2016 21:47:37 +0000 (22:47 +0100)]
Emit PrepareForSleep when resuming.
Andy Wingo [Sun, 6 Mar 2016 15:03:03 +0000 (16:03 +0100)]
v219.13
Andy Wingo [Sun, 6 Mar 2016 15:56:33 +0000 (16:56 +0100)]
Fixes to user and session saving
* src/login/logind-dbus.c (method_create_session): No need to save
session here, as session_send_create_reply will do it.
* src/login/logind-session-dbus.c (session_send_create_reply): On the
other hand we do need to save the user here, so the file marks them as
being active.
Andy Wingo [Sun, 6 Mar 2016 15:02:31 +0000 (16:02 +0100)]
Classify processes from sessions into cgroups
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.
Andy Wingo [Wed, 2 Mar 2016 19:50:35 +0000 (20:50 +0100)]
Set up cgroups when logind starts
This code is from systemd.
Andy Wingo [Wed, 2 Mar 2016 19:44:29 +0000 (20:44 +0100)]
Re-add cgroups agent to the build
The helper is now named logind-cgroups-agent.
Andy Wingo [Wed, 2 Mar 2016 19:36:32 +0000 (20:36 +0100)]
Revert "Remove src/cgroups-agent"
This reverts commit
024e2f0da33fa05f4d5aa696e9f715264e9cd41f.
Andy Wingo [Sun, 6 Mar 2016 11:47:17 +0000 (12:47 +0100)]
Fix check for libcap to re-set LIBS; add -lrt for mq_unlink
Andy Wingo [Wed, 2 Sep 2015 10:45:47 +0000 (12:45 +0200)]
Update README
Andy Wingo [Tue, 1 Sep 2015 11:15:56 +0000 (13:15 +0200)]
v219.12
Andy Wingo [Tue, 1 Sep 2015 11:13:49 +0000 (13:13 +0200)]
Fix argument order when checking inhibitors
Andy Wingo [Tue, 1 Sep 2015 10:30:17 +0000 (12:30 +0200)]
Stop sessions on ReleaseSession
Andy Wingo [Tue, 1 Sep 2015 09:54:25 +0000 (11:54 +0200)]
Fix the login monitor
* src/login/logind.c (main): Create /run/systemd/machines, so that the
login monitor works.
* configure.ac: v219.10.
Andy Wingo [Tue, 1 Sep 2015 09:32:07 +0000 (11:32 +0200)]
v219.9
Andy Wingo [Tue, 1 Sep 2015 09:30:38 +0000 (11:30 +0200)]
PKTTYAGENT make variable
* Makefile.am (PKTTYAGENT): Define as a variable so that users can make
PKTTYAGENT=/whatever to select a specific pkttyagent path.
Andy Wingo [Sat, 29 Aug 2015 10:19:20 +0000 (12:19 +0200)]
v219.8
Andy Wingo [Sat, 29 Aug 2015 10:17:50 +0000 (12:17 +0200)]
Add poweroff, suspend etc. loginctl commands
* src/login/loginctl.c: Add poweroff, reboot, suspend, hibernate, and
hybrid-sleep commands. Normally these are handled by systemctl but
since elogind is targeted at the no-systemd use case, we incorporate
them here.
Andy Wingo [Sat, 29 Aug 2015 09:20:59 +0000 (11:20 +0200)]
Incorporate sleep.conf into logind.conf
* src/login/logind-action.c (shutdown_or_sleep, do_sleep): Take modes
from the manager instead of parsing them ourselves.
* src/login/logind-dbus.c (execute_shutdown_or_sleep): Adapt to
shutdown_or_sleep prototype change.
* src/login/logind-gperf.gperf: Add config items from sleep.conf.
* src/login/logind.c (manager_new): Wire up defaults for new config
items.
(manager_free): Free new config items.
(manager_parse_config_file): Arrange to parse a single
elogind/logind.conf file, not grovelling all over the filesystem.
Take the file from the ELOGIND_CONF_FILE environment variable if
present.
Andy Wingo [Wed, 26 Aug 2015 21:21:55 +0000 (23:21 +0200)]
v219.7
Andy Wingo [Wed, 26 Aug 2015 21:19:06 +0000 (23:19 +0200)]
Add --with-libcap option
* configure.ac: Add --with-libcap option.
* Makefile.am (libelogind_shared_la_LDFLAGS): Add CAP_LDFLAGS.
Andy Wingo [Sun, 23 Aug 2015 13:00:21 +0000 (15:00 +0200)]
v219.6
Andy Wingo [Sun, 23 Aug 2015 12:54:39 +0000 (14:54 +0200)]
Handle suspend/hibernate/hybrid-suspend/shutdown/reboot directly
* configure.ac: Get paths of halt and reboot.
* Makefile.am (systemsleepdir, systemshutdowndir): New variables. Look
in them for hooks to run.
* src/login/logind-action.c: Inline the salient bits from systemd's
system-sleep.c here.
* src/login/logind-dbus.c (execute_shutdown_or_sleep): Call our own
shutdown_or_sleep helper instead of invoking a systemd method.
* src/login/logind.h: Declare shutdown_or_sleep.