Commit Graph

16768 Commits

Author SHA1 Message Date
Lennart Poettering af4ec4309e notify: send STOPPING=1 from our daemons 2014-08-21 17:24:21 +02:00
Lennart Poettering 308d72dc1e core: allow informing systemd about service status changes with RELOADING=1 and STOPPING=1 sd_notify() messages 2014-08-21 17:24:21 +02:00
Lennart Poettering 70af4d17da manager: don#t dispatch sd_notify() messages and SIGCHLD multiple times to the same units 2014-08-21 17:24:21 +02:00
Lennart Poettering 55836941ff manager: reuse sockaddr_union instead of redefining our own version of it 2014-08-21 17:24:21 +02:00
Lennart Poettering 28849dbadb service,strv: introduce strv_find_startswith() and make use of it
Unlike strv_find_prefix() the new call will return a pointer to the
suffix of the item we found, instead of the whole item. This is more
closer inline with what startswith() does, and allows us to simplify a
couple of invocations.
2014-08-21 17:24:21 +02:00
Lennart Poettering f49650cee2 service: don't invoke functions at the same time as declaring variables 2014-08-21 17:24:21 +02:00
Lennart Poettering 8bb2d17d2b service: remove some pointless linebreaks, to make things more readable 2014-08-21 17:24:21 +02:00
Lennart Poettering abb4c1cc01 service: asynchronous_close() already checks for negative parameters, no need to duplicate that 2014-08-21 17:24:21 +02:00
Lennart Poettering 4c94096027 core: unify how we generate the prefix string when dumping unit state 2014-08-21 17:24:21 +02:00
Lennart Poettering 5ed1227238 util: make asynchronous_close() really work like an asynchronous version of safe_close()
Save/restore errno, like we do in safe_close(). And don't fork a thread
if the parameter is already negative.
2014-08-21 17:24:21 +02:00
Lennart Poettering a9f85faf43 util: simplify close_nointr() a bit 2014-08-21 17:24:21 +02:00
Lennart Poettering 11adc1aef7 util: change return value of startswith() to non-const
This way we can use it on non-const strings, and don't end up with a
const'ified result.

This is similar to libc's strstr() which also takes a const string but
returns a non-const one.
2014-08-21 17:24:21 +02:00
Lennart Poettering 3fdbc82058 CODING_STYLE: document that we don't break lines at 80ch 2014-08-21 17:24:21 +02:00
Harald Hoyer 730836403a journalctl: add "-t --identifier=STRING" option
This turns journalctl to the counterpart of systemd-cat.
Messages sent with

systemd-cat --identifier foo --prioritiy debug

can now be shown with

journalctl --identifier foo --prioritiy debug

"--identifier" is not merged with "--unit" to make a clear
distinction between syslog and systemd units.
syslog identifiers can be chosen freely by anyone.
2014-08-21 14:16:29 +02:00
Tom Gundersen 9b36454543 sd-event: add API to access epoll_fd
This is a prerequisite for integrating sd-event into an external
event loop.
2014-08-20 17:24:11 +02:00
Tom Gundersen a9feff3d77 resolved: write resolv.conf search - switch arguments
Found by Lukáš Nykrýn.
2014-08-20 15:56:18 +02:00
Lukas Nykryn e1ad6e245d journal-upload: make sure that 'r' is initialized 2014-08-20 15:13:06 +02:00
Lukas Nykryn 081e009bef util: return after freeing all members of array 2014-08-20 15:02:09 +02:00
Lukas Nykryn 7a855149ea journal-remote: remove unreachable code 2014-08-20 14:51:46 +02:00
Lennart Poettering be754d5443 resolved: fix which return codes we check
Discovered by Lukas Nykryn
2014-08-20 14:48:18 +02:00
Lukas Nykryn 03664a6291 resolved-dns-rr: fix typo
a->rrsig.type_covered != a->rrsig.type_covered" is always false
regardless of the values of its operands because those operands are identical.
2014-08-20 14:34:26 +02:00
Lennart Poettering 5dd6d0f8ff machine-id-setup: don't try to read UUID from VM/container manager if we operate on a root directory that's not /
This should make sure no UUID from the host systemd-machine-id-setup is
running on leaks onto a disk image that is provisioned with the tool.
2014-08-20 13:51:17 +02:00
Tom Gundersen 413f6df864 build: remove repeated KMOD section 2014-08-20 11:25:23 +02:00
Lukas Nykryn fdbdf6ec29 systemctl: fail in the case that no unit files were found
Previously systemctl died with message

-bash-4.2# systemctl --root /rawhi list-unit-files
(src/systemctl/systemctl.c:868) Out of memory.

in the case that no unit files were found in the --root
or the directory did not exist.

