chiark / gitweb /
6 years agobus: fix callback index when dispatching kernel messages
Lennart Poettering [Fri, 29 Nov 2013 21:02:14 +0000 (22:02 +0100)]
bus: fix callback index when dispatching kernel messages

6 years agobus: add the ability for backends to queue to input messages at the same time
Lennart Poettering [Fri, 29 Nov 2013 20:29:16 +0000 (21:29 +0100)]
bus: add the ability for backends to queue to input messages at the same time

We need this so that one incoming kernel message can result in two
high-level bus messages, for the case where we synthesize NameAcquired
and NameOwnerChanged in the same instance.

6 years agolibsystemd-bus: sd_bus_request_name: use kdbus_translate_request_name_flags()
Daniel Mack [Fri, 29 Nov 2013 20:58:39 +0000 (21:58 +0100)]
libsystemd-bus: sd_bus_request_name: use kdbus_translate_request_name_flags()

6 years agolibsystemd-bus: rename sd_bus_kernel_translate_request_name_flags
Daniel Mack [Fri, 29 Nov 2013 20:14:07 +0000 (21:14 +0100)]
libsystemd-bus: rename sd_bus_kernel_translate_request_name_flags

... to keep the namespace clean.

6 years agolibsystemd-bus: add kdbus support for sd_bus_get_owner()
Daniel Mack [Fri, 29 Nov 2013 19:44:10 +0000 (20:44 +0100)]
libsystemd-bus: add kdbus support for sd_bus_get_owner()

6 years agolibsystemd-bus: add sd_bus_translate_attach_flags()
Daniel Mack [Fri, 29 Nov 2013 16:21:39 +0000 (17:21 +0100)]
libsystemd-bus: add sd_bus_translate_attach_flags()

Factor out code from sd_bus_negotiate_attach_creds() to a generic
translate function, so it can be used from other places.

6 years agolibsystemd-bus: factor out DBus bits out of sd_bus_get_owner()
Daniel Mack [Fri, 29 Nov 2013 15:52:06 +0000 (16:52 +0100)]
libsystemd-bus: factor out DBus bits out of sd_bus_get_owner()

Just a preparation for upcoming kdbus support.

6 years agobus: do not fail if "comm" information cannot be retrieved from /proc
Kay Sievers [Fri, 29 Nov 2013 20:34:14 +0000 (21:34 +0100)]
bus: do not fail if "comm" information cannot be retrieved from /proc

6 years agobus: fix size calculation for match data
Kay Sievers [Fri, 29 Nov 2013 20:03:54 +0000 (21:03 +0100)]
bus: fix size calculation for match data

6 years agobus: when synthesizing messages locally, fill in a sender
Lennart Poettering [Fri, 29 Nov 2013 19:10:08 +0000 (20:10 +0100)]
bus: when synthesizing messages locally, fill in a sender

6 years agobusctl: fix --help line breaks
Lennart Poettering [Fri, 29 Nov 2013 19:08:54 +0000 (20:08 +0100)]
busctl: fix --help line breaks

6 years agokdbus: synthesize NameOwnerChange signals from kernel messages and support matches...
Lennart Poettering [Fri, 29 Nov 2013 19:07:56 +0000 (20:07 +0100)]
kdbus: synthesize NameOwnerChange signals from kernel messages and support matches against NameOwnerChange

6 years agokdbus: add base enums for items
Lennart Poettering [Fri, 29 Nov 2013 19:09:41 +0000 (20:09 +0100)]
kdbus: add base enums for items

6 years agobus: do not fail if task information cannot be retrieved from /proc
Kay Sievers [Fri, 29 Nov 2013 18:46:59 +0000 (19:46 +0100)]
bus: do not fail if task information cannot be retrieved from /proc

6 years agolibsystemd-bus: clean up bus-control.c file
Lukasz Skalski [Fri, 29 Nov 2013 16:57:00 +0000 (17:57 +0100)]
libsystemd-bus: clean up bus-control.c file

6 years agobus: do not fail if cgroup information cannot be retrieved from /proc
Kay Sievers [Fri, 29 Nov 2013 17:57:06 +0000 (18:57 +0100)]
bus: do not fail if cgroup information cannot be retrieved from /proc

