Commit Graph
13097 Commits
Author SHA1 Message Date
Thomas Hindoe Paaboel Andersen 1ae464e093 Use assert_return in more of the public API 2013-12-02 23:13:58 +01:00
Daniel Mack c85a5a243b libsystemd-bus: catch up with latest kdbus changes 2013-12-02 20:29:58 +01:00
Lennart Poettering fd5b0b9141 nspawn: make sure /dev/kdbus in the container is world accessible 2013-12-02 19:59:15 +01:00
Lennart Poettering f8a2d1c925 nspawn: make kdbus namespaces actually work 2013-12-02 18:47:39 +01:00
Lennart Poettering 95c4fe8271 busctl: add command to dump creds of a peer or pid
(also, rename _SD_BUS_CREDS_MAX to _SD_BUX_CRED_ALL, since "MAX" so far
was used to indicate one higher than the highest valid value, and this
is not correct here.)
2013-12-02 18:40:43 +01:00
Lukasz Skalski a009c158b0 Display synthetic message serial number in a more readable format than (uint32_t) -1
Serial=4294967295 field in message dump generated by bus_message_dump()
function for synthetic messages isn't good readable.
2013-12-02 17:35:06 +01:00
Lennart Poettering 006a0b8788 bus: be nice to LLVM and don't embedd a VLA in a union 2013-12-02 17:17:29 +01:00
Lennart Poettering 6717d47350 bus: when replying to an incoming message and the vtable contains the expected return signature generate an error if the response message doesn't match it 2013-12-02 15:29:40 +01:00
Shawn Landden 99f37ad86e service: remove unneccesary Socket.got_socket_fd 2013-12-01 19:53:55 -05:00
Marcel Holtmann e4afbb3eac build-sys: allow building systemctl with --disable-logind
When logind is disabled, do not attempt to link against the non-existing
libsystemd-login-internal.la library.
2013-12-01 12:28:32 -08:00
Kay Sievers 537220d910 bus: bus_open_user_systemd() fall back to bus if runtime dir is not set 2013-12-01 18:36:53 +01:00
Daniele Medri 917c03718c catalog,po: add Italian translation 2013-12-01 11:28:04 -05:00
David Herrmann 4545a231fc util: add greedy_realloc0()
Compared to greedy_realloc(), this sets all newly allocated memory to 0.
As the old variant has been used a lot for string-handling, we avoid
changing it as clearing memory is not needed there.
2013-12-01 12:17:08 +01:00
David Herrmann a0a6be9f6a logind: fix "CanGraphical" attribute to return correct value
We should return seat_can_graphical() instead of seat_can_tty() for the
public dbus CanGraphical attribute. This used to work, but the
dbus -> sd-bus conversion introduced this regression.
2013-12-01 12:17:08 +01:00
Shawn Landden d78a28e3d7 fix regression of read_full_file() in fileio.c
my e93c33d4aa broke this stupidly
2013-11-30 23:04:17 -05:00
Zbigniew Jędrzejewski-Szmek 6da49b8b2f shell-completion: systemctl cat
Also update -H help string to follow the binaries.
2013-11-30 22:36:08 -05:00
Zbigniew Jędrzejewski-Szmek e4c0fbe50c systemctl: do not show SourcePath when FragmentPath cannot be found
Those files can be in a completely deferent format and also
arbitrarily long, and usually contain information about other
stuff. If we ever add SourceLine= or SourceLines= in addition
to SourcePath=, and can show the relevant information only, this
commit can be reverted.
2013-11-30 22:36:08 -05:00
Shawn Landden e93c33d4aa systemctl: add "systemctl cat" 2013-11-30 22:20:20 -05:00
Shawn Landden f74294c1da systemctl: refactor show()
v2, don't leave in unused function
2013-11-30 21:59:53 -05:00
Zbigniew Jędrzejewski-Szmek 6a44e50f4c man: explicitly say when multiple units can be specified
itistoday> how do you specify multiple dependencies in a unit file? i've been
           googling and can't find this basic thing :-\
itistoday> do you use a comma, or use multiple After= statements?
2013-11-30 21:23:11 -05:00
Zbigniew Jędrzejewski-Szmek 572ce4f783 docs: remove unneeded the's in gudev docs
https://bugs.freedesktop.org/show_bug.cgi?id=72164
2013-11-30 20:27:54 -05:00
Zbigniew Jędrzejewski-Szmek 75be4e6445 bus: remove unused variable 2013-11-30 20:10:18 -05:00
Thomas Hindoe Paaboel Andersen 7c8e83c6d8 bus: remove unused variable 2013-12-01 00:26:08 +01:00
Thomas Hindoe Paaboel Andersen 27373e4427 util.c: check if return value from ttyname_r is > 0 instead of != 0
We must return a negative error code from getttyname_malloc but
that would not be the case if ttyname_r returned a negative value.

