Commit graph

23390 commits

Author SHA1 Message Date
Vito Caputo 046c93f8db sd-daemon: fix potential LISTEN_FDS overflow in sd_listen_fds() 2015-11-03 11:13:26 -08:00
Susant Sahani 7b2313f5ca core: parse socket port to extract_first_word 2015-11-03 22:49:05 +05:30
Daniel Mack 5604b971cf Merge pull request #1767 from poettering/journald-watchdog
restore journald watchdog
2015-11-03 17:53:15 +01:00
Lennart Poettering 119e9655dc journal: restore watchdog support 2015-11-03 17:45:12 +01:00
Lennart Poettering caffe412c7 sd-daemon: explicitly filter out -1 when parsing watchdog timeout
We already filter out 0, and as -1 is usually special (meaning infinity,
as in USEC_INFINITY) we should better not accept it either. Better safe
than sorry...
2015-11-03 17:45:12 +01:00
Lennart Poettering a0f29c767a util-lib: move CONF_DIRS_NULSTR definition to def.h
After all, this is not some compiler or C magic, but something very
specific to how systemd works, hence let's move it into def.h, and out
of macro.h
2015-11-03 17:45:11 +01:00
Lennart Poettering b11d6a7bed util-lib: move character class definitions to string-util.h 2015-11-03 17:45:11 +01:00
Lennart Poettering 5703176d6e Merge pull request #1764 from ssahani/jiffies-1
(V2) networkd: bridge convert to jiffies
2015-11-03 17:38:22 +01:00
Susant Sahani 1a14863e7e networkd: bridge prop convert to jiffies 2015-11-03 21:59:42 +05:30
Susant Sahani 87b8ce69f6 Time-util: introduce usec to jiffies 2015-11-03 21:58:42 +05:30
Daniel Mack e37c57106e Merge pull request #1765 from teg/pppoe-removal
sd-pppoe: drop
2015-11-03 16:22:17 +01:00
Tom Gundersen 0f8980e48b sd-pppoe: drop
It is really unclear if we want to / have the resources to support this fully, so drop it
for now. It can easily be brought back if a killer usecase emerges.

Note that this code was never hooked up, so this does not remove any features.
2015-11-03 16:14:12 +01:00
Daniel Mack 4084052911 Merge pull request #1726 from teg/networkd-2
networkd: (de)serialize more state and support expiring routes
2015-11-03 15:03:50 +01:00
Daniel Mack 8889cbd4dc Merge pull request #1763 from endocode/kayrus/fix_man_chattr
Fixed link to chattr man page
2015-11-03 14:47:55 +01:00
kayrus c30c611ce3 Fixed link to chattr man page 2015-11-03 14:39:47 +01:00
Martin Pitt 8218743e1e build-sys: temporarily lower libmount version check
util-linux 2.27.1's configure.ac still claims to be 2.27.0, which breaks our
version check. Lower it back to 2.27.0 until util-linux gets a fixed tarball.

See #1754
2015-11-03 07:25:34 -06:00
Dongsu Park a7d99d14d9 po: update Korean translation
update Korean translation for better understanding.