6 years agolibsystemd-bus: catch up with latest kdbus changes
Kay Sievers [Fri, 29 Nov 2013 17:37:39 +0000 (18:37 +0100)]
libsystemd-bus: catch up with latest kdbus changes

6 years agolibsystemd-bus: follow kdbus renames
Daniel Mack [Fri, 29 Nov 2013 17:10:36 +0000 (18:10 +0100)]
libsystemd-bus: follow kdbus renames

kdbus now has more generic names for the items it passes around. That
allows for usage from other contexts.

6 years agohwdb: Update database of Bluetooth company identifiers
Marcel Holtmann [Fri, 29 Nov 2013 15:26:47 +0000 (07:26 -0800)]
hwdb: Update database of Bluetooth company identifiers

6 years agolibsystemd-bus: copy over kdbus provided 128-bit bus id
Daniel Mack [Fri, 29 Nov 2013 15:24:40 +0000 (16:24 +0100)]
libsystemd-bus: copy over kdbus provided 128-bit bus id

kdbus now copies the bus unique id back to userspace in the hello
ioctl(). Use these bytes to set the server id of the sd_bus.

6 years agolibsystemd-bus: catch up with latest kdbus changes
Daniel Mack [Fri, 29 Nov 2013 14:36:37 +0000 (15:36 +0100)]
libsystemd-bus: catch up with latest kdbus changes

kdbus_cmd_hello now has a new uint64_t flags field for the requested
attachments. Follow that change in libsystemd-bus.

6 years agosystemd-stdio-bridge: make it socket-activatable and usable as kdbus bridge
Daniel Mack [Fri, 15 Nov 2013 17:05:27 +0000 (18:05 +0100)]
systemd-stdio-bridge: make it socket-activatable and usable as kdbus bridge

Augment systemd-stdio-bridge a bit to make it a 1:1 bridge from legacy
DBus clients to kdbus. In particular,

 * allow setting the bus path of the upstream bus as command line
 * use sd_listen_fds() for systemd's socket activation
 * omit calling sd_bus_negotiate_fds() when upstream bus is kdbus
 * reply to bus send errors with proper dbus error messages
 * treat -ECONNRESET as expected end-of-connection condition

6 years agolibsystemd-bus: sd_bus_request_name: fix return value for kdbus
Daniel Mack [Tue, 26 Nov 2013 16:24:18 +0000 (17:24 +0100)]
libsystemd-bus: sd_bus_request_name: fix return value for kdbus

kdbus returns -EALREADY if the requesting connection is already the
owner of a name, and -EEXIST if the name already exists and the
connection is not able to take it over.

Also, n->flags needs a translation as well to match the SD_BUS_* enum

6 years agolibsystemd-bus: kernel: add sd_bus_kernel_translate_request_name_flags
Daniel Mack [Tue, 26 Nov 2013 15:45:50 +0000 (16:45 +0100)]
libsystemd-bus: kernel: add sd_bus_kernel_translate_request_name_flags

Flags used to request a name from kdbus are not identical to what DBus
and sd_bus use internally. Introduce a simple function to do the
translation for us. It's factored out to a separate function so the
dbus-driver instance can make use of it as well.

6 years agolibsystemd-bus: make sd_bus_list_names return all connections, including unique names
Daniel Mack [Tue, 19 Nov 2013 15:33:05 +0000 (16:33 +0100)]
libsystemd-bus: make sd_bus_list_names return all connections, including unique names

6 years agolibsystemd-bus: add kdbus support for sd_bus_list_names()
Daniel Mack [Fri, 15 Nov 2013 15:04:32 +0000 (16:04 +0100)]
libsystemd-bus: add kdbus support for sd_bus_list_names()

kdbus will tell us the minimum buffer size it needs in case the default
8kb buffer doesn't suffice.

6 years agolibsystemd-bus: bring definitions in sync with kdbus
Daniel Mack [Fri, 15 Nov 2013 14:55:27 +0000 (15:55 +0100)]
libsystemd-bus: bring definitions in sync with kdbus

