Commit graph

1309 commits

Author SHA1 Message Date
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
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
Lennart Poettering dca409bf96 units: create busnames.target for user sessions too 2013-12-03 01:44:24 +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
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
Daniele Medri 917c03718c catalog,po: add Italian translation 2013-12-01 11:28:04 -05: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 f252ff1742 rename stdio-bridge to bus-proxyd 2013-11-29 22:12:59 +01:00
Zbigniew Jędrzejewski-Szmek bd441fa27a build-sys: make multi-seat-x optional
At some point it should become disabled by default.

http://lists.freedesktop.org/archives/systemd-devel/2013-November/014869.html
2013-11-28 14:37:11 -05:00
Lennart Poettering 5b12334d35 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.
2013-11-28 18:42:18 +01:00
Sergey Ptashnick 247913054e catalog,po: add Russian translation 2013-11-28 03:43:07 -05:00
Lennart Poettering d0767ffd08 journal: add a test case for flushing messages out of a series of journal files into a single new one 2013-11-27 01:01:53 +01:00
Tom Gundersen 02b59d57e0 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.
2013-11-26 01:32:25 +01:00
Tom Gundersen a553fd32d1 networkd: fix build
Forgot to 'git add'...
2013-11-23 02:47:12 +01:00
David Strauss 21acf11d40 cgroups: Fix test service inclusion in Makefile 2013-11-23 02:49:05 +10:00
Lennart Poettering baabc57764 build-sys: move more files from core/ to share/ that are generic enough 2013-11-22 16:31:40 +01:00