Reference: https://github.com/systemd/systemd/pull/1388
2015-11-03 13:22:25 +01:00
Lennart Poettering 8ba576d0e6 Merge pull request #1744 from evverx/fix-debug-generator
debug-generator: respect kernel parameters for default unit setting
2015-11-03 13:04:06 +01:00
Evgeny Vereshchagin 7dcc56715d debug-generator: respect kernel parameters for default unit setting 2015-11-03 14:47:39 +03:00
Evgeny Vereshchagin e2c9a13136 core: use runlevel_to_target for /proc/cmdline parsing 2015-11-03 14:24:52 +03:00
Evgeny Vereshchagin c573dcfeb1 proc-cmdline: add runlevel to target mapping 2015-11-03 14:09:03 +03:00
Daniel Mack 5dea1c1e79 Merge pull request #1754 from martinpitt/master
core: drop check for /etc/mtab
2015-11-03 07:24:02 +01:00
Daniel Mack 2ac7478409 Merge pull request #1759 from davidstrauss/master
man: Drop "internally," which is misleading
2015-11-03 07:16:35 +01:00
Daniel Mack a31afe1a18 Merge pull request #1758 from poettering/varietygalore
A grab bag of stuff
2015-11-03 07:15:44 +01:00
Susant Sahani 3d276dd2c0 man: add man for vxlan onfigures max number of FDB entries 2015-11-03 09:28:03 +05:30
Susant Sahani 3dbcf57957 networkd: vxlan add option to set FDB entries
Add support to configures maximum number of FDB entries.
2015-11-03 09:28:03 +05:30
David Strauss 3122633a91 man: Drop "internally," which is misleading
The existing text misleads readers into thinking how the notify socket protocol is "internals" and that they can only use the functions. However, the socket is part of the Interface Stability Promise. So, we should drop "internally" from the description so the man page both indicates both how the functions work and how one would talk to the socket directly.
2015-11-02 17:19:26 -08:00
Zbigniew Jędrzejewski-Szmek 2c1a55cf3f log-generator: add option to generate easily compressible data
This is useful to check that compression actually works, and how
compression influences file size in the best-case-scenario for
compression. (The answer is that not as much as one would hope:
there's still a big overhead of the indexing and since every field
is compressed separately, even fields that compress very well
contribute to the file size. This overhead becomes negligible only
for very big fields.)
2015-11-03 00:23:16 +01:00
Lennart Poettering 6ad623a3f7 parse-util: introduce parse_ifindex() and make use of it everywhere
We have enough places where we parse an ifindex, hence introduce a
proper parsing function for it, that verifies all parameters.
2015-11-03 00:02:00 +01:00
Lennart Poettering 6a37c68469 machine: when we fail to extract a network interface from the machine state, don't try again
If we failed to extract a word, then that's how it is, we shouldn't try
to extract it again and again, it's unlikely to work, and we just
deadlock.

This is a fix-up for 52278ad31d.
2015-11-03 00:02:00 +01:00
Lennart Poettering 5768d25949 journalctl: when we fail to open a journal file, print why
When we enumerate journal files and encounter an invalid one, remember
which this, and show it to the user.

Note the possibly slightly surprising logic here: we store only one path
per error code. This means we show all error kinds but not every actual
error we encounter. This has the benefit of not requiring us to keep a
potentially unbounded list of errors with their sources around, but can
still provide a pretty complete overview on the errors we encountered.

Fixes #1669.
2015-11-03 00:02:00 +01:00
Lennart Poettering d617408ecb sd-journal: various clean-ups and modernizations
- Always print a debug log message about files and directories we cannot
  open right when it happens instead of the caller, thus reducing the
  number of places where we need to generate the debug message.

- Always push the errors we encounter immediately into the error set,
  when we run into them, instead of in the caller. Thus, we never forget
  to push them in.

- Use stack instead of heap memory where we can.

- Make remove_file() void, since it cannot fail anyway and always
  returned 0.

- Make local machine check of journal directories explicit in a
  function, to make things more readable.

- Port to all directory listing loops FOREACH_DIRENT_ALL()

- sd-daemon is library code, hence never log at higher log levels than
  LOG_DEBUG.
2015-11-03 00:02:00 +01:00
Lennart Poettering 4f52b822b0 journalctl: continue operation, even if we run into an invalid file 2015-11-03 00:02:00 +01:00
Zbigniew Jędrzejewski-Szmek cfb571f30f journal: return better error for empty files
When reading stuff, we should only return EIO when an actual read error
occured, not when we don't like the data for whatever reason.

We already return ENODATA for all other kinds of file truncation, hence
do the same for the most obvious kind, so that callers know what ENODATA
means.
2015-11-03 00:02:00 +01:00
Lennart Poettering d8e023aa07 core: expose number of file descriptors in fd store on the bus
For each service expose how many file descriptors there are currently in
the fd store.

