Commit graph

1327 commits

Author SHA1 Message Date
Tom Gundersen b4b5212d31 libsystemd: rename LIBSYSTEMD_BUS to LIBSYSTEMD 2014-01-17 13:53:05 +01:00
Zbigniew Jędrzejewski-Szmek 235ee2134f build-sys: increase valgrind stack limit so all tests pass again 2014-01-16 00:16:02 -05:00
Zbigniew Jędrzejewski-Szmek b7fc42e03a bus: break reference cycle between bus and messages
Previously (6ee4f99 bus: break reference cycle between bus and
messages) I committed the test code, but not the actual fix :)
2014-01-16 00:16:02 -05:00
Tom Gundersen 3bedba4ae1 sd-resolv: rename to sd-resolve
Lennart pointed out that we were misspelling 'resolve'. Let's not repeat the mistakes of 'umount'
and 'resolv.conf'.
2014-01-14 18:25:16 +01:00
Tom Gundersen 5681d7fb8b libsystemd-dns: merge into libsystemd
Also rename sd-dns -> sd-resolv.
2014-01-13 21:06:13 +01:00
Tom Gundersen 0b54473e9b libsystemd-rtnl: merge into libsystemd 2014-01-13 21:06:13 +01:00
Tom Gundersen c813ca40c8 libsystemd-dhcp: merge into libsystemd 2014-01-13 21:06:08 +01:00
Tom Gundersen 6bb648a16a libsystemd-bus: rename to libsystemd
Documentation was updated to refer to either 'libsystemd' or 'sd-bus' in place
of libsystemd-bus.
2014-01-13 18:54:19 +01:00
Tom Gundersen 3bef724f7e networkd: generate resolv.conf
This adds support to generate a basic resolv.conf in /run/systemd/network.
This file will not take any effect unless a symlink is created from
/etc/resolv.conf.

Nameservers received over DHCP takes precedence over statically configured ones.

Note: /etc/resolv.conf is severely limited, so in the future we will likely
rather provide a much more powerfull nss plugin (or something to that effect),
but this should allow current users to function without any loss of
functionality.
2014-01-12 15:37:21 +01:00
Dave Reisner 0d8efe3535 ycm: autocompose flags from the Makefile
This should hopefully be self-maintaining.
2014-01-11 13:35:43 -05:00
Daniel Buch e963e3ada1 sd-dns: initial commit
Origin: <http://0pointer.de/lennart/projects/libasyncns/>

[tomegun: renamed some more files asyncns -> sd-dns and moved to libsystemd-bus as
requested by Lennart]
2014-01-11 15:03:25 +00:00
Zbigniew Jędrzejewski-Szmek 58742b06bd build-sys: fix distcheck 2014-01-08 22:34:59 -05:00
Kay Sievers 2b197ae21c dbus1-generator: install user version 2014-01-08 18:11:37 +08:00
Kay Sievers 8b255ecd99 pam_systemd: export DBUS_SESSION_BUS_ADDRESS 2014-01-08 18:11:37 +08:00
Kay Sievers 54142c6af1 bus-driverd: support user mode 2014-01-08 08:38:39 +08:00
Kay Sievers 7ca7b61f70 bus-proxyd: support --user bus address 2014-01-08 08:38:39 +08:00
Kay Sievers fccd44ec3a core: --user -- add basic.target an sort against it like --system does 2014-01-07 01:35:25 +08:00
Zbigniew Jędrzejewski-Szmek a0846368c8 build-sys: make valgrind-tests target output nicer 2014-01-02 19:45:47 -05:00
Tom Gundersen f5be560181 networkd: add DHCPv4 support
This adds basic DHCPv4 support. Link-sense is enabled unconditionally,
but the plan is to make that configurable.