In particular, KDBUS_ITEM_NEXT is now called KDBUS_PART_NEXT, and
KDBUS_ITEM_FOREACH was renamed to KDBUS_PART_FOREACH and takes one more
argument to make it more flexible.

6 years agobus: when turning a buffer into a sd_bus_message avoid creating zero-length parts
Lennart Poettering [Fri, 29 Nov 2013 12:34:16 +0000 (13:34 +0100)]
bus: when turning a buffer into a sd_bus_message avoid creating zero-length parts

6 years agoRevert "build-sys: avoid warnings from assert_cc"
Lennart Poettering [Fri, 29 Nov 2013 01:09:58 +0000 (02:09 +0100)]
Revert "build-sys: avoid warnings from assert_cc"

This reverts commit f1a1264d13b31b9f5521f482d9a5a9d78da55efb.

We can turn this off with a pragma only on old gcc. Newer gcc doesn't
need this, so let's not turn this off for everybody.

6 years agobus: creds - ignore EINVAL when acessing the (inactive) LSM /proc interface
Kay Sievers [Fri, 29 Nov 2013 10:52:22 +0000 (11:52 +0100)]
bus: creds - ignore EINVAL when acessing the (inactive) LSM /proc interface

6 years agobus: Add KDBUS_MSG_SRC_NAMES to bus_kernel_make_message() function
Lukasz Skalski [Fri, 29 Nov 2013 10:37:10 +0000 (11:37 +0100)]
bus: Add KDBUS_MSG_SRC_NAMES to bus_kernel_make_message() function

6 years agobusctl: drop bus driver name from list of services
Lennart Poettering [Thu, 28 Nov 2013 19:43:25 +0000 (20:43 +0100)]
busctl: drop bus driver name from list of services

6 years agobus: merge sd_bus_get_owner() and sd_bus_get_owner_creds() into one call
Lennart Poettering [Thu, 28 Nov 2013 19:41:55 +0000 (20:41 +0100)]
bus: merge sd_bus_get_owner() and sd_bus_get_owner_creds() into one call

Since the backing ioctl for this on kdbus is the same we retain
atomicity this way.

6 years agoRemove some unused variables
Zbigniew Jędrzejewski-Szmek [Thu, 28 Nov 2013 19:20:07 +0000 (14:20 -0500)]
Remove some unused variables

6 years agobuild-sys: use C99
Zbigniew Jędrzejewski-Szmek [Wed, 20 Nov 2013 20:43:50 +0000 (15:43 -0500)]
build-sys: use C99

We already use various constructs, so let's just admit that we're using C99.

6 years agovirt: split detect_vm into separate functions
Zbigniew Jędrzejewski-Szmek [Thu, 28 Nov 2013 18:34:08 +0000 (13:34 -0500)]
virt: split detect_vm into separate functions

It didn't build on arm. Let's simplify it a bit by
splitting x86 specific parts out, which should also make
things easier when arm virtualization support is added.

6 years agobuild-sys: make multi-seat-x optional
Zbigniew Jędrzejewski-Szmek [Thu, 28 Nov 2013 17:07:29 +0000 (12:07 -0500)]
build-sys: make multi-seat-x optional

At some point it should become disabled by default.

6 years agocore: fix SetUnitProperties
Marc-Antoine Perennou [Tue, 26 Nov 2013 03:42:17 +0000 (12:42 +0900)]
core: fix SetUnitProperties

6 years agoRevert "link-config: match length for kernel commandline option"
Tom Gundersen [Thu, 28 Nov 2013 19:06:42 +0000 (20:06 +0100)]
Revert "link-config: match length for kernel commandline option"

This reverts commit da66338e17f4df04d9d7cc22ec971b416d57761e.

It is superseeded by 70f75a523b16ad495a7791d595ee3eececf75953

6 years agoclean up TODO
Lennart Poettering [Thu, 28 Nov 2013 17:42:00 +0000 (18:42 +0100)]
clean up TODO

