Commit graph

14685 commits

Author SHA1 Message Date
Lennart Poettering bf34ab149f sd-login: add calls that retrieve credentials of peers connected to AF_UNIX peers
This is supposed to be an extension of SO_PEERCRED and SO_PEERSEC,
except for cgroup information.
2014-03-17 18:15:57 +01:00
Lennart Poettering 7366b080b3 update TODO 2014-03-17 15:18:11 +01:00
Miklos Vajna 6f285378aa core, libsystemd, systemd, timedate, udev: spelling fixes 2014-03-17 02:35:35 -04:00
Jason St. John 9029f64298 man: improve wording of systemctl's --after/--before
Commit 4a77ca7 was an attempt at fixing the wording of --after and --before,
but the new wording was unclear.

Split the combined --after/--before section into a separate section for
each, explicitly state what each option does, and add information about
how these lists are generated.

Reported-by: Andrey Borzenkov <arvidjaar@gmail.com>
Reported-by: Lennart Poettering <lennart@poettering.net>
2014-03-17 01:57:37 -04:00
Zbigniew Jędrzejewski-Szmek 3f57309664 build-sys: bump required µhttpd version
MHD_USE_EPOLL_LINUX_ONLY, MHD_USE_DUAL_STACK are only available in
next-but-last release.
2014-03-17 01:55:48 -04:00
Zbigniew Jędrzejewski-Szmek 8a8d55f2c1 journal-remote: implement inheriting http(s) sockets
Now --listen-http=-3 --listen-https=-4 can be used to spawn a µhttpd
server on those two ports, in http and https modes respectively.
As before, --listen-http=3 --listen-https=4 will launch µhttpd servers
on ports 3 and 4.
2014-03-17 01:55:48 -04:00
Zbigniew Jędrzejewski-Szmek e7216d112a microhttpd-util: use static buffer for static messages
Most of the messages we send do not require a allocating and
freeing a buffer, to optimize this by using const strings.

Also, rename respond_error to mhd_respond*, since it is used
not only for errors.

Make use of information from printf to avoid one extra call to
strlen.
2014-03-17 01:55:48 -04:00
Zbigniew Jędrzejewski-Szmek cc64d0175a journal-remote: HTTP(s) support
The whole tool is made dependent on µhttpd availability. It should be
easy to make the µhttpd parts conditional, but since transfer over
HTTP seems to be the primary use case, currently this is not done.

Current implementation uses nested epoll loops: sd-event is used for
the external event loop, and µhttpd uses epoll in its own
loop. Unfortunately µhttpd does not expose enough information to add
the descriptors it uses to the external event loop. This means that
starvation of other events is possible, if one of the inner µhttpd
loops is constantly busy. This means that µhttpd servers should not
be mixed with other sources.

The TLS authentication parts haven't been really tested properly, and
should not be take too seriously.
2014-03-17 01:55:48 -04:00
Zbigniew Jędrzejewski-Szmek fdfccdbc98 journal-remote: tool to receive messages over the network 2014-03-17 01:55:48 -04:00
Zbigniew Jędrzejewski-Szmek f12be7e8ca journal-gatewayd: check if certificate is signed by CA
If --trust=ca.crt is used, only clients presenting certificates signed
by the ca will be allowed to proceed. No hostname matching is
performed, so any client wielding a signed certificate will be
authorized.

Error functions are moved from journal-gateway to microhttp-util and
made non-static, since now they are used in two source files.
2014-03-17 01:55:48 -04:00
Zbigniew Jędrzejewski-Szmek cafc7f9130 journal-gatewayd: log to journal from gnutls
Prefix "gnutls: " is added. Some semi-random mapping of gnutls levels
to syslog levels is done, but since gnutls levels seem to be used
rather loosely, most end up as debug.
2014-03-17 01:55:48 -04:00
Zbigniew Jędrzejewski-Szmek 6031319956 build-sys: add check on gnutls 2014-03-17 01:55:48 -04:00
Zbigniew Jędrzejewski-Szmek e5ebe12b77 journal-gatewayd: ask clients to provide certificates
A certificate authority certificate will be presented to clients,
causing them to present their client certificate, if it is signed by
this authority (default behaviour of most clients). No certificate
checking is actually performed.
2014-03-17 01:55:48 -04:00
Zbigniew Jędrzejewski-Szmek e0aa372610 activate: export make_socket_fd
Also improve logging to print out the parsed address on error.
2014-03-17 01:55:48 -04:00
Zbigniew Jędrzejewski-Szmek 6cf487afad shared: export is_dir 2014-03-17 01:55:47 -04:00
Zbigniew Jędrzejewski-Szmek d18d46ecea journal: export valid_user_field and size defines
In preparation for use elsewhere.
2014-03-17 01:55:47 -04:00
Zbigniew Jędrzejewski-Szmek 63c8666b82 journal: extract duplicated code to a function 2014-03-17 01:55:47 -04:00
Zbigniew Jędrzejewski-Szmek fc55baee99 journal: extract duplicated code to a function 2014-03-17 01:55:47 -04:00
Zbigniew Jędrzejewski-Szmek 2fc74bf433 journald: remove stray reset of error return value 2014-03-17 01:55:47 -04:00
Lennart Poettering 1238ee09b7 systemctl: introduce -r switch to show units running in local containers in addition to the host 2014-03-17 04:00:44 +01:00
Kay Sievers 9ec6586866 timedated: move test logging to test program 2014-03-17 00:18:55 +01:00
Kay Sievers a47b9e6283 timedated: update spike handling 2014-03-16 23:51:50 +01:00
Kay Sievers 3dbc762003 timedated: update spike handling 2014-03-16 23:22:21 +01:00
Kay Sievers 7b41586761 timedated: handle external system time changes 2014-03-16 19:20:50 +01:00
Josh Triplett f8294e4175 Use strlen even for constant strings
GCC optimizes strlen("string constant") to a constant, even with -O0.
Thus, replace patterns like sizeof("string constant")-1 with
strlen("string constant") where possible, for clarity.  In particular,
for expressions intended to add up the lengths of components going into
a string, this often makes it clearer that the expression counts the
trailing '\0' exactly once, by putting the +1 for the '\0' at the end of
the expression, rather than hidden in a sizeof in the middle of the
expression.
2014-03-16 09:52:56 -04:00
Tom Gundersen 039dd4afd6 nspawn: UP the host side of the veth pair after adding it to a bridge 2014-03-16 13:55:41 +01:00
Tom Gundersen 1f0db3ed88 sd-rtnl: never treat broadcasts as replies
Otherwise the sequence number of a broadcast may match the sequence number of a
pending unicast message and cause confusion.
2014-03-16 13:05:04 +01:00
Tom Gundersen e09826dcf1 networkd: netdev - support joining already existing netdevs 2014-03-15 20:10:36 +01:00
Tom Gundersen 6a8402d956 sd-rtnl: make RTM_NEWLINK report EEXIST by default
Use RTM_SETLINK to update an existing link.
2014-03-15 20:04:42 +01:00
Kay Sievers d2d66d1ce7 timedated: print delay and jitter in debug output 2014-03-15 16:57:51 +01:00
Wieland Hoffmann 3a450ec5c6 _sd_machines: Use machinectl --no-legend
Otherwise bogus entries from the header and footer would show up in the
completion list.
2014-03-15 00:32:06 -04:00
Wieland Hoffmann d895500c47 zsh completion: Install _sd_machines with _machinectl
_machinectl uses _sd_machines to provide a list of all available
machines.
2014-03-15 00:32:06 -04:00
Zbigniew Jędrzejewski-Szmek 8fe90522fb timedated: use builtins for integer log and exp 2014-03-14 21:44:20 -04:00
Sebastian Thorarensen 40b71e89ba journald: add support for wall forwarding
This will let journald forward logs as messages sent to all logged in
users (like wall).