I tested this in a VM with lots of NICs and over wifi in the various
coffee shops I found this Christmas, but more testing would definitely
be appreciated.
2014-01-01 16:26:27 +01:00
Zbigniew Jędrzejewski-Szmek 9b55cd5665 build-sys: make test output a bit nicer 2013-12-31 13:00:57 -05:00
Zbigniew Jędrzejewski-Szmek aa9ed65389 build-sys: make test-dhcp-* statically linked
This makes them behave like everything else following
48d7417d3 'build-sys: link most internal libraries statically'.
2013-12-31 13:00:57 -05:00
Zbigniew Jędrzejewski-Szmek 8f8770706e build-sys: fix systemd-stdio-bridge link to work with split /usr
shumski> there seems to be slight error in systemd git master Makefile.am
2013-12-30 12:11:13 -05:00
Lennart Poettering 08bcebf36e shared: add simplistic XML parser for usage in the D-Bus policy language compat parser 2013-12-28 03:04:29 +01:00
Zbigniew Jędrzejewski-Szmek 4acbce7979 build-sys: fix generation of user@.service 2013-12-27 12:12:41 -05:00
Lennart Poettering 43a99a7afe build-sys: minor fixes found with cppcheck 2013-12-25 19:00:38 +01:00
Zbigniew Jędrzejewski-Szmek c4708f1323 tmpfiles: introduce the concept of unsafe operations
Various operations done by systemd-tmpfiles may only be safely done at
boot (e.g. removal of X lockfiles in /tmp, creation of /run/nologin).
Other operations may be done at any point in time (e.g. setting the
ownership on /{run,var}/log/journal). This distinction is largely
orthogonal to the type of operation.

A new switch --unsafe is added, and operations which should only be
executed during bootup are marked with an exclamation mark in the
configuration files. systemd-tmpfiles.service is modified to use this
switch, and guards are added so it is hard to re-start it by mistake.

If we install a new version of systemd, we actually want to enforce
some changes to tmpfiles configuration immediately. This should now be
possible to do safely, so distribution packages can be modified to
execute the "safe" subset at package installation time.

/run/nologin creation is split out into a separate service, to make it
easy to override.

https://bugzilla.redhat.com/show_bug.cgi?id=1043212
https://bugzilla.redhat.com/show_bug.cgi?id=1045849
2013-12-24 15:48:06 -05:00
Lennart Poettering b67f541f13 bus: switch kdbus bloom filter over to SipHash (from MurmurHash3)
Let's try to standardize on a single non-cryptographic hash algorithm,
and for that SipHash appears to be the best answer.

With this change there are two other hash functions left in systemd: an
older version of MurmurHash embedded into libudev for the bloom filters
in udev messages (which is hard to update, given that the we probably
should stay compatible with older versions of the library). And lookup3
in the journal files (which we could replace for new files, but which is
probably not worth the work).
2013-12-23 04:20:55 +01:00
Kay Sievers 57d0e6b273 libudev: ship the original MurmurHash2.[ch] file 2013-12-23 02:55:06 +01:00
Lennart Poettering 9bf3b53533 shared: switch our hash table implementation over to SipHash
SipHash appears to be the new gold standard for hashing smaller strings
for hashtables these days, so let's make use of it.
2013-12-22 21:12:25 +01:00
Marcel Holtmann d5f7759a98 hwddb: Add database for SDIO vendor and class information 2013-12-22 10:21:20 -08:00
Lennart Poettering 15e913230c bus: install unit files for new driver service 2013-12-17 15:42:33 +01:00
Zbigniew Jędrzejewski-Szmek e7335f5491 build-sys: fix distcheck 2013-12-16 23:59:07 -05:00
Zbigniew Jędrzejewski-Szmek 0b6c04bb45 bus: use gperf to map error string to errno 2013-12-16 23:21:50 -05:00
Lennart Poettering cd49e2f664 build-sys: build bus-driverd if kdbus support is enabled 2013-12-17 01:36:59 +01:00
Daniel Mack 294c866023 Add bus-driverd
systemd-bus-driverd is a small daemon that connects to kdbus and
implements the org.freedesktop.DBus interface. IOW, it provides the bus
functions  traditionally taken care for by dbus-daemon.