6 years agobus: add new sd_bus_creds object to encapsulate process credentials
Lennart Poettering [Thu, 28 Nov 2013 16:50:02 +0000 (17:50 +0100)]
bus: add new sd_bus_creds object to encapsulate process credentials

This way we can unify handling of credentials that are attached to
messages, or can be queried for bus name owners or connection peers.

This also adds the ability to extend incomplete credential information
with data from /proc,

Also, provide a convenience call that will automatically determine the
most appropriate credential object for an incoming message, by using the
the attached information if possible, the sending name information if
available and otherwise the peer's credentials.

6 years agoutil: fix handling of trailing whitespace in split_quoted()
Lennart Poettering [Wed, 27 Nov 2013 21:37:52 +0000 (22:37 +0100)]
util: fix handling of trailing whitespace in split_quoted()

Inspired by a patch by Lukas Nykryn.

6 years agoman: move socket-proxyd man page to section 8, since it is not in the $PATH
Lennart Poettering [Wed, 27 Nov 2013 20:14:56 +0000 (21:14 +0100)]
man: move socket-proxyd man page to section 8, since it is not in the $PATH

6 years agoman: get rid of shell script example in systemd-socket-proxyd man page
Lennart Poettering [Wed, 27 Nov 2013 20:14:08 +0000 (21:14 +0100)]
man: get rid of shell script example in systemd-socket-proxyd man page

6 years agoRevert "socket-proxyd: Add --listener option for listener/destination pairs."
Lennart Poettering [Wed, 27 Nov 2013 19:55:15 +0000 (20:55 +0100)]
Revert "socket-proxyd: Add --listener option for listener/destination pairs."

This reverts commit adcf4c81c58511b67644e17fa743d1729d3c9ccf.

We have a better solution for the problem of making two processes run in
the same namespace, and --listener is not needed hence and should be


6 years agologind: remove unused session->closing field
David Herrmann [Thu, 28 Nov 2013 16:29:01 +0000 (17:29 +0100)]
logind: remove unused session->closing field

This field is always false, drop it. If you want a reliable way to get
session state, call session_get_state(). Testing for any flags directly
doesn't work currently so don't pretend it would.

6 years agologind: require VTs on seat0 and forbid elsewhere
David Herrmann [Thu, 28 Nov 2013 16:25:25 +0000 (17:25 +0100)]
logind: require VTs on seat0 and forbid elsewhere

Sessions on seat0 must pass us a vtnr, otherwise, you shouldn't try
attaching it to seat0. For seats without VTs, we do the exact opposite: we
forbid VTs.

There can be odd situations if the session-files contain invalid
combinations. However, we try to keep sessions alive and restore state as
good as possible.

6 years agologind: make VT numbers unsigned
David Herrmann [Thu, 28 Nov 2013 16:05:34 +0000 (17:05 +0100)]
logind: make VT numbers unsigned

Fix the whole code to use "unsigned int" for vtnr. 0 is an invalid vtnr so
we don't need negative numbers at all.

Note that most code already assumes it's unsigned so in case there's a
negative vtnr, our code may, under special circumstances, silently break.
So this patch makes sure all sources of vtnrs verify the validity. Also
note that the dbus api already uses unsigned ints.

6 years agonetworkd: fix several Address entries in [Network] section
Tom Gundersen [Thu, 28 Nov 2013 16:17:04 +0000 (17:17 +0100)]
networkd: fix several Address entries in [Network] section

6 years agoevent: allow EPOLLET as event flag
David Herrmann [Wed, 27 Nov 2013 09:36:35 +0000 (10:36 +0100)]
event: allow EPOLLET as event flag

EPOLLET enables edge-triggered mode (see epoll(7) for more). For most
use-cases, level-triggered is just fine, but for master-TTYs we need
edge-triggered to catch EPOLLHUP. master-TTYs signal EPOLLHUP if no client
is connected, but a client may connect some time later (same happens
during vhangup(2)).

However, epoll doesn't allow masking EPOLLHUP so it's signaled constantly.
To avoid this, edge-triggered mode is needed.

6 years agologind: mute/restore VT on behalf of session controllers
David Herrmann [Thu, 28 Nov 2013 14:10:24 +0000 (15:10 +0100)]
logind: mute/restore VT on behalf of session controllers