ttyname_r should only return EBADF, ENOTTY, or ERANGE so it should
be safe to change.
2013-12-01 00:14:28 +01:00
Thomas Hindoe Paaboel Andersen a051da35ce sysfs-show.c: return negative error
introduced in 1ca208fb4f
2013-11-30 21:59:40 +01:00
Thomas Hindoe Paaboel Andersen e5f476db05 macro.h: fix typo in comment 2013-11-30 21:55:35 +01:00
Kay Sievers 98a4025806 bus: catch up with kdbus 2013-11-30 20:41:02 +01:00
Lennart Poettering 626851be97 bus: do kdbus only if this is enabled on the configure switch
Since we want to retain the ability to break kernel ←→ userspace ABI
after the next release, let's not make use by default of kdbus, so that
people with future kernels will not suddenly break with current systemd
versions.

kdbus support is left in all builds but must now be explicitly requested
at runtime (for example via setting $DBUS_SESSION_BUS). Via a configure
switch the old behaviour can be restored. In fact, we change autogen.sh
to do this, so that git builds (which run autogen.sh) get kdbus by
default, but tarball builds (which ue the configure defaults) do not get
it, and hence this stays out of the distros by default.
2013-11-30 20:18:48 +01:00
Lennart Poettering 4734b89564 update TODO 2013-11-30 19:55:23 +01:00
Lennart Poettering 763e20e675 bus: use "System.Error." as prefix for implicit errno bus errors
We probably shouldn't use "Posix.Error" since many of the errors have
nothing to do with Posix.
2013-11-30 19:53:33 +01:00
Lennart Poettering 79f8d3d2ce bus: support temporarily const errors that don't need to be freed but require deep copies
This should fix issues with incorrectly copying bus error messages out
of sd_bus_message objects.

Original bug found by: Djalal Harouni
2013-11-30 19:47:46 +01:00
Daniel Mack b57bdedc87 libsystemd-bus: sync kdbus.h 2013-11-30 19:23:16 +01:00
Lennart Poettering 9bd37b40fa nspawn: set up a kdbus namespace when starting a container 2013-11-30 16:36:46 +01:00
Lennart Poettering 3310dfd5bd bus: append unique and well known names to all messages unconditionally 2013-11-30 16:08:11 +01:00
Lennart Poettering 49b832c5b8 bus: include unique and well known names in credentials object 2013-11-30 14:46:14 +01:00
Kay Sievers 2377ae1ff6 bus: update kdbus.h 2013-11-30 14:14:39 +01:00
Daniel Mack 1d0e3c9884 libsystemd-bus: catch up with latest kdbus changes
The name list and query functions now work differently in kdbus, as the
result is stored in the connection's pool, rather than being copied back
through the ioctl buffer. That also safes us some logic, as we don't
have to resize the communication buffer in a loop with growing buffer
sizes.

Due to this, KDBUS_CMD_MSG_RELEASE was renamed to KDBUS_CMD_FREE, as it
is now used outside the message logic as well.
2013-11-30 13:31:04 +01:00
David Strauss 683fc3a448 bus-proxyd: Fix CLI help. --bus-path is also usable as -p. 2013-11-30 16:55:30 +10:00
Lennart Poettering e3dd987cfc core: allocate a kdbus bus for each systemd instance, if we can 2013-11-30 03:53:42 +01:00
Lennart Poettering 32f464809e bus: whenever we notice the connection is terminated enter CLOSING state 2013-11-30 01:49:40 +01:00
Lennart Poettering a43b9ca304 bus: synthesize local error reply when we cannot deliver a message to kdbus because the destination is unavailable 2013-11-30 01:02:51 +01:00
Lennart Poettering 7adc46fcce bus: don't generate NameAcquired/NameLost messages in the library
The signals appear entirely redundant due to NameOwnerChange, hence
don't do them in the new library, instead leave them for the
compatibility bridge only.

Also, set the serial number for synthesized messages to (uint32_t) -1.
2013-11-30 00:21:06 +01:00
Lennart Poettering dff55e5db3 build-sys: no longer rebuild various bits and pieces such as man pages each time the Makefile changes
We don't do this for .c files either, even they are also influence quite
a bit by makefile settings. Given that XSLT is a lot slower then the
rest of the build let's make our build a bit faster if people end up
touching the Makefile.
2013-11-30 00:21:06 +01:00
Kay Sievers 4efbd13a99 bus: revert attempts to make the integration-testing work
fa6ccbf423
  197941a8d5
  547708f59e
2013-11-29 23:55:09 +01:00
Kay Sievers f252ff1742 rename stdio-bridge to bus-proxyd 2013-11-29 22:12:59 +01:00
Lennart Poettering 219728b31b bus: synthesize NameLost/NameAcquired from kernel messages on top if NameOwnerChange 2013-11-29 22:03:55 +01:00
Lennart Poettering 51502af33d bus: fix callback index when dispatching kernel messages 2013-11-29 22:03:55 +01:00
Lennart Poettering 7d22c71732 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.
2013-11-29 22:03:55 +01:00
Daniel Mack 3519d4c895 libsystemd-bus: sd_bus_request_name: use kdbus_translate_request_name_flags() 2013-11-29 22:01:34 +01:00
Daniel Mack 98f17eda0f libsystemd-bus: rename sd_bus_kernel_translate_request_name_flags
... to keep the namespace clean.
2013-11-29 22:01:34 +01:00