Two options are added:
 * ForwardToWall (default yes)
 * MaxLevelWall (default emerg)
'ForwardToWall' is overridable by kernel command line option
'systemd.journald.forward_to_wall'.

This is used to emulate the traditional syslogd behaviour of sending
emergency messages to all logged in users.
2014-03-14 22:05:25 +01:00
Sebastian Thorarensen 9003d9b0d6 utmp-wtmp: allow overriding username on wall
utmp_wall() now takes an optional argument 'username_override' which
allows the caller to override the username shown on wall messages.
journald will use this to inform users that its wall messages comes from
'systemd-journald'.
2014-03-14 21:27:33 +01:00
Lennart Poettering 5a4d665ad6 sd-bus: don't choke if somebody sends us a message with a unix fd count of 0
It's kinda pointless to include a unix fd header field in messages if it
carries the value 0, but let's do this anyway...
2014-03-14 21:17:14 +01:00
Lennart Poettering bbb6ff0216 sd-bus: don't access invalid memory if a signal matcher was freed from its own callback 2014-03-14 21:17:14 +01:00
Lennart Poettering 29bfbcd675 util: add hexdump() call to create pretty hexdumps of data
This is very useful when debugging sd-bus to look at messages.
2014-03-14 21:17:14 +01:00
Lennart Poettering edb2935c5c update TODO 2014-03-14 21:17:14 +01:00
Michael Olbrich eed0eee85a networkd: fix typo
It's HAVE_SPLIT_USR not HAVE_SPLIT_USER
2014-03-14 18:51:41 +01:00
Lennart Poettering a86eae57ff gpt: introduce root partition type GUIDs for ARM 32bit + ARM 64bit 2014-03-14 15:12:48 +01:00
Michael Marineau cf9a4abdc2 tmpfiles: add --root option to operate on an alternate fs tree
This makes it possible to initialize or cleanup an arbitrary filesystem
hierarchy in the same way that it would be during system boot.
2014-03-14 09:31:34 -04:00
Michael Marineau 4cf7ea556a shared: add root argument to search_and_fopen
This adds the same root argument to search_and_fopen that
conf_files_list already has. Tools that use those two functions as a
pair can now be easily modified to load configuration files from an
alternate root filesystem tree.
2014-03-14 09:31:34 -04:00
Zbigniew Jędrzejewski-Szmek 315db1a8ae Do not return -1 (EINVAL) on allocation error 2014-03-14 09:31:34 -04:00
Zbigniew Jędrzejewski-Szmek fe970a8a30 machine-id-setup: use path_kill_slashes and modernizations 2014-03-14 09:31:34 -04:00
Tom Gundersen cb44f25c12 man: network - clarify which options may be specified more than once. 2014-03-14 13:04:57 +01:00
Greg KH 92f2f92edc machine-id: add --root option to operate on an alternate fs tree
This makes it possible to initialize the /etc/machine-id file on an
arbitrary filesystem hierarchy.  This helps systems that wish to run
this at image creation time in a subdirectory, or from initramfs before
pivot-root is called.

[tomegun: converted to using _cleanup_free_ macros]
2014-03-14 12:44:17 +01:00
Tom Gundersen 06f021a804 networkd: allow more than one static DNS server 2014-03-14 12:44:17 +01:00
Tom Gundersen 0ea51a1129 networkd: fix creation of runtime dirs at startup
This allows us to drop the repeated attempted creations of the runtime dirs during runtime.
2014-03-14 12:44:17 +01:00
Tom Gundersen 2a1763edfb networkd: lease - store (up to) one dhcp lease file per interface
This removes an accidentally left-over test fragment.
2014-03-14 12:44:17 +01:00