If a session process calls TakeControl(), we now put the VT into
KD_GRAPHICS+K_OFF mode. This way, the new session controller can solely
rely on the logind-dbus API to manage the session.

Once the controller exits or calls ReleaseControl(), we restore the VT. We
also restore it, if we lost a controller during crash/restart (but only if
there really *was* a controller previously).

Note that we also must put the VT into VT_PROCESS mode. We want VT_AUTO
semantics, but VT_AUTO+KD_GRAPHICS actually disables *all* VT switches
(who came up with that great idea?). Hence, we set VT_PROCESS for logind
but acknowledge *all* requests immediately.

If a compositor wants custom VT setups, they can still get this by *first*
calling TakeControl() and afterwards setting up the VT. logind doesn't
touch the VT during controller runtime, only during setup/teardown. This
is actually what weston already does.

6 years agologind: restore session-controller after crash
David Herrmann [Thu, 28 Nov 2013 13:58:57 +0000 (14:58 +0100)]
logind: restore session-controller after crash

We now save the unique bus-name of a session-controller as CONTROLLER=%s
in the session files. This allows us to restore the controller after a
crash or restart.

Note that we test whether the name is still valid (dbus guarantees that
the name is unique as long as the machine is up and running). If it is,
we know that the controller still exists and can safely restore it. Our
dbus-name-tracking guarantees that we're notified once it exits.

Also note that session-devices are *not* restored. We have no way to know
which devices where used before the crash. We could store all these on
disk, too, or mark them via udev. However, this seems to be rather
cumbersome. Instead, we expect controllers to listen for NewSession
signals for their own session. This is sent on session_load() and they can
then re-request all devices.

The only race I could find is if logind crashes, then the session
controller tries calling ReleaseControl() (which will fail as logind is
down) but keeps the bus-connection valid for other independent requests.
If logind is restarted, it will restore the old controller and thus block
the session.
However, this seems unlikely for several reasons:
 - The ReleaseControl() call must occur exactly in the timespan where
   logind is dead.
 - A process which calls ReleaseControl() usually closes the
   bus-connection afterwards. Especially if ReleaseControl() fails, the
   process should notice that something is wrong and close the bus.
 - A process calling ReleaseControl() usually exits afterwards. There may
   be any cleanup pending, but other than that, usual compositors exit.
 - If a session-controller calls ReleaseControl(), a session is usually
   considered closing. There is no known use-case where we hand-over
   session-control in a single session. So we don't care whether the
   controller is locked afterwards.

So this seems negligible.

6 years agologind: ignore failing close() on session-devices
David Herrmann [Thu, 28 Nov 2013 13:51:40 +0000 (14:51 +0100)]
logind: ignore failing close() on session-devices

Unfortunately, close() on a revoked/removed character-device fails with
ENODEV. I tried tracking this down in the kernel, but couldn't figure out
were exactly it comes from. However, can be easily reproduced with:
  fd = open("/dev/input/event0", O_RDWR);
  ioctl(fd, EVIOCREVOKE, 0);
  r = close(fd);
A second close on @fd would return EBADF so the close is actually valid.

We simply ignore close() errors for all session-devices as their access
may be revoked asynchronously, or the device might get unplugged.
We use close_nointr() in case anyone ever looks at the return value (or
anyone runs "grep 'close(' -r src/" to find broken close() calls).

  systemd-logind[31992]: Assertion 'close_nointr(fd) == 0' failed at src/shared/util.c:185, function close_nointr_nofail(). Aborting.

6 years agobus: add bus_name_has_owner() helper
David Herrmann [Thu, 28 Nov 2013 13:50:19 +0000 (14:50 +0100)]
bus: add bus_name_has_owner() helper

Small helper to run a synchronous "NameHasOwner" request on the

6 years agologin: revert lazy session-activation on non-VT seats
David Herrmann [Thu, 28 Nov 2013 09:52:18 +0000 (10:52 +0100)]
login: revert lazy session-activation on non-VT seats

