1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-28 20:25:38 +03:00
Commit Graph

1341 Commits

Author SHA1 Message Date
Tom Gundersen
a6cc569e33 sd-dhcp-client: split sd_dhcp_lease from sd_dhcp_client
This allows us users of the library to keep copies of old leases. This is
used by networkd to know what addresses to drop (if any) when the lease
expires.

In the future this may be used by DNAv4 and sd-dhcp-server.
2014-02-07 15:48:35 +01:00
Tom Gundersen
e59749b1f8 build-sys: move -lresolv out of CFLAGS
Thomas H.P. Andersen <phomes@gmail.com> wrote:
> Does -lresolv belong in libsystemd_la_CFLAGS? I would have thought
> that it should be in LIBADD for the lib and LDADD for the test.
2014-02-03 15:25:45 +01:00
Zbigniew Jędrzejewski-Szmek
3320e22a5d build-sys: disable lto also for libsystemd-id128
Another instance of https://sourceware.org/bugzilla/show_bug.cgi?id=16504.
2014-01-28 10:40:41 -05:00
Zbigniew Jędrzejewski-Szmek
65b3903ff5 journal: guarantee async-signal-safety in sd_journald_sendv
signal(7) provides a list of functions which may be called from a
signal handler. Other functions, which only call those functions and
don't access global memory and are reentrant are also safe.
sd_j_sendv was mostly OK, but would call mkostemp and writev in a
fallback path, which are unsafe.

Being able to call sd_j_sendv in a async-signal-safe way is important
because it allows it be used in signal handlers.

Safety is achieved by replacing mkostemp with open(O_TMPFILE) and an
open-coded writev replacement which uses write. Unfortunately,
O_TMPFILE is only available on kernels >= 3.11. When O_TMPFILE is
unavailable, an open-coded mkostemp is used.

https://bugzilla.gnome.org/show_bug.cgi?id=722889
2014-01-27 23:17:02 -05:00
Zbigniew Jędrzejewski-Szmek
9f70075586 build-sys: expose more phony targets 2014-01-26 11:44:09 -05:00
Elia Pinto
bd390ae7c7 build-sys: add a phony target for cppcheck
The cppcheck target was introduced by commit 16f4efb415
"build-sys: add cppcheck target". But it is preferable to use a make phony target
for it, as this patch does.

There are two general reasons to use a phony target: to avoid a
conflict with a file of the same name, and to improve performance. In
this case the first reason is obvious, and the second is that make
skips the implicit rule search for phony targets, since it knows that
phony targets do not name actual files that could be remade from other
files (as described in the "Gnu Make" Manual).
2014-01-26 11:44:09 -05:00
Zbigniew Jędrzejewski-Szmek
be12791331 build-sys: merge libsystemd-id128 into libsystemd 2014-01-25 18:10:08 -05:00
Zbigniew Jędrzejewski-Szmek
53e856e16a build-sys: create "compatibility libraries" section
Compat stuff is moved to src/compat-libs/.
Warnings are issued when programs are linked with the deprecated library.
2014-01-25 18:10:08 -05:00
Zbigniew Jędrzejewski-Szmek
242465b5bf build-sys: disable lto for compatibility libraries
https://sourceware.org/bugzilla/show_bug.cgi?id=16504
2014-01-25 18:10:08 -05:00
Zbigniew Jędrzejewski-Szmek
0bba8d6eb7 build-sys: merge libsystemd-login into libsystemd
A compatibility libsystemd-login library is created which uses
.symver and ifunc magic proposed by Lennart to make programs linked
to the old library name continue to work seamlessly.

Unfortunately the bfd linker crashes:
  https://sourceware.org/bugzilla/show_bug.cgi?id=16467
This will be fixed in binutils 2.25.

As a work-around, gold can be used:
  LDFLAGS=-Wl,-fuse-ld=gold

Unfortunately the switch to pick the linker appeared in gcc 4.8.

This also doesn't work with LLVM:
  http://llvm.org/bugs/show_bug.cgi?id=11897
2014-01-25 18:10:08 -05:00
Tom Gundersen
52433f6b65 networkd: add basic bonding support
Refactor bridging support to be generic netdev support and extend it to
cover bonding as well.
2014-01-22 17:56:49 +01:00
Tom Gundersen
607553f930 libsystemd: split up into subdirs
We still only produce on .so, but let's keep the sources separate to make things a bit
less messy.
2014-01-21 14:41:35 +01:00
Tom Gundersen
c61be55d23 libsystemd-dhcp: revert merge into libsystemd
Unlike the other merged libs, the rest of libsystemd will never depend on
sd-dhcp-client, so there is no reason not to keep it separate.
2014-01-21 00:04:53 +01:00
Umut Tezduyar Lindskog
fece63b86e build: Skip .busname generator when kdbus is off 2014-01-17 19:17:38 +01:00
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