Lennart Poettering [Wed, 7 Oct 2015 13:48:58 +0000 (15:48 +0200)]
Update NEWS
Lennart Poettering [Wed, 7 Oct 2015 13:45:25 +0000 (15:45 +0200)]
analyze: trivial code cleanups
Lennart Poettering [Wed, 7 Oct 2015 13:45:04 +0000 (15:45 +0200)]
update NEWS
Daniel Mack [Wed, 7 Oct 2015 13:32:42 +0000 (15:32 +0200)]
Merge pull request #1484 from poettering/ask-pass-kernel-keyring
cache harddisk passwords in the kernel keyring
Lennart Poettering [Wed, 7 Oct 2015 12:59:51 +0000 (15:59 +0300)]
Merge pull request #1485 from jsynacek/machine-long-filename-v5
import: hash URL in paths if they are too long
Lennart Poettering [Wed, 7 Oct 2015 12:54:04 +0000 (15:54 +0300)]
Merge pull request #1487 from michich/fix-env-expansion
Fix env expansion
Lennart Poettering [Wed, 7 Oct 2015 12:53:21 +0000 (15:53 +0300)]
Merge pull request #1486 from michich/crash-handler
core: crash handler changes, CrashChangeVT parsing fix
Michal Schmidt [Wed, 7 Oct 2015 12:40:54 +0000 (14:40 +0200)]
man: fix typo ('and' -> 'are')
Michal Schmidt [Wed, 7 Oct 2015 12:40:44 +0000 (14:40 +0200)]
basic: fix env expansion for strings leading with two dollar signs
The way to escape a literal dollar sign is to write "$$". But this does
not work right if it's at the beginning of the argument. Fix it.
Michal Schmidt [Wed, 30 Sep 2015 15:08:04 +0000 (17:08 +0200)]
core: always let the kernel reap zombies when we're about to freeze
Regardless of whether we're going to spawn a crash shell or not, let the
kernel reap zombies. It's more consistent this way.
Michal Schmidt [Wed, 30 Sep 2015 13:12:19 +0000 (15:12 +0200)]
core: change how crash_shell and crash_reboot interact
Instead of freezing in PID1 and letting the forked child freeze or
reboot when exec("/bin/sh") fails, just wait for the child's
exit and then do the freeze_or_reboot in PID1 as usual.
This means that when both crash_shell and crash_reboot are enabled, the
system will reboot after the shell exits.
Michal Schmidt [Wed, 7 Oct 2015 11:56:43 +0000 (13:56 +0200)]
core: remove spurious assert in parsing CrashChangeVT=
"data" is always NULL (and unused) in config_parse_crash_chvt().
Jan Synacek [Fri, 2 Oct 2015 09:00:19 +0000 (11:00 +0200)]
import: hash URL in paths if they are too long
https://bugzilla.redhat.com/show_bug.cgi?id=1266775
Michal Schmidt [Wed, 30 Sep 2015 12:42:27 +0000 (14:42 +0200)]
core: adjust error message about /etc/mtab
Since having /etc/mtab as a regular file is now a fatal error, stop
mentioning irrelevant minor consequences.
Lennart Poettering [Wed, 7 Oct 2015 09:26:10 +0000 (11:26 +0200)]
ask-password: add support for caching passwords in the kernel keyring
This adds support for caching harddisk passwords in the kernel keyring
if it is available, thus supporting caching without Plymouth being
around.
This is also useful for hooking up "gdm-auto-login" with the collected
boot-time harddisk password, in order to support gnome keyring
passphrase unlocking via the HDD password, if it is the same.
Any passwords added to the kernel keyring this way have a timeout of
2.5min at which time they are purged from the kernel.
Daniel Mack [Wed, 7 Oct 2015 09:37:21 +0000 (11:37 +0200)]
Merge pull request #1481 from again4you/devel/smack_sysuser_#4
smack: label /etc/passwd and friends as '_' smack label when --with-smack-run-label' is enabled (v3)
Daniel Mack [Wed, 7 Oct 2015 09:36:29 +0000 (11:36 +0200)]
Merge pull request #1478 from steelman/analyze-without-hostnamed-fix
analyze: minor fixes according to review
Daniel Mack [Wed, 7 Oct 2015 09:18:27 +0000 (11:18 +0200)]
Merge pull request #1483 from reverendhomer/patch-2
service: fix memory leak in service_add_fd_store()
Daniel Mack [Wed, 7 Oct 2015 09:16:08 +0000 (11:16 +0200)]
Merge pull request #1482 from reverendhomer/patch-1
strv: fix infinite loop in strv_extend_n()
reverendhomer [Wed, 7 Oct 2015 08:55:31 +0000 (11:55 +0300)]
service: fix memory leak in service_add_fd_store()
fixes Coverity #1325767
reverendhomer [Wed, 7 Oct 2015 08:52:10 +0000 (11:52 +0300)]
strv: fix infinite loop in strv_extend_n()
Fixes Coverity #1325768
Sangjung Woo [Tue, 6 Oct 2015 10:08:16 +0000 (19:08 +0900)]
smack: label /etc/passwd and friends as '_' smack label when --with-smack-run-label' is enabled
systemd-sysusers.service unit creates system users and groups and it
could update /etc/passwd, /etc/group, /etc/shadow and /etc/gshadow.
Those files should have '_' smack label because of accessibility.
However, if systemd has its own smack label using '--with-smack-run-label'
configuration, systemd-sysusers process spawned by systemd(pid:1) has
its parent smack label and eventually updated files also is set as its
parent smack label.
This patch fixes that bug by labeling updated files as '_' smack label
when --with-smack-run-label' is enabled.
Łukasz Stelmach [Wed, 7 Oct 2015 06:02:31 +0000 (08:02 +0200)]
analyze: minor fixes according to review
+ use _cleanup_host_info in acquire_host_info()
+ revert the first strempty() to show "Linux" string in case
os_pretty_name is missing.
Daniel Mack [Tue, 6 Oct 2015 16:23:02 +0000 (18:23 +0200)]
Merge pull request #1475 from steelman/analyze-without-hostnamed
Analyze without hostnamed [V3]
Daniel Mack [Tue, 6 Oct 2015 16:12:25 +0000 (18:12 +0200)]
Merge pull request #1474 from teg/siphash24
siphash: style fixes
Łukasz Stelmach [Fri, 2 Oct 2015 07:45:49 +0000 (09:45 +0200)]
analyze: replace isempty()+ternary with strempty()
Łukasz Stelmach [Wed, 23 Sep 2015 15:20:59 +0000 (17:20 +0200)]
analyze: do not require information from hostnamed
Łukasz Stelmach [Tue, 6 Oct 2015 13:57:14 +0000 (15:57 +0200)]
analyze: introduce _cleanup_host_info_
Tom Gundersen [Tue, 6 Oct 2015 14:31:58 +0000 (16:31 +0200)]
siphash24: coding-style fixes
Drop custom types. Drop unnecessary macros. Fix whitespace. Add asserts.
Tom Gundersen [Tue, 6 Oct 2015 13:04:42 +0000 (15:04 +0200)]
siphash24: unify API
Make the API of the new helpers more similar to the old wrapper.
In particular we now return the hash as a byte string to avoid
any endianness problems.
Lennart Poettering [Tue, 6 Oct 2015 14:27:24 +0000 (16:27 +0200)]
ask-password: various modernizations
Primarily clean-up error logging: log either all or no error messages in
the various functions. Mostly this means the actual password querying
calls no longer will log on their own, but the callers have to do so.
Contains various other fixes too, for example ports some code over to
use the clean-up macro.
Should contain no functional changes.
Lennart Poettering [Tue, 6 Oct 2015 14:18:20 +0000 (17:18 +0300)]
Merge pull request #1473 from michich/test-hashmap
test: hashmap - increase number of entries for crippled hash test
Lennart Poettering [Tue, 6 Oct 2015 13:52:03 +0000 (15:52 +0200)]
update CODING_STYLE
Daniel Mack [Tue, 6 Oct 2015 12:59:24 +0000 (14:59 +0200)]
Merge pull request #1469 from poettering/even-more-fixed
Even more fixes
Michal Schmidt [Tue, 6 Oct 2015 12:56:33 +0000 (14:56 +0200)]
test: hashmap - increase number of entries for crippled hash test
The purpose of testing with the crippled hash function is to cover
the otherwise very unlikely codepath in bucket_calculate_dib() where
it has to fall back to recomputing the hash value.
This unlikely path was not covered by test-hashmap anymore after
57217c8f "test: hashmap - cripple the hash function by truncating the
input rather than the output".
Restore the test coverage by increasing the number of entries in the test.
The number was determined empirically by checking with lcov.
Lennart Poettering [Tue, 6 Oct 2015 11:02:10 +0000 (14:02 +0300)]
Merge pull request #1465 from teg/siphash24
hashmap/siphash24: refactor hash functions
Lennart Poettering [Tue, 6 Oct 2015 10:33:25 +0000 (12:33 +0200)]
update NEWS
Lennart Poettering [Tue, 6 Oct 2015 10:33:14 +0000 (12:33 +0200)]
util: some comment fixes in fdname_is_valid()
Lennart Poettering [Tue, 6 Oct 2015 10:32:50 +0000 (12:32 +0200)]
strv: properly return ENOMEM where we should in strv_extend_n()
Lennart Poettering [Tue, 6 Oct 2015 10:32:31 +0000 (12:32 +0200)]
activate: validate fdname when accepting it
Lennart Poettering [Tue, 6 Oct 2015 10:32:15 +0000 (12:32 +0200)]
man: use <function> where we refer to functions
Tom Gundersen [Tue, 6 Oct 2015 10:11:44 +0000 (12:11 +0200)]
NEWS
Tom Gundersen [Tue, 6 Oct 2015 10:06:56 +0000 (12:06 +0200)]
Merge pull request #1468 from poettering/fdnames
Add support for naming fds for socket activation and more
Tom Gundersen [Tue, 6 Oct 2015 09:58:52 +0000 (11:58 +0200)]
Merge pull request #1467 from jacob-keller/master
networkd: document ability to disable MACAddressPolicy
Tom Gundersen [Tue, 6 Oct 2015 09:57:53 +0000 (11:57 +0200)]
Merge pull request #1466 from kaysievers/wip
libsystemd: sd-device - translate / vs. ! in sysname
Tom Gundersen [Tue, 6 Oct 2015 09:54:14 +0000 (11:54 +0200)]
NEWS
Lennart Poettering [Tue, 6 Oct 2015 08:24:02 +0000 (10:24 +0200)]
unit: give systemd-networkd.socket a better description
Usually we try to properly uppercase first characters in the
description, do so here, too. Also, keep it close to the string used in
systemd-networkd.service.
Lennart Poettering [Tue, 6 Oct 2015 08:03:58 +0000 (10:03 +0200)]
man: add "systemd-analyze set-log-target" to synopsis too
It's already documented in prose, now add it to the synopsis too.
Lennart Poettering [Sun, 4 Oct 2015 15:36:19 +0000 (17:36 +0200)]
core: add support for naming file descriptors passed using socket activation
This adds support for naming file descriptors passed using socket
activation. The names are passed in a new $LISTEN_FDNAMES= environment
variable, that matches the existign $LISTEN_FDS= one and contains a
colon-separated list of names.
This also adds support for naming fds submitted to the per-service fd
store using FDNAME= in the sd_notify() message.
This also adds a new FileDescriptorName= setting for socket unit files
to set the name for fds created by socket units.
This also adds a new call sd_listen_fds_with_names(), that is similar to
sd_listen_fds(), but also returns the names of the fds.
systemd-activate gained the new --fdname= switch to specify a name for
testing socket activation.
This is based on #1247 by Maciej Wereski.
Fixes #1247.
Daniel Mack [Tue, 6 Oct 2015 09:02:04 +0000 (11:02 +0200)]
Merge pull request #1452 from poettering/journal-vacuum
A variety of journal vacuuming improvements, plus an nspawn fix
Lennart Poettering [Sat, 3 Oct 2015 14:41:36 +0000 (16:41 +0200)]
core: simplify fd collection code, return number of fds as return value
Let's simplify the fd collection code a bit, and return the number of
collected fds as positive integer, the way it's customary in our usual
code.
Lennart Poettering [Sat, 3 Oct 2015 14:39:57 +0000 (16:39 +0200)]
socket: don't double close the same fd for FIFOs
Lennart Poettering [Sat, 3 Oct 2015 14:38:52 +0000 (16:38 +0200)]
gpt-auto-generator: fix duplicate backing partition check
We shouldn't exit the loop early, otherwise our duplicate backing
partition check won't work.
Jacob Keller [Mon, 5 Oct 2015 21:14:45 +0000 (14:14 -0700)]
document ability to disable MACAddressPolicy
While it is currently possible to either not set MACAddressPolicy or set
it to a value different from "persistent" or "random", it is not obvious
that a user can do so. Add a policy, "none", which simply retains kernel
MAC addresses (same as not filling in the policy at all) and document it
so that users are aware of this setting.
Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
Kay Sievers [Mon, 5 Oct 2015 22:41:32 +0000 (00:41 +0200)]
libsystemd: sd-device - translate / vs. ! in sysname
The kernel replaces '/' in device names with '!', we translate that back
to '/' in sysname, when taking sysname as input, we should translate it
back again.
Tom Gundersen [Mon, 5 Oct 2015 21:25:06 +0000 (23:25 +0200)]
Merge pull request #1462 from lnykryn/analyze-manpage
man: LEVEL in systemd-analyze set-log level is not optional
Tom Gundersen [Mon, 5 Oct 2015 21:24:09 +0000 (23:24 +0200)]
Merge pull request #1406 from blaskovic/journal-remote-typo
journal-remote: typo in log_error when no sources are specified
[tomegun: this was a pun, but let's not do that]
Tom Gundersen [Mon, 5 Oct 2015 21:16:43 +0000 (23:16 +0200)]
Merge pull request #1448 from bengal/lldp-export-v5
LLDP: add API to export neighbors list (v5)
Tom Gundersen [Mon, 5 Oct 2015 20:44:38 +0000 (22:44 +0200)]
Merge pull request #1459 from ssahani/bridge1
networkd: add bridge properties
Tom Gundersen [Mon, 5 Oct 2015 20:42:44 +0000 (22:42 +0200)]
Merge pull request #1372 from jemk/prefsrc
networkd: add support to configure preferred source of static routes
Tom Gundersen [Sat, 3 Oct 2015 23:59:06 +0000 (01:59 +0200)]
hashmap: hash_funcs - make inputs unambiguous
Make sure all variable-length inputs are properly terminated or that
their length is encoded in some way. This avoids ambiguity of
adjacent inputs.
E.g., in case of a hash function taking two strings, compressing "ab"
followed by "c" is now distinct from "a" followed by "bc".
Tom Gundersen [Sat, 3 Oct 2015 22:22:41 +0000 (00:22 +0200)]
hashmap: refactor hash_func
All our hash functions are based on siphash24(), factor out
siphash_init() and siphash24_finalize() and pass the siphash
state to the hash functions rather than the hash key.
This simplifies the hash functions, and in particular makes
composition simpler as calling siphash24_compress() repeatedly
on separate chunks of input has the same effect as first
concatenating the input and then calling siphash23_compress()
on the result.
Tom Gundersen [Sat, 3 Oct 2015 23:14:41 +0000 (01:14 +0200)]
test: hashmap - cripple the hash function by truncating the input rather than the output
The reason for the crippled hash function is to reduce the distribution
of the hash function, do this by truncating the domain rather than the
range. This does introduce a change in behavoir as the range is no longer
contiguous, which greatly reduces collisions.
This is needed as a follow-up patch will no longer allow individual hash
functions to alter the output directly.
Tom Gundersen [Sat, 3 Oct 2015 22:24:23 +0000 (00:24 +0200)]
test: siphash24 - verify internal state and composability
Verify the state of the hash-function according to the reference paper,
also verify that we can decompose the input and hash the chunks one
by one and still get the same result.
Tom Gundersen [Sat, 3 Oct 2015 22:23:25 +0000 (00:23 +0200)]
siphash24: expose the internal helper functions
Tom Gundersen [Sat, 3 Oct 2015 20:21:44 +0000 (22:21 +0200)]
siphash24: make siphash24_compress decomposable
This allows the input to siphash24_compress to be decomposed into
smaller chunks and the function to be called on each individual
chunk.
Tom Gundersen [Sat, 3 Oct 2015 19:27:25 +0000 (21:27 +0200)]
siphash24: move last compression iteration from compression step to finalization step
The last compression is special as it deals with the length byte, and padding. Move
it to the finalization step in preparation for making compression decomposable.
Tom Gundersen [Sat, 3 Oct 2015 18:21:01 +0000 (20:21 +0200)]
siphash24: split out the compression step
Tom Gundersen [Sat, 3 Oct 2015 18:14:18 +0000 (20:14 +0200)]
siphash24: split out the finalization step
Tom Gundersen [Sat, 3 Oct 2015 18:09:43 +0000 (20:09 +0200)]
siphash24: introduce state struct
Encapsulate the four state variables in a struct so we can more easily pass
them around.
Tom Gundersen [Sat, 3 Oct 2015 16:41:02 +0000 (18:41 +0200)]
test: siphash24 - add regression test
Lukas Nykryn [Mon, 5 Oct 2015 10:19:13 +0000 (12:19 +0200)]
man: LEVEL in systemd-analyze set-log level is not optional
rhbz#1268336
Daniel Mack [Mon, 5 Oct 2015 09:31:21 +0000 (11:31 +0200)]
Merge pull request #1461 from Danielmachon/patch-1
Update NEWS
Daniel Machon [Mon, 5 Oct 2015 09:15:16 +0000 (11:15 +0200)]
Update NEWS
Fixed spelling error: seriban -> serbian
Daniel Mack [Mon, 5 Oct 2015 07:47:58 +0000 (09:47 +0200)]
NEWS update
Susant Sahani [Mon, 5 Oct 2015 04:08:32 +0000 (09:38 +0530)]
man: add man for bridge params
Susant Sahani [Mon, 5 Oct 2015 04:08:00 +0000 (09:38 +0530)]
networkd: add bridge properties
ForwardDelaySec: forward delay
HelloTimeSec: hello time
MaxAgeSec: maximum message age
for more information see
http://www.tldp.org/HOWTO/BRIDGE-STP-HOWTO/set-up-the-bridge.html
In kernel
br_dev_newlink: does not have the this functionality to set while
creation.
br_changelink: after creation we can change the parameters.
we need to first create then set it the parameters.
Introduce new callback post_create .This should
set the properties after the creation.
Susant Sahani [Mon, 5 Oct 2015 04:06:57 +0000 (09:36 +0530)]
sd-rtnl: introduce new API to set the NL header flags
By default we set as NLM_F_CREATE | NLM_F_EXCL in
sd_rtnl_message_new_link
But incase of bridge we need to set NLM_F_REQUEST | NLM_F_ACK.
If NLM_F_EXCL is set then we are unable to set the parameters. As bridge
supports setting properties after creation not during creation.
Susant Sahani [Mon, 5 Oct 2015 04:06:05 +0000 (09:36 +0530)]
sd-rtnl: sd-netlink: add support for bridge NL parametrs
Rename rtnl_link_info_data_bridge_types to
rtnl_link_bridge_management_types
as they are of nested types of IFLA_AF_SPEC.
Susant Sahani [Mon, 5 Oct 2015 04:05:36 +0000 (09:35 +0530)]
missing.h : add bridge params
Kay Sievers [Sun, 4 Oct 2015 18:25:44 +0000 (20:25 +0200)]
Merge pull request #1457 from martinpitt/master
keymap: Add Thinkpad Yoga 12 (2015)
Lennart Poettering [Sun, 4 Oct 2015 15:34:44 +0000 (18:34 +0300)]
Merge pull request #1454 from kostich/master
po, catalog: added Serbian translation.
Martin Pitt [Sun, 4 Oct 2015 12:31:00 +0000 (14:31 +0200)]
keymap: Add Thinkpad Yoga 12 (2015)
Fixes #1440
Марко М. Костић (Marko M. Kostić) [Sat, 3 Oct 2015 20:07:29 +0000 (22:07 +0200)]
po, catalog: added Serbian translation.
Lennart Poettering [Sat, 3 Oct 2015 11:37:21 +0000 (13:37 +0200)]
core: don't unset reload result, unless we begin a start or reload operation
Much like the result of the service itself we should not reset the
reload result unless we actually start from the beginning, so that
clients can query it at any time.
Specifically, let's reset the result states only when we begin with a
start operation (for both the main result, and the reload result), when
we begin with a reload operation (only for the load result), or when the
use explicitly asks for that via "systemctl reset-failed".
This is a more generic fix for #1447.
Fixes #1447.
Lennart Poettering [Sat, 3 Oct 2015 10:04:47 +0000 (12:04 +0200)]
Merge pull request #1450 from evverx/man-journal-fields
man: systemd.journal-fields: add info about _TRANSPORT=audit
Lennart Poettering [Sat, 3 Oct 2015 09:54:43 +0000 (11:54 +0200)]
man: include numeric prefixes in example file names for .link, .netdev, .network files
In order to avoid confusion with the default files we ship, let's use a
low prefix number for all examples.
Fixes #1409.
Lennart Poettering [Sat, 3 Oct 2015 09:40:16 +0000 (11:40 +0200)]
man: fix journalctl --syslog-identifier= documentation
We don't actually accept patterns, hence don't claim so. This is a
fix-up for
730836403aee5f5bb998e6e3622ea7068fce0699.
Fixes #1256.
Lennart Poettering [Sat, 3 Oct 2015 09:34:11 +0000 (11:34 +0200)]
man: document that the automatic journal limits are capped to 4G by default
Fixes #1441.
Lennart Poettering [Sat, 3 Oct 2015 09:23:52 +0000 (11:23 +0200)]
nspawn: fix --image= when nspawn is run as service
nspawn needs access to /dev/loop to implement --image=, hence grant that
in the service file.
Fixes #1446.
Evgeny Vereshchagin [Sat, 3 Oct 2015 02:38:06 +0000 (05:38 +0300)]
man: systemd.journal-fields: add info about _TRANSPORT=audit
Lennart Poettering [Fri, 2 Oct 2015 21:21:59 +0000 (23:21 +0200)]
journal: rework vacuuming logic
Implement a maximum limit on number of journal files to keep around.
Enforcing a limit is useful on this since our performance when viewing
pays a heavy penalty for each journal file to interleve. This setting is
turned on now by default, and set to 100.
Also, actully implement what
348ced909724a1331b85d57aede80a102a00e428
promised: use whatever we find on disk at startup as lower bound on how
much disk space we can use. That commit introduced some provisions to
implement this, but actually never did.
This also adds "journalctl --vacuum-files=" to vacuum files on disk by
their number explicitly.
Lennart Poettering [Fri, 2 Oct 2015 21:20:51 +0000 (23:20 +0200)]
journal: use automatic clenup for ACL types
Lennart Poettering [Fri, 2 Oct 2015 21:19:00 +0000 (23:19 +0200)]
journal: improve some messages
Indicate that we are ignoring errors, when we ignore them, and log that
at LOG_WARNING level.
Use the right error code for the log message.
Lennart Poettering [Fri, 2 Oct 2015 20:42:13 +0000 (22:42 +0200)]
journal: simplify things by using the LESS_BY() macro
Lennart Poettering [Fri, 2 Oct 2015 20:39:24 +0000 (22:39 +0200)]
journal: don't affect atime of journal files when vacuuming
Let's try to use O_NOATIME if we can when vacuuming old journal files,
if we have the permissions for it, so that vacuuming doesn't count as
proper journal read access.
Lennart Poettering [Fri, 2 Oct 2015 20:37:53 +0000 (22:37 +0200)]
journal: prefer stack allocation
Lennart Poettering [Fri, 2 Oct 2015 20:36:33 +0000 (22:36 +0200)]
journal: make journal_file_close() return NULL
The way it is customary everywhere else in our sources.
Lennart Poettering [Fri, 2 Oct 2015 20:31:32 +0000 (22:31 +0200)]
journal: port over to fd_getcrtime_at()
Let's use fd_getcrtime_at(), since that *at() family of calls is how we
read the rest of the file metadata, too.
Beniamino Galvani [Thu, 24 Sep 2015 21:44:59 +0000 (23:44 +0200)]
lldp: add reception tests
Add some tests to simulate the reception of LLDP frames and to verify
the correctness of the data in the MIB.