Existing applications like gdm already depend on new sessions to get
immediately activated on seats without VTs. Fixes a bug reported as:
  [systemd-devel] systemd 208:trouble with inactive user sessions at non-seat0 seats

This patch restores the original behavior. We either need to add a new
flag for session-creation or some other heuristic to avoid activating new
sessions in the future.

6 years agobuild-sys: avoid warnings from assert_cc
Zbigniew Jędrzejewski-Szmek [Thu, 28 Nov 2013 08:41:33 +0000 (03:41 -0500)]
build-sys: avoid warnings from assert_cc

6 years agopo: install translations
Zbigniew Jędrzejewski-Szmek [Thu, 28 Nov 2013 08:29:26 +0000 (03:29 -0500)]
po: install translations

6 years agocatalog,po: add Russian translation
Sergey Ptashnick [Thu, 28 Nov 2013 08:11:04 +0000 (03:11 -0500)]
catalog,po: add Russian translation

6 years agocatalog: fix typos in the French translation
Sylvain Plantefeve [Wed, 27 Nov 2013 19:43:09 +0000 (20:43 +0100)]
catalog: fix typos in the French translation

6 years agobus: update kdbus.h and always subscribe to KDBUS_HELLO_ATTACH_NAMES
Kay Sievers [Thu, 28 Nov 2013 01:26:03 +0000 (02:26 +0100)]
bus: update kdbus.h and always subscribe to KDBUS_HELLO_ATTACH_NAMES

6 years agoautomount: log info about triggering process
Kay Sievers [Thu, 28 Nov 2013 00:25:10 +0000 (01:25 +0100)]
automount: log info about triggering process

6 years agocore: initialize variable
Kay Sievers [Thu, 28 Nov 2013 00:24:56 +0000 (01:24 +0100)]
core: initialize variable

6 years agoTODO: add sd-rtnl items
Tom Gundersen [Wed, 27 Nov 2013 22:15:04 +0000 (23:15 +0100)]
TODO: add sd-rtnl items

6 years agoRevert "socket-proxyd: Add --listener option for listener/destination pairs."
Lennart Poettering [Wed, 27 Nov 2013 19:55:15 +0000 (20:55 +0100)]
Revert "socket-proxyd: Add --listener option for listener/destination pairs."

This reverts commit adcf4c81c58511b67644e17fa743d1729d3c9ccf.

We have a better solution for the problem of making two processes run in
the same namespace, and --listener is not needed hence and should be


6 years agonamespace: comment typo fix
Lennart Poettering [Wed, 27 Nov 2013 19:31:51 +0000 (20:31 +0100)]
namespace: comment typo fix

6 years agobus: properly handle if we get disconnected during HELLO phase
Lennart Poettering [Wed, 27 Nov 2013 19:24:10 +0000 (20:24 +0100)]
bus: properly handle if we get disconnected during HELLO phase

6 years agoservice: add the ability for units to join other unit's PrivateNetwork= and PrivateTm...
Lennart Poettering [Wed, 27 Nov 2013 19:23:18 +0000 (20:23 +0100)]
service: add the ability for units to join other unit's PrivateNetwork= and PrivateTmp= namespaces

6 years agoTODO: add dbus runtime depedency
Tom Gundersen [Wed, 27 Nov 2013 15:50:53 +0000 (16:50 +0100)]
TODO: add dbus runtime depedency

6 years agonetworkd: Initialize variable to NULL
Patrik Flykt [Wed, 27 Nov 2013 15:28:54 +0000 (17:28 +0200)]
networkd: Initialize variable to NULL

If any number of arguments are given, _cleanup_manager_free_ is used
with unitialized memory causing a crash.

6 years agoTODO: remove dbus requirement
Kay Sievers [Wed, 27 Nov 2013 12:15:10 +0000 (13:15 +0100)]
TODO: remove dbus requirement

6 years agoupdates for TODO and README
Lukasz Skalski [Wed, 27 Nov 2013 10:02:10 +0000 (11:02 +0100)]
updates for TODO and README

* library support for setns() system call was added to glibc
version 2.14 (setns() call is use in src/machine/machinectl.c
and src/libsystemd-bus-container.c)