So lets return ENOENT in the case that --root does not exist
and empty list in the case that there are no unit files.
2014-08-20 10:45:18 +02:00
Lennart Poettering 5d0ae62c66 CONST_MAX breaks gcc on fedora 20 with optimiztation 2014-08-20 00:57:17 +02:00
Lennart Poettering 0340a83b26 build: include more optional modules in build string 2014-08-20 00:47:43 +02:00
Lennart Poettering cccc74971f update hwdb 2014-08-20 00:38:39 +02:00
Lennart Poettering 5364f729ba indentation/spurious whitespace fixes 2014-08-20 00:18:14 +02:00
Lennart Poettering 4015ac5c32 journal-upload: allow the tool to start 2014-08-20 00:18:14 +02:00
Lennart Poettering dad29dff19 cmdline: for new tools avoid introduce new negative switches, and properly align --help texts
Negative switches are a bad un-normalized thing. We alerady have some,
but we should try harder to avoid intrdoucing new ones.

Hence, instead of adding two switches:

        --foobar
        --no-foobar

Let's instead use the syntax

        --foobar
        --foobar=yes
        --foobar=no

Where the first two are equivalent. The boolean argument is parsed
following the usual rules.

Change all new negative switches this way.

This patch also properly aligns the --help table, so that single char
switches always get a column separate of the long switches.
2014-08-20 00:18:14 +02:00
Lennart Poettering f9ffbca2fb README: mention the new optional libidn dependency 2014-08-20 00:18:14 +02:00
Lennart Poettering 01da80b1aa update NEWS 2014-08-20 00:18:14 +02:00
Ronny Chevalier 0566ef68b8 man: fix typos 2014-08-20 00:00:16 +02:00
Tom Gundersen 265684034f NEWS 2014-08-19 23:58:16 +02:00
Thomas Hindoe Paaboel Andersen c46409021f sysusers: initialize r
Needed for the stdin case where it could otherwise end up being used
uninitialized.
2014-08-19 23:27:44 +02:00
Thomas Hindoe Paaboel Andersen 5f02e26ca7 NEWS: typo fixes 2014-08-19 23:10:53 +02:00
Thomas Hindoe Paaboel Andersen ac45dec934 remove unused variables 2014-08-19 22:55:42 +02:00
Lennart Poettering d5a169aaee build-sys: update versions for upcoming release 2014-08-19 22:45:53 +02:00
Lennart Poettering 5755381f53 memfd: escape the comm field we get from PR_GET_NAME, but assume everything else is proper UTF8 2014-08-19 22:35:04 +02:00
Daniel Mack a1a4a25e7f NEWS: fix minor nits 2014-08-19 22:23:43 +02:00
Daniel Mack ea47ff6697 memfd: skip utf-8 escaping if we use a name that was passed in
If a name was passed in as function argument, trust it, and don't do utf-8
encoding for them. Callers are obliged to check the names themselves, and
escape them in case they use anything they got from the outside world.
2014-08-19 22:08:54 +02:00
Lennart Poettering 3cd761e4df socket: suffix newly added TCP sockopt time properties with "Sec"
This is what we have done so far for all other time values, and hence we
should do this here. This indicates the default unit of time values
specified here, if they don't contain a unit.
2014-08-19 21:58:48 +02:00
Lennart Poettering a4a79605f7 README: document what to do with the NSS modules 2014-08-19 21:58:48 +02:00
Lennart Poettering b2ca0d6327 prepare NEWS for next release 2014-08-19 21:58:48 +02:00
Daniel Mack 8f2807bab5 memfd: reduce name escaping logic to utf-8 checks
As memfds are now created by proper kernel API, and not by our functions, we
can't rely on names being escaped/unescaped according to our current logic.

Thus, the only safe way is to remove the escaping and when reading names,
just escape names that are not properly encoded in UTF-8.

Also, remove assert(name) lines from the memfd creation functions, as we
explictly allow name to be NULL.
2014-08-19 21:49:05 +02:00
Lennart Poettering 4531a9bc20 memfd: simplify API
Now, that the memfd stuff is not exported anymore, we can simplify a few
things:

Use assert() instead of assert_return(), since this is used internally
only, and we should be less permissive then.

No need to pass an allocated fd back by call-by-reference, we can just
directly return it.
2014-08-19 19:39:16 +02:00
Lennart Poettering 8a0dec98a3 update TODO 2014-08-19 19:22:40 +02:00
Lennart Poettering 3bb07b7680 Revert "socket: introduce SELinuxLabelViaNet option"
This reverts commit cf8bd44339.

Needs more discussion on the mailing list.
2014-08-19 19:16:08 +02:00
Lennart Poettering 8530dc4467 tmpfiles: add new 'r' line type to add UIDs/GIDs to the pool to allocate UIDs/GIDs from
This way we can guarantee a limited amount of compatibility with
login.defs, by generate an appopriate "r" line out of it, on package
installation.
2014-08-19 19:06:39 +02:00
Tom Gundersen 81163121e6 networkd: don't consider deprecated or tentative addresses when determining operstate
https://bugs.freedesktop.org/show_bug.cgi?id=81287
2014-08-19 19:01:38 +02:00