chiark / gitweb /
Lennart Poettering [Fri, 22 Sep 2017 18:59:39 +0000 (20:59 +0200)]
fileio: move fsync() logic into write_string_stream_ts()
That way, write_string_stream_ts() becomes more powerful, and we can
remove duplicate code from write_string_file_atomic() and
write_string_file_ts().
Lennart Poettering [Fri, 22 Sep 2017 18:55:34 +0000 (20:55 +0200)]
fileio: make write_string_stream() accept flags parameter
Let's make write_string_stream() and write_string_file() more alike, and
pass the same flag set so that we can remove a number of boolean
parameters.
Lennart Poettering [Fri, 22 Sep 2017 18:45:06 +0000 (20:45 +0200)]
fileio: support writing atomic files with timestamp
Let's make sure "ts" is taken into account when writing atomic files,
too.
Lennart Poettering [Fri, 22 Sep 2017 16:25:45 +0000 (18:25 +0200)]
cgroup-util: replace one use of fgets() by read_line()
Lennart Poettering [Fri, 22 Sep 2017 16:01:32 +0000 (18:01 +0200)]
fileio: rework read_one_line_file() on top of read_line()
Lennart Poettering [Fri, 22 Sep 2017 18:23:58 +0000 (20:23 +0200)]
def: add new constant LONG_LINE_MAX
LONG_LINE_MAX is much like LINE_MAX, but longer.
As it turns out LINE_MAX at 4096 is too short for many usecases. Since
the general concept of having a common maximum line length limit makes
sense let's add our own, and make it larger (1MB for now).
Lennart Poettering [Fri, 22 Sep 2017 15:55:53 +0000 (17:55 +0200)]
fileio: add new helper call read_line() as bounded getline() replacement
read_line() is much like getline(), and returns a line read from a
FILE*, of arbitrary sizes. In contrast to gets() it will grow the buffer
dynamically, and in contrast to getline() it will place a user-specified
boundary on the line.
Lennart Poettering [Fri, 22 Sep 2017 17:58:24 +0000 (19:58 +0200)]
cgroup: rework which files we chown() on delegation
On cgroupsv2 we should also chown()/chmod() the subtree_control file,
so that children can use controllers the way they like.
On cgroupsv1 we should also chown()/chmod() cgroups.clone_children, as
not setting this for new cgroups makes little sense, and hence delegated
clients should be able to write to it.
Note that error handling for both cases is different. subtree_control
matters so we check for errors, but the clone_children/tasks stuff
doesn't really, as it's legacy stuff. Hence we only log errors and
proceed.
Fixes: #6216
Lennart Poettering [Fri, 22 Sep 2017 17:57:07 +0000 (19:57 +0200)]
cgroup-util: downgrade log messages from library code to LOG_DEBUG
These errors don't really matter, that's why we log and proceed in the
current code. However, we currently log at LOG_WARNING, but we really
shouldn't given that this is library code. Hence downgrade this to
LOG_DEBUG.
Marcel Hollerbach [Wed, 20 Sep 2017 17:26:13 +0000 (19:26 +0200)]
time-util: mktime_or_timegm are changing the struct tm
after that wm_day etc. seems to be changed. Moving the check infront of
the mktime_or_timegm fixes that.
Marcel Hollerbach [Wed, 20 Sep 2017 12:47:49 +0000 (14:47 +0200)]
time-util: correctly handle the timezone when parsing
The timezone was cut off the string once the timezone was not UTC.
If it is not UTC but a other timezone that matches tzname[0] or
tzname[1], then we can leave it to the impl function to parse that
correctly. If not we can just fallback to whatever is the current
timezone is in the given t_timezone.
This should fix the testuite and tests.
Zbigniew Jędrzejewski-Szmek [Thu, 21 Sep 2017 18:54:16 +0000 (20:54 +0200)]
Link to the right glibc commit in comment (#6884)
Reported by Marcos Mello.
Fixes #6882.
Marcel Hollerbach [Tue, 19 Sep 2017 15:00:56 +0000 (17:00 +0200)]
time-util: fix shadowing of timezone
timezone was shadowing timezone from time.h which leads to a buildbreak
since elogind is built with -Werror
Zbigniew Jędrzejewski-Szmek [Sat, 16 Sep 2017 09:19:43 +0000 (11:19 +0200)]
Make test_run into a flags field and disable generators again
Now generators are only run in elogind --test mode, where this makes
most sense (how are you going to test what would happen otherwise?).
Fixes #6842.
v2:
- rename test_run to test_run_flags
Michael Biebl [Tue, 19 Sep 2017 12:17:57 +0000 (14:17 +0200)]
tests: change dbus tests to use user bus (#6845)
This makes it possible to run more dbus tests in a build
environment/chroot where no system bus is available.
To run the dbus test one then can use dbus-run-session.
Zbigniew Jędrzejewski-Szmek [Tue, 19 Sep 2017 06:04:02 +0000 (08:04 +0200)]
build-sys: bump xslt maxdepth limit (#6863)
With libxslt-1.30, builds were failing on some recursion depth limit
with elogind.index.xml. Bumping the limit fixes the issue.
Zbigniew Jędrzejewski-Szmek [Sun, 17 Sep 2017 13:17:50 +0000 (15:17 +0200)]
test-exec-util: add two test cases for scripts masked with empty file
A test for #6831. Fails without the previous commit.
Suggested by Evgeny Vereshchagin.
Zbigniew Jędrzejewski-Szmek [Sun, 17 Sep 2017 13:26:01 +0000 (15:26 +0200)]
conf-files: fix check for masking with empty files
Fixes #6831.
Zbigniew Jędrzejewski-Szmek [Sun, 17 Sep 2017 19:05:20 +0000 (21:05 +0200)]
man: describe user@host:machine syntax
Fixes #6734.
Alan Jenkins [Sat, 16 Sep 2017 11:32:59 +0000 (12:32 +0100)]
sd-bus: style nitpick node_vtable_get_userdata()
It's confusing to use a single void* to store data with two different
types, i.e. a userdata value which is safe to pass to ->find(), and a
userdata value which identifies the found object.
Name the latter `found_u`. This naming treats (!c->find) as a degenerate
case. (I.e. at that point, we know the object has already been found :).
Alan Jenkins [Sat, 16 Sep 2017 13:39:22 +0000 (14:39 +0100)]
sd-bus: fix response for GetAll on non-existent objects
Before this commit, if you run `loginctl user-status` from
debug-shell.service (and you have no login sessions for root), you always
see this output:
0
Linger: no
because Properties.GetAll is returning success but without any properties,
when the only find() callback had returned 0 to mean "no object found".
After:
Could not get properties: Unknown object:
'/org/freedesktop/login1/user/self'
BTW I have a fix for more user-friendly messages from logind in this case.
It is pending in my local branch for #6829 "fix `loginctl enable-linger`".
Ivan Kurnosov [Sun, 17 Sep 2017 11:09:38 +0000 (23:09 +1200)]
Fix for dst/non-dst timezones
The problem was with the tm.tm_isdst that is set to the current environment
value: either DST or not. While the current state is not relevant to the state
in the desired date.
Hence — it should be reset so that the mktime_or_timegm could normalise it
later.
Zbigniew Jędrzejewski-Szmek [Sun, 17 Sep 2017 07:10:03 +0000 (09:10 +0200)]
Simplify the if cases for timezone checking
Just to reduce the indentation a bit.
Ivan Kurnosov [Wed, 6 Sep 2017 09:56:36 +0000 (21:56 +1200)]
Added timezone to the CalendarSpec, parser/formatter and the timedatectl
Zbigniew Jędrzejewski-Szmek [Fri, 15 Sep 2017 12:59:45 +0000 (14:59 +0200)]
man: use "filename" not "file name" by default
We settled on "filename" and "file system", so change a couple of places for
consistency. The exception is when there's an adjective before "file" that
binds more strongly then "name": "password file name", "output file name", etc.
Those cases are left intact.
Lennart Poettering [Thu, 14 Sep 2017 19:19:05 +0000 (21:19 +0200)]
core: add new per-unit setting KeyringMode= for controlling kernel keyring setup
Usually, it's a good thing that we isolate the kernel session keyring
for the various services and disconnect them from the user keyring.
However, in case of the cryptsetup key caching we actually want that
multiple instances of the cryptsetup service can share the keys in the
root user's user keyring, hence we need to be able to disable this logic
for them.
This adds KeyringMode=inherit|private|shared:
inherit: don't do any keyring magic (this is the default in elogind --user)
private: a private keyring as before (default in elogind --system)
shared: the new setting
Zbigniew Jędrzejewski-Szmek [Fri, 15 Sep 2017 12:47:57 +0000 (14:47 +0200)]
build-sys: require libmount >= 2.30 (#6795)
Fixes #4871.
The new libmount has two changes relevant for us:
- x-* options are propagated to /run/mount/utab and are visible through
libmount (fixes #4817).
- umount -c now really works (partially solves #6115).
Susant Sahani [Thu, 14 Sep 2017 19:51:39 +0000 (19:51 +0000)]
networkd: add support to configure IP Rule (#5725)
Routing Policy rule manipulates rules in the routing policy database control the
route selection algorithm.
This work supports to configure Rule
```
[RoutingPolicyRule]
TypeOfService=0x08
Table=7
From= 192.168.100.18
```
```
ip rule show
0: from all lookup local
0: from 192.168.100.18 tos 0x08 lookup 7
```
V2 changes:
1. Added logic to handle duplicate rules.
2. If rules are changed or deleted and networkd restarted
then those are deleted when networkd restarts next time
V3:
1. Add parse_fwmark_fwmask
Lennart Poettering [Thu, 14 Sep 2017 14:54:32 +0000 (16:54 +0200)]
conf-parser: when the empty string assigned to Personality= reset it
Let's support assigning the empty string to reset things in one more
place.
Lennart Poettering [Thu, 14 Sep 2017 14:53:34 +0000 (16:53 +0200)]
core: don't synthesize empty list when empty string is read in config_parse_strv()
This was added to make
https://bugs.freedesktop.org/show_bug.cgi?id=62558 work, which has long
been removed, hence let's revert to the original behaviour and fully
flush out the list when an empty string is assigned.
Michael Grzeschik [Thu, 14 Sep 2017 12:53:07 +0000 (14:53 +0200)]
rules: ubi mtd - add link to named partitions (#6750)
[zjs:
- rebase onto recent master
- drop signed-off-by]
Zbigniew Jędrzejewski-Szmek [Thu, 14 Sep 2017 09:55:00 +0000 (11:55 +0200)]
man: unify titling, fix description of precedence in sysusers.d(5)
Fixes #6639.
(This behaviour of elogind-sysusers is long established, so it's better
to adjust the documentation rather than change the code. If there are any
situations out there where it matters, users must have adjusted to the
current behaviour.)
Zbigniew Jędrzejewski-Szmek [Thu, 14 Sep 2017 07:20:27 +0000 (09:20 +0200)]
nss: use secure_getenv for behaviour-modifying booleans (#6817)
Follow up for
fe102d6ab15731a199a7ea9f38c4f68d8959f86c.
Davide Cavalca [Thu, 14 Sep 2017 04:14:29 +0000 (00:14 -0400)]
basic: ensure O_TMPFILE is always defined (#6816)
Lennart Poettering [Wed, 13 Sep 2017 17:08:26 +0000 (19:08 +0200)]
sd-bus: extend D-Bus authentication timeout considerably (#6813)
As it turns out the authentication phase times out too often than is
good, mostly due to PRNG pools not being populated during boot. Hence,
let's increase the authentication timeout from 25s to 90s, to cover for
that.
(Note that we leave the D-Bus method call timeout at 25s, matching the
reference implementation's value. And if the auth phase managed to
complete then the pools should be populated enough and mehtod calls
shouldn't take needlessly long anymore).
Fixes: #6418
Franck Bui [Wed, 13 Sep 2017 09:47:15 +0000 (11:47 +0200)]
util: make get_block_device() available
Lennart Poettering [Wed, 13 Sep 2017 09:41:41 +0000 (11:41 +0200)]
conf-files: log when we skip a drop-in configuration file
Lennart Poettering [Tue, 12 Sep 2017 14:57:33 +0000 (16:57 +0200)]
exec-util,conf-files: skip non-executable files in execute_directories()
Fixes: #6787
Lennart Poettering [Wed, 13 Sep 2017 08:35:28 +0000 (10:35 +0200)]
pager: let's create pager fds with O_CLOEXEC first
We make copies (without O_CLOEXEC) of the fds anyway before using them,
hence let's be safe and create them with O_CLOEXEC first, so that we
don't run into issues should pager_open() be called in a threaded
environment where another thread fork()s at the wrong time and ends up
with fds not marked O_CLOEXEC.
Lennart Poettering [Sat, 9 Sep 2017 20:48:35 +0000 (22:48 +0200)]
systemctl: don't do ANSI underlining on TERM=linux (#6778)
The linux console apparently can't do underlining, hence let's not do it
on the console.
Also see: #6601
Lennart Poettering [Fri, 8 Sep 2017 14:16:29 +0000 (16:16 +0200)]
util-lib: wrap personality() to fix up broken glibc error handling (#6766)
glibc appears to propagate different errors in different ways, let's fix
this up, so that our own code doesn't get confused by this.
See #6752 + #6737 for details.
Fixes: #6755
Yu Watanabe [Tue, 5 Sep 2017 06:12:55 +0000 (15:12 +0900)]
shared: allow to input empty string to config_parse_path()
Fixes #6633.
Zbigniew Jędrzejewski-Szmek [Mon, 4 Sep 2017 16:49:12 +0000 (19:49 +0300)]
build-sys: make nonnull warning non-fatal (#6742)
Seems to be some kind of confusion in gcc. Insteading of playing whack-a-mole and
adding work-arounds in code, let's adjust the compilation options instead.
Fixes #6119, replaces #6657.
NeilBrown [Mon, 4 Sep 2017 13:35:07 +0000 (23:35 +1000)]
tmpfiles: silently ignore any path that passes through autofs (#6506)
If a path passes though an autofs filesystem, then accessing
the path might trigger and automount. As elogind-tmpfiles is run before
the network is up, and as automounts are often used for networked
filesystems, this can cause a deadlock.
So chase_symlinks is enhance to accept a new flag which tells it
to check for autofs, and return -EREMOTE if autofs is found.
tmpfiles is changed to check just before acting on a path so that it
can avoid autofs even if a symlink was created earlier by tmpfiles
that would send this path through an autofs.
This fixes a deadlock that happens when /home is listed in /etc/fstab as
x-elogind.automount for an NFS directory.
Yu Watanabe [Mon, 4 Sep 2017 01:55:51 +0000 (10:55 +0900)]
elogind-mount: allow to specify an arbitrary string for arg_mount_what when vfs is used
Fixes #6591.
Lennart Poettering [Fri, 1 Sep 2017 00:09:32 +0000 (02:09 +0200)]
terminal: unify code for resetting kbd utf8 mode a bit (#6692)
We have the same code at two places, let's unify that at one place.
Follow-up for #6606
Lennart Poettering [Thu, 31 Aug 2017 08:25:06 +0000 (10:25 +0200)]
tree-wide: use pid_is_valid() at more places
Evgeny Vereshchagin [Thu, 31 Aug 2017 08:38:30 +0000 (11:38 +0300)]
sd-bus: use -- when passing arguments to ssh (#6706)
This prevents `systemctl` from runnning /bin/touch when the following
command is used:
```
systemctl -H '-oProxyCommand=/bin/touch i-shouldnt-be-here' show-environment
```
Topi Miettinen [Thu, 31 Aug 2017 08:37:32 +0000 (08:37 +0000)]
log: reopen log for failed assertions (#6703)
Reopen log so that failed and aborting assertions can be written to log.
Closes: #6658
Yu Watanabe [Thu, 31 Aug 2017 08:02:33 +0000 (17:02 +0900)]
bus-util: remove unnecessary initializations
Yu Watanabe [Thu, 31 Aug 2017 08:07:16 +0000 (17:07 +0900)]
systemctl: show capabilities in human readable format
Follow-up for
21771f338d268e06dc9a10b9b08b14ff8217d4be.
Davide Cavalca [Wed, 30 Aug 2017 15:34:44 +0000 (08:34 -0700)]
meson: add . to include_directories (#6634)
Alan Jenkins [Wed, 30 Aug 2017 15:06:12 +0000 (16:06 +0100)]
logind: VT_GETSTATE "cannot return state for more than 16 VTs" (#6625)
`vt_is_busy(16)` would always return FALSE. So we could have started
autovt@16.service even when VT 16 was already being used for something.
Davide Cavalca [Wed, 30 Aug 2017 15:04:53 +0000 (08:04 -0700)]
meson: use current_source_dir() to scope git invocations (#6635)
Tom Gundersen [Wed, 30 Aug 2017 11:09:03 +0000 (13:09 +0200)]
sd-bus: socket - only transmit auxillary FDs once (#6603)
If a message is too large to fit into the output buffer, it will be
transmitted to the kernel in several chunks. However, the FDs must
only ever be transmitted once or they will bereceived by the remote
end repeatedly.
The D-Bus specification disallows several sets of FDs attached to
one message, however, the reference implementation of D-Bus will
not reject such a message, rather it will reassign the duplicate
FDs to subsequent FD-carrying messages.
This attaches the FD array only to the first byte of the message.
g0tar [Wed, 30 Aug 2017 08:00:44 +0000 (10:00 +0200)]
terminal reset should honour default_utf8 kernel setting (#6606)
terminal reset should honour default_utf8 kernel setting
Lennart Poettering [Wed, 9 Aug 2017 18:40:26 +0000 (20:40 +0200)]
seccomp: default to something resembling the current personality when locking it
Let's lock the personality to the currently set one, if nothing is
specifically specified. But do so with a grain of salt, and never
default to any exotic personality here, but only PER_LINUX or
PER_LINUX32.
dasj19 [Mon, 28 Aug 2017 16:24:09 +0000 (18:24 +0200)]
Added Romanian Translation (#6674)
Alan Jenkins [Thu, 24 Aug 2017 14:21:21 +0000 (15:21 +0100)]
logind: tighten assertion in execute_shutdown_or_sleep()
Following commit
b498d6ea, I belated realized we should tighten the
assertions as well, to make sure that we're setting `m->action_what` to
represent an action in progress. (The check for an action in progress is
to compare `m->action_what` to zero)
Alan Jenkins [Thu, 24 Aug 2017 09:33:24 +0000 (10:33 +0100)]
logind: add missing resume signal when we fail to initiate sleep/shutdown
This fixed https://bugzilla.redhat.com/show_bug.cgi?id=
1476313
as much as I was able to reproduce it in a VM, at least.
E.g. this signal might wake the screen back up, providing a more visible
indicator of suspend failure. In my VM testing, it was also required in
order to unblock keyboard input in gnome-shell after the failed suspend.
At the same time, fix the error handling for scheduled shutdowns. This now
mirrors the behaviour of when you use `shutdown -k` - it sends all the
scary messages about shutting down, "but you'll have to do it [shut down
the system] yourself". It also avoids the risk of locking out the admin
(nologin file), in case they logged out for some reason (and they use
`sudo` instead of root).
Not that I have any idea why you'd want to use `shutdown -k`, but the code
is easier to analyze if it rolls back on error (in the absence of any code
comment as to why that's not wanted).
Alan Jenkins [Mon, 21 Aug 2017 16:28:35 +0000 (17:28 +0100)]
logind: respect "delay" inhibitors in scheduled shutdowns
There is no justification not to wait an extra (default) 5 seconds, for
a more graceful shutdown of user programs. Again, you don't get to ignore
delay inhibitors for unscheduled shutdowns, short of
`systemctl poweroff -f`.
It is simplest if we move the test for `m->shutdown_dry_run` into
manager_scheduled_shutdown_handler().
However we need to not add such delays during a "dry run". Otherwise, we
would still have to be considered "in progress" for some seconds after our
admin has seen the final wall message. If they go to `poweroff`, we would
have blocked them with a misleading error message. Note this `poweroff`
will still process delay inhibitors as needed. If the admin planned to
use a more forceful method... eh. It's their responsibility to assess
whether that's safe.
There is an argument that the alternative behaviour could be used (racily!)
to kludge around them not being able to shutdown to "single user mode". If
we cared about that case, we would have easily preserved non-racy support
for it in `shutdown`.
Additionally, though I think this code does read more easily by reducing
inconsistencies, we didn't come up with any use case for delay inhibitors
v.s. shutdown.[1] The SIGTERM v.s. SIGKILL delay is more general, and we
allow a whole 90 seconds for it, not just 5. So I don't think keeping this
approach bears a risk of significant damage.
[1] https://www.freedesktop.org/wiki/Software/elogind/inhibit/
Alan Jenkins [Mon, 21 Aug 2017 10:49:25 +0000 (11:49 +0100)]
logind: add missing check for conflicting operation v.s. scheduled shutdown
> We don't want to shutdown while a suspend is running, and vice versa.
> This would be confusing and could lead to data loss in the worst case.
https://bugs.launchpad.net/ubuntu/+source/elogind/+bug/
1441253/comments/4
According to the above comment, if the conflicting operation is hung,
we don't want to force things when the admin has not passed a force option.
Similarly if you're not an admin, you probably shouldn't get to sneak
around this check by using a scheduled shutdown instead of an unscheduled
one. (And no-one so far thought it necessary to add such a permission in
PolKit).
Note that if the conflicting operation was _not_ hung, and we lost the
race with suspend, the system might not have shut down at the scheduled
time anyway. Which is no good if you were scheduling a power outage.
And scheduling a shutdown for an arbitrary time when the system is resumed,
does not seem a very useful semantic. More likely, scheduled shutdowns are
useful on systems which do not use suspend, such as multi-user servers.
(In which case even PolKit defaults likely don't let the users trigger
suspend).
Alan Jenkins [Tue, 22 Aug 2017 12:54:21 +0000 (13:54 +0100)]
logind: method_schedule_shutdown() already rejects empty `type`
Don't test for an empty `type` afterwards. This is not how you cancel
scheduled shutdowns - there's a separate method for that.
Felipe Sateler [Mon, 21 Aug 2017 12:48:41 +0000 (09:48 -0300)]
build-sys: don't build networkctl if networkd is disabled
Lennart Poettering [Wed, 9 Aug 2017 13:07:15 +0000 (15:07 +0200)]
capability: add new ambient_capabilities_supported() helper
This new function reports whether ambient caps are available, and should
be quick because the result is cached.
Lennart Poettering [Wed, 9 Aug 2017 13:05:36 +0000 (15:05 +0200)]
capability: change capability_bounding_set_drop() to be work without privileges when executing a NOP
This way daemons which already dropped all caps may use the call to
drop priviliges again, which becomes a non-failing NOP.
Lennart Poettering [Wed, 9 Aug 2017 17:03:39 +0000 (19:03 +0200)]
tree-wide: use path_startswith() rather than startswith() where ever that's appropriate
When checking path prefixes we really should use the right APIs, just in
case people add multiple slashes to their paths...
Lennart Poettering [Wed, 9 Aug 2017 17:01:18 +0000 (19:01 +0200)]
util-lib: add a new skip_dev_prefix() helper
This new helper removes a leading /dev if there is one. We have code
doing this all over the place, let's unify this, and correct it while
we are at it, by using path_startswith() rather than startswith() to
drop the prefix.
shwsh [Tue, 5 Sep 2017 15:23:33 +0000 (22:23 +0700)]
Prep v235: Update test-login.c
* Merge pull request #29 from shwsh/master
Sven Eden [Fri, 1 Sep 2017 11:35:48 +0000 (13:35 +0200)]
Prep v235: Allow elogind to be auto-started by dbus requests
Sven Eden [Fri, 1 Sep 2017 11:22:46 +0000 (13:22 +0200)]
Prep v235: Fix pam_elogind
Sven Eden [Thu, 31 Aug 2017 15:34:31 +0000 (17:34 +0200)]
Prep v235: systemd installs in /lib/systemd, so we install in /lib/elogind.
Sven Eden [Thu, 31 Aug 2017 14:44:51 +0000 (16:44 +0200)]
Prep v235: Catch and react on SIGINT, SIGQUIT and SIGTERM
Sven Eden [Thu, 31 Aug 2017 05:58:32 +0000 (07:58 +0200)]
Prep v235: Fix startup order and add debug logging.
Sven Eden [Wed, 30 Aug 2017 08:59:42 +0000 (10:59 +0200)]
Prep v235: Do not write an early PID file, if elogind is going to be daemonized.
Sven Eden [Wed, 30 Aug 2017 05:49:50 +0000 (07:49 +0200)]
Prep v235: Apply pending upstream updates in src/test [4/4]
Sven Eden [Wed, 30 Aug 2017 05:49:50 +0000 (07:49 +0200)]
Prep v235: Apply pending upstream updates in src/login [3/4]
Sven Eden [Wed, 30 Aug 2017 05:49:50 +0000 (07:49 +0200)]
Prep v235: Apply pending upstream updates in src/core [2/4]
Sven Eden [Wed, 30 Aug 2017 05:49:50 +0000 (07:49 +0200)]
Prep v235: Apply pending upstream updates in src/basic [1/4]
Sven Eden [Wed, 30 Aug 2017 05:48:30 +0000 (07:48 +0200)]
Prep 235: add missing libshared.sym and remove obsolete kdbus.h
Sven Eden [Wed, 30 Aug 2017 05:47:40 +0000 (07:47 +0200)]
Prep v235: optimize elogind extra startup functionality
Alan Jenkins [Tue, 29 Aug 2017 09:56:32 +0000 (10:56 +0100)]
fileio: rename function parameter to avoid masking global symbol
> glibc exports a function called sync(), we should probably avoid
> overloading that as a variable here locally (gcc even used to warn about
> that, not sure why it doesn't anymore), to avoid confusion around what
> "if (sync)" actually means
Felipe Sateler [Mon, 28 Aug 2017 16:49:03 +0000 (13:49 -0300)]
shared: Add a linker script so that all functions are tagget @SD_SHARED instead of @Base (#6669)
This helps prevent symbol collisions with other programs and libraries. In particular,
because PAM modules are loaded into the process that is creating the session, and
elogind creates PAM sessions, the potential for collisions is high.
Disambiguate all elogind calls by tagging a 'version' SD_SHARED.
Fixes #6624
Jason Gunthorpe [Mon, 28 Aug 2017 15:22:10 +0000 (09:22 -0600)]
Support 'rdma' as a ListenNetlink= argument (#6626)
NETLINK_RDMA has been in the kernel since v3.0.
Lennart Poettering [Sat, 26 Aug 2017 13:19:26 +0000 (15:19 +0200)]
logind: make sure we don't process the same method call twice (#6583)
Tiny mistake, big effect.
Fixes: #6375
Alan Jenkins [Thu, 17 Aug 2017 16:09:44 +0000 (17:09 +0100)]
"Don't fear the fsync()"
For files which are vital to boot
1. Avoid opening any window where power loss will zero them out or worse.
I know app developers all coded to the ext3 implementation, but
the only formal documentation we have says we're broken if we actually
rely on it. E.g.
* `man mount`, search for `auto_da_alloc`.
* http://www.linux-mtd.infradead.org/faq/ubifs.html#L_atomic_change
* https://thunk.org/tytso/blog/2009/03/15/dont-fear-the-fsync/
2. If we tell the kernel we're interested in writing them to disk, it will
tell us if that fails. So at minimum, this means we play our part in
notifying the user about errors.
I refactored error-handling in `udevadm-hwdb` a little. It turns out I did
exactly the same as had already been done in the `elogind-hwdb` version,
i.e. commit
d702dcd.
Lennart Poettering [Wed, 9 Aug 2017 13:05:36 +0000 (15:05 +0200)]
capability: change capability_bounding_set_drop() to be work without privileges when executing a NOP
This way daemons which already dropped all caps may use the call to
drop priviliges again, which becomes a non-failing NOP.
Lennart Poettering [Wed, 9 Aug 2017 10:46:09 +0000 (12:46 +0200)]
mkdir: chmod_and_chown() returns errors as "return -errno", not in errno itself
Lennart Poettering [Wed, 9 Aug 2017 17:04:36 +0000 (19:04 +0200)]
pam_logind: skip leading /dev/ from PAM_TTY field before passing it on
Apparently, PAM documents that the PAM_TTY should come with a /dev
prefix, but we don't expect it so far, except that Wayland ends up
setting it after all, the way the docs suggest. Hence, let's simply drop
the /dev prefix if it is there.
Fixes: #6516
Sven Eden [Tue, 29 Aug 2017 14:37:03 +0000 (16:37 +0200)]
Prep v235: Set defaults for the sleep config *after* loading the config file.
Sven Eden [Tue, 22 Aug 2017 14:55:10 +0000 (16:55 +0200)]
Prep v235: Fix pkgconfig/libelogind.pc
Sven Eden [Fri, 18 Aug 2017 13:00:44 +0000 (15:00 +0200)]
Prep v235: Use the new ELOGIND_PID_FILE macro consistently
Sven Eden [Wed, 16 Aug 2017 08:28:51 +0000 (10:28 +0200)]
Prep v235: Allow elogind to daemonize itself with "-D|--daemon".
Sven Eden [Wed, 16 Aug 2017 08:19:14 +0000 (10:19 +0200)]
Prep v235: Cleaned up a stray mask-end-start chain.
Sven Eden [Tue, 15 Aug 2017 04:56:29 +0000 (06:56 +0200)]
Prep v235: Update build system to fit elogind
- Update man/rules/meson.build with elogind set of xml files.
- Update documentation generating tools to fit elogind.
- Follow upstream and link against libelogind-shared-<version>.so
Sven Eden [Mon, 14 Aug 2017 08:18:50 +0000 (10:18 +0200)]
Prep v235: Add missing includes and dependencies.
Sven Eden [Mon, 14 Aug 2017 07:16:16 +0000 (09:16 +0200)]
Prep v235: Apply upstream fixes (10/10) [src/update-utmp]
Sven Eden [Mon, 14 Aug 2017 07:16:16 +0000 (09:16 +0200)]
Prep v235: Apply upstream fixes (9/10) [src/test]
Sven Eden [Mon, 14 Aug 2017 07:16:16 +0000 (09:16 +0200)]
Prep v235: Apply upstream fixes (8/10) [src/systemd]
Sven Eden [Mon, 14 Aug 2017 07:16:16 +0000 (09:16 +0200)]
Prep v235: Apply upstream fixes (7/10) [src/shared]