* utf8 validation call are already exported (via sd-utf8.c file) -
commit - 369c583b3fb3d672ef469d53141e274ec9d2e8a7

6 years agologind: log which process is delaying suspend and not closing locks
Lennart Poettering [Wed, 27 Nov 2013 01:38:06 +0000 (02:38 +0100)]
logind: log which process is delaying suspend and not closing locks

6 years agojournald: mention how long we needed to flush to /var in the logs
Lennart Poettering [Wed, 27 Nov 2013 00:54:25 +0000 (01:54 +0100)]
journald: mention how long we needed to flush to /var in the logs

6 years agojournal: simplify pre-allocation logic
Lennart Poettering [Wed, 27 Nov 2013 00:44:52 +0000 (01:44 +0100)]
journal: simplify pre-allocation logic

let's just do a single fallocate() as far as possible, and don't
distuingish between allocated space and file size.

This way we can save a syscall for each append, which makes quite some

6 years agojournal: add a test case for flushing messages out of a series of journal files into...
Lennart Poettering [Wed, 27 Nov 2013 00:01:53 +0000 (01:01 +0100)]
journal: add a test case for flushing messages out of a series of journal files into a single new one

6 years agojournal: allow journal_file_copy_entry() to work on non-local files
Lennart Poettering [Tue, 26 Nov 2013 23:59:07 +0000 (00:59 +0100)]
journal: allow journal_file_copy_entry() to work on non-local files

6 years agojournal: fix iteration when we go backwards from the beginning of an array chain...
Lennart Poettering [Tue, 26 Nov 2013 23:58:39 +0000 (00:58 +0100)]
journal: fix iteration when we go backwards from the beginning of an array chain element

6 years agojournal: optimize bisection logic a bit by caching the last position
Lennart Poettering [Tue, 26 Nov 2013 19:37:53 +0000 (20:37 +0100)]
journal: optimize bisection logic a bit by caching the last position

This way we can do a quick restart limiting a bit how wildly we need to
jump around during the bisection process.

6 years agojournald: keep statistics on how of we hit/miss the mmap cache
Lennart Poettering [Tue, 26 Nov 2013 17:58:44 +0000 (18:58 +0100)]
journald: keep statistics on how of we hit/miss the mmap cache

6 years agojournal: make table const
Lennart Poettering [Tue, 26 Nov 2013 17:40:23 +0000 (18:40 +0100)]
journal: make table const

6 years agojournal: when appending to journal file, allocate larger blocks at once
Lennart Poettering [Tue, 26 Nov 2013 17:39:42 +0000 (18:39 +0100)]
journal: when appending to journal file, allocate larger blocks at once

6 years agotree-wide usage of %m specifier instead of strerror(errno)
Daniel Buch [Tue, 26 Nov 2013 08:38:02 +0000 (09:38 +0100)]
tree-wide usage of %m specifier instead of strerror(errno)

Also for log_error() except where a specific error is specified

e.g. errno ? strerror(errno) : "Some user specified message"

6 years agoman: networkd - document bridging
Tom Gundersen [Tue, 26 Nov 2013 10:52:38 +0000 (11:52 +0100)]
man: networkd - document bridging

6 years agosystemctl: fix enable/disable reply handling
Kay Sievers [Tue, 26 Nov 2013 04:19:04 +0000 (05:19 +0100)]
systemctl: fix enable/disable reply handling

6 years agopam_systemd: do not set XDG_RUNTIME_DIR if the session's original user is not the...
Lennart Poettering [Tue, 26 Nov 2013 04:05:00 +0000 (05:05 +0100)]
pam_systemd: do not set XDG_RUNTIME_DIR if the session's original user is not the same as the newly logged in one

It's better not to set any XDG_RUNTIME_DIR at all rather than one of a
different user. So let's do this.

This changes the bus call parameters of CreateSession(), but that is
explicitly an internal API hence should be fine. Note however, that a
logind restart (the way the RPM postinst scriptlets do it) is necessary
to make things work again.

