Commit graph

13129 commits

Author SHA1 Message Date
Tom Gundersen 0a4b9a0787 TODO: add networkd entries 2013-12-04 14:15:13 +01:00
Tom Gundersen dd3efc0993 networkd: add link-sense and simplify state-machine a bit
This listens to rtnetlink for changes to IFF_UP and IFF_LOWER_UP (link sense). The latter
is simply logged at the moment, but will be useful once we add dhcp support.
2013-12-04 14:15:13 +01:00
Tom Gundersen 50b3c42f97 rtnl: add link_get_flags 2013-12-04 14:15:13 +01:00
Tom Gundersen 8cec01b9e9 rtnl: add callback support
sd_rtnl_add_match allows you to add a callback function for when given types of
messages are received.
2013-12-04 14:15:13 +01:00
Tom Gundersen a02113d2ea rtnl: don't ignore broadcast messages 2013-12-04 14:15:13 +01:00
Kay Sievers e63bb33d71 libsystemd-bus: catch up with latest kdbus list query changes 2013-12-04 11:47:22 +01:00
Thomas Hindoe Paaboel Andersen f168c27313 trivial coding style clean ups
- Add space between if/for and the opening parentheses
- Place the opening brace on same line as the function (not for  udev)

From the CODING_STYLE
Try to use this:
    void foo() {
    }
instead of this:
    void foo()
    {
    }
2013-12-03 22:27:45 +01:00
Thomas Hindoe Paaboel Andersen 53ab52ac6d sd-memfd: use assert_return 2013-12-03 21:58:51 +01:00
Lennart Poettering c0a0913218 bus: fix parsing of AcquireName() response 2013-12-03 20:31:34 +01:00
Lennart Poettering a6aa89122d bus: don't make use of the private bus socket if kdbus is available 2013-12-03 19:55:51 +01:00
Lennart Poettering 0e7be1293f core: use normal library call to query list of current names 2013-12-03 18:58:18 +01:00
Lennart Poettering 71f2ab468d bus: rework sd_bus_list_names() to return two lists for acquired and activatable names 2013-12-03 18:42:51 +01:00
Lennart Poettering 0461f8cdc1 bus: internalize a lot of protocol definitions
We shouldn export what isn't necessary or useful to clients, so let's
add the protocol definitions we only need internally into a private
header.
2013-12-03 18:14:50 +01:00
Zbigniew Jędrzejewski-Szmek 6c045c0b4c journal: fail silently in sd_j_sendv() if journal is unavailable
"syslog(3) and sd_journal_print() may largely be used interchangeably
functionality-wise" according to sd_journal_print(3). This socket
should be always available except in rare circumstatances, and we
don't random applications to fail on logging, so let's do what syslog
did. The alternative of forcing all callers to do error handling for
this rare case doesn't really have any benefits, since if they can't
log there isn't much they can do anyway.

https://bugzilla.redhat.com/show_bug.cgi?id=1023041
2013-12-03 12:11:18 -05:00
Lennart Poettering e7176abbe8 bus: make sd_bus_request_name() and sd_bus_release_name() behave more like other calls
Instead of returning an enum of return codes, make them return error
codes like kdbus does internally.

Also, document this behaviour so that clients can stick to it.

(Also rework bus-control.c to always have to functions for dbus1 vs.
kernel implementation of the various calls.)
2013-12-03 18:02:46 +01:00
Lennart Poettering 059d9fbb5a macro: better make IN_SET() macro use const arrays 2013-12-03 16:41:15 +01:00
Daniel Mack 89fbb95e03 libsystemd-bus: catch up with latest kdbus changes 2013-12-03 14:38:53 +01:00
Lennart Poettering cde360cd5d units: ship busname units for the bus activated services we ship 2013-12-03 04:28:02 +01:00
Zbigniew Jędrzejewski-Szmek a6e9f2b911 catalog: rename files to specify language in the filename 2013-12-02 22:12:02 -05:00
Zbigniew Jędrzejewski-Szmek c7332b0844 catalog: determine language from the filename 2013-12-02 22:12:02 -05:00
Zbigniew Jędrzejewski-Szmek 6a371e23ee systemd: treat reload failure as failure
systemctl reload "suceeded" on stopped units, but it is documented
to fail in this case.

https://bugzilla.redhat.com/show_bug.cgi?id=1036845
2013-12-02 22:12:02 -05:00
Lennart Poettering c71ecee578 dbus1: make gcc shut up 2013-12-03 02:08:35 +01:00
Daniel Mack 144e9e5890 libsystemd-bus: catch up with latest kdbus changes 2013-12-03 01:56:20 +01:00
Lennart Poettering dca409bf96 units: create busnames.target for user sessions too 2013-12-03 01:44:24 +01:00
Lennart Poettering 5c817d31d9 dbus1: hook busnames.target into normal boot if kdbus is enabled 2013-12-03 01:41:02 +01:00
Lennart Poettering 4c3a127cb6 bus: skip unit file generation for systemd itself 2013-12-03 01:24:39 +01:00
Lennart Poettering 1b16c75cd2 units: install busnames.target by default 2013-12-03 01:18:26 +01:00
Lennart Poettering 674eb68520 bus: add generator that turns old dbus1 activation files into .busname + .service units 2013-12-03 01:13:48 +01:00
Lennart Poettering e821075a23 bus: add .busname unit type to implement kdbus-style bus activation 2013-12-02 23:32:34 +01:00
Lennart Poettering f9638db8de bus: make sure we check for "incompatible" flags negotiated with kernel kdbus 2013-12-02 23:32:34 +01:00
Lennart Poettering 8bf9fcf488 core: extra paranoia when deserializing kdbus fd 2013-12-02 23:32:34 +01:00
Lennart Poettering cabb780688 macro: add a macro to test whether a value is in a specified list
Introduce IN_SET() macro to nicely check whether a value a is one of a
few listed values.

This makes writing this:

        if (a == 1 || a == 7 || a == 8 || a == 9)

nicer, by allowing this:

        if (IN_SET(a, 1, 7, 8, 9))

This is particularly useful for state machine enums.
2013-12-02 23:32:34 +01:00
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