Calls are proxied to kdbus, either via libsystemd-bus (were applicable)
or with the open-coded use of ioctl().

Note that the implementation is not yet finished as the functions to
add and remove matches and to start services by name are still missing.
2013-12-16 22:34:48 +01:00
Lennart Poettering 16f4efb415 build-sys: add cppcheck target
This uses --enable=all mode. Should be taken with a grain of salt
though. While many recommendations make sense we should probably keep
"int r" always on function scope, and many of the portability warnings
really don't matter to us because we only care for Linux/glibc.
2013-12-16 00:06:07 +01:00
Lennart Poettering 7c9a6f9063 bus: install systemd-bus-proxyd unit files for compatibility with dbus1 2013-12-13 20:49:57 +01:00
Zbigniew Jędrzejewski-Szmek 189b2384d6 build-sys: use internal library for dhcp client tests
Also clean up AM_CFLAGS in a few places.
2013-12-12 11:43:34 -05:00
Patrik Flykt 117539f8b7 build: Add dependency on libsystemd-bus needed for main loop 2013-12-12 11:43:34 -05:00
Patrik Flykt 290c7324ca dhcp: Add test for discover DHCP packet creation
Set a fake MAC address and emulate raw packet sending. When the buffer
containing the Discover message is received, check selected IP and
UDP headers and compute IP header and UDP message checksums. Also
send the DHCP message for option parsing and expect a successful
outcome.
2013-12-12 11:43:34 -05:00
Patrik Flykt e1c244dea0 build: Add libsystemd-dhcp 2013-12-12 11:43:34 -05:00
Patrik Flykt 78628cd273 build: Add DHCP option test 2013-12-12 11:43:33 -05:00
Patrik Flykt b5d01d174c build: Add initial build support
The client test program is the only one to be built so far.
2013-12-12 11:43:33 -05:00
Lennart Poettering f9a810beda journald: port to sd-event and enable watchdog support 2013-12-11 20:55:09 +01:00
Lennart Poettering cde93897cd event: hook up sd-event with the service watchdog logic
Adds a new call sd_event_set_watchdog() that can be used to hook up the
event loop with the watchdog supervision logic of systemd. If enabled
and $WATCHDOG_USEC is set the event loop will ping the invoking systemd
daemon right after coming back from epoll_wait() but not more often than
$WATCHDOG_USEC/4. The epoll_wait() will sleep no longer than
$WATCHDOG_USEC/4*3, to make sure the service manager is called in time.

This means that setting WatchdogSec= in a .service file and calling
sd_event_set_watchdog() in your daemon is enough to hook it up with the
watchdog logic.
2013-12-11 18:20:09 +01:00
Thomas Hindoe Paaboel Andersen 96115cdfe0 fix scan-build issues
The static analyzer scan-build had a few issues with analysing
parts of systemd.

gpt-auto-generator.c:
scan-build could not find blkid.h. Whether it should be blkid.h or
blkid/blkid.h seems to depend on the version used. We already use
blkid/blkid.h in udev-builtin-blkid.c so it seems safe to use that
here too.

Makefile.am:
Moved some -D's from CFLAGS to CPPFLAGS. I also simplified them a
bit and got rid of a left over DBUS_CFLAGS.

test-cgroup-mask.c/test-sched-prio.c
A variable was added to store the replaced TEST_DIR. When wrapped
in an assert_se TEST_DIR was not replaced in the logged error.
While not an issue introduced in this patch we might as well fix
it up while we are here.
2013-12-10 22:30:46 +01:00
Lennart Poettering 6647dc6659 bus: demarshal gvariant 2013-12-09 23:04:49 +01:00
Lennart Poettering bc25a2fb66 bus: start maintaining a list of difference between kdbus/dbus1 2013-12-05 03:19:18 +01:00
Lennart Poettering c1b9d93572 bus: add support for serializing to gvariant
(deserialization is still missing, hence this is not hooked up to kdbus)
2013-12-05 02:47:36 +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