6 years agonspawn: improve error message when we cannot resolve the root directory argument
Lennart Poettering [Tue, 26 Nov 2013 02:50:32 +0000 (03:50 +0100)]
nspawn: improve error message when we cannot resolve the root directory argument

6 years agoman: explain the precise syntax and feature set of unit names at the end of the man...
Lennart Poettering [Tue, 26 Nov 2013 01:25:34 +0000 (02:25 +0100)]
man: explain the precise syntax and feature set of unit names at the end of the man page, given that it is detail information

6 years agosystemctl: replace the three job mode options by a single --job-mode= option
Lennart Poettering [Tue, 26 Nov 2013 01:14:27 +0000 (02:14 +0100)]
systemctl: replace the three job mode options by a single --job-mode= option

Also, expose the new "flush" job mode this way.

6 years agocore: add new "flush" job mode to cancel all other jobs when queuing a new job
Lennart Poettering [Tue, 26 Nov 2013 01:13:41 +0000 (02:13 +0100)]
core: add new "flush" job mode to cancel all other jobs when queuing a new job

6 years agocore: replace OnFailureIsolate= setting by a more generic OnFailureJobMode= setting...
Lennart Poettering [Tue, 26 Nov 2013 00:39:53 +0000 (01:39 +0100)]
core: replace OnFailureIsolate= setting by a more generic OnFailureJobMode= setting and make use of it where applicable

6 years agonetworkd: add bridge support
Tom Gundersen [Sun, 24 Nov 2013 22:37:56 +0000 (23:37 +0100)]
networkd: add bridge support

A bridge is specified in a .netdev file with a section [Bridge]
and at least the entry Name=.

A link may be joined to a bridge if the .network applied to it has
a Bridge= entry giving the name of the bridge in its [Network] section.

We eagerly create all bridges on startup, and links are added to
bridges as soon as they both appear.

6 years agonetworkd: minor fixes
Tom Gundersen [Sun, 24 Nov 2013 22:36:58 +0000 (23:36 +0100)]
networkd: minor fixes

In particular, store the ifname, though we should only use it carefully, as
it is not guaranteed to be stable. Using it for logging is fine though.

6 years agortnl: add support for IFLA_MASTER
Tom Gundersen [Sun, 24 Nov 2013 21:08:30 +0000 (22:08 +0100)]
rtnl: add support for IFLA_MASTER

6 years agortnl: add preliminary support for containers
Tom Gundersen [Thu, 21 Nov 2013 19:44:29 +0000 (20:44 +0100)]
rtnl: add preliminary support for containers

For now, we only support one container type IFLA_LINKINFO, and we
still lack support for parsing the containers again.

6 years agonetworkd: use correct printf formatter
Dave Reisner [Mon, 25 Nov 2013 23:19:10 +0000 (18:19 -0500)]
networkd: use correct printf formatter

uint64_t can be formatted correctly with %ju, rather than casting to
unsigned and potentially losing accuracy.

6 years agoconf-parser: fix memory realloc error
Yin Kangkai [Mon, 25 Nov 2013 15:14:46 +0000 (23:14 +0800)]
conf-parser: fix memory realloc error

Otherwise there is some memory corruption and undefined behavior,
e.g., in my case systemd-udev was always aborted at the
_cleanup_freep_ around that code blocks.

6 years agocore: fix order of parameters in broadcast_signal()
Lennart Poettering [Mon, 25 Nov 2013 22:03:03 +0000 (23:03 +0100)]
core: fix order of parameters in broadcast_signal()

6 years agobus: properly return errors to client if invalid parameters are passed to built-in...
Lennart Poettering [Mon, 25 Nov 2013 21:32:18 +0000 (22:32 +0100)]
bus: properly return errors to client if invalid parameters are passed to built-in methods

6 years agoservice: fix handling of PID file inotify events
Lennart Poettering [Mon, 25 Nov 2013 21:20:57 +0000 (22:20 +0100)]
service: fix handling of PID file inotify events

6 years agocore: include following set data in dump
Lennart Poettering [Mon, 25 Nov 2013 20:16:37 +0000 (21:16 +0100)]
core: include following set data in dump