(Also, fix the exporting of the fdstore limit, given that the field is
just an "unsigned" but we exported it as "uint32_t". Not that there way
any effective difference, but let's make this clean...)
2015-11-02 23:44:05 +01:00
Lennart Poettering 934ae16baf proc-cmdline: return proper errors from shall_restore_state()
Let's not eat up errors in shall_restore_state(), but in the consumers
instead, just for the sake of keeping the library calls generic.
2015-11-02 23:44:05 +01:00
Lennart Poettering 19854865a8 core: bump net.unix.max_dgram_qlen really early during boot
Only that way it actually has an effect on all our sockets, including
$NOTIFY_SOCKET.
2015-11-02 23:44:05 +01:00
Ronny Chevalier 3342582deb Merge pull request #1757 from phomes/minor-fixes
Minor fixes
2015-11-02 23:27:49 +01:00
Thomas Hindoe Paaboel Andersen 859fdd1eea sysv-generator: remove duplicate const
I assume this was a typo in c279613f86
2015-11-02 23:18:20 +01:00
Thomas Hindoe Paaboel Andersen f2c624cb8b man: various typos 2015-11-02 23:18:20 +01:00
Lennart Poettering 9fe4ea21be string-util: rework memory_erase() so that it cannot be optimized away
memory_erase() so far just called memset(), which the compiler might
optimize away under certain conditions if it feels there's benefit in
it. C11 knows a new memset_s() call that is like memset(), but may not
be optimized away. Ideally, we'd just use that call, but glibc currently
does not support it. Hence, implement our own simplistic version of it.

We use a GCC pragma to turn off optimization for this call, and also use
the "volatile" keyword on the pointers to ensure that gcc will use the
pointers as-is. According to a variety of internet sources, either one
does the trick. However, there are also reports that at least the
volatile thing isn't fully correct, hence let's add some snake oil and
employ both techniques.

https://news.ycombinator.com/item?id=4711346
2015-11-02 23:07:20 +01:00
Lennart Poettering 5732a7dbb0 Merge pull request #1690 from evverx/run-runtime-directory
systemd-run can launch units with RuntimeDirectory
2015-11-02 20:16:18 +01:00
Lennart Poettering 3e66a83cc3 Merge pull request #1736 from ronnychevalier/rc/test_execute_more_tests2
test-execute: add more tests
2015-11-02 20:06:48 +01:00
Lennart Poettering 88cee0cf9c Merge pull request #1753 from fbuihuu/teach-delegate-for-runtime
Teach bus_append_unit_property_assignment() about 'Delegate' property
2015-11-02 19:52:00 +01:00
Lennart Poettering a05207c1e8 Merge pull request #1755 from ssahani/word-systemctl
systemctl: port to extract_first_word
2015-11-02 19:50:51 +01:00
Susant Sahani 5ab22f3321 systemctl: port to extract_first_word 2015-11-02 21:47:40 +05:30
Martin Pitt 1d40ddbfd3 core: drop check for /etc/mtab
util-linux 2.27.1 now entirely stops looking at /etc/mtab, so we don't need to
verify /etc/mtab during early boot any more. Later on, tmpfiles.d/etc.conf will
fix /etc/mtab anyway, so there's not even a point in warning about it.

Drop test_mtab() and bump the util-linux dependency to >= 2.17.1.

Fixes #1495
2015-11-02 10:05:20 -06:00
Daniel Mack 0fc85c8670 Merge pull request #1751 from ssahani/word-machine
machine: fix #1739
2015-11-02 12:38:24 +01:00
Franck Bui ea1a971646 Teach bus_append_unit_property_assignment() about 'Delegate' property 2015-11-02 12:37:45 +01:00
Susant Sahani 52278ad31d machine: fix extract_first_word 2015-11-02 16:55:59 +05:30