From ba6bfc0d754f37e6868785fc9409a14f403ea3c0 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 6 Oct 2015 12:32:15 +0200 Subject: man: use where we refer to functions --- man/sd_listen_fds.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/sd_listen_fds.xml b/man/sd_listen_fds.xml index ea55671e4f..ccd1266318 100644 --- a/man/sd_listen_fds.xml +++ b/man/sd_listen_fds.xml @@ -147,7 +147,7 @@ way. The returned array of strings has as many entries as file descriptors has been received, plus a final NULL pointer terminating the array. The caller needs to free the array itself - and each of its elements with libc's free() + and each of its elements with libc's free() call after use. If the names parameter is NULL the call is entirely equivalent to sd_listen_fds(). -- cgit v1.2.3-54-g00ecf From 163c76c9305e6fee91dad8a3004f77020000ef96 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 6 Oct 2015 12:32:31 +0200 Subject: activate: validate fdname when accepting it --- src/activate/activate.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/activate/activate.c b/src/activate/activate.c index 6a8432314e..4ece1367c1 100644 --- a/src/activate/activate.c +++ b/src/activate/activate.c @@ -361,6 +361,11 @@ static int parse_argv(int argc, char *argv[]) { break; case ARG_FDNAME: + if (!fdname_is_valid(optarg)) { + log_error("File descriptor name %s is not valid, refusing.", optarg); + return -EINVAL; + } + arg_fdname = optarg; break; -- cgit v1.2.3-54-g00ecf From 5b7003708352c59b44311cd19c6746f9047ad140 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 6 Oct 2015 12:32:50 +0200 Subject: strv: properly return ENOMEM where we should in strv_extend_n() --- src/basic/strv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/strv.c b/src/basic/strv.c index 90f0b8c741..d5169467da 100644 --- a/src/basic/strv.c +++ b/src/basic/strv.c @@ -784,5 +784,5 @@ rollback: free(nl[j]); nl[k] = NULL; - return NULL; + return -ENOMEM; } -- cgit v1.2.3-54-g00ecf From 0a3bb96e2c77af78e31e497c791cb110e740ad59 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 6 Oct 2015 12:33:14 +0200 Subject: util: some comment fixes in fdname_is_valid() --- src/basic/util.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/basic/util.c b/src/basic/util.c index 630c7ea9ff..2855993afe 100644 --- a/src/basic/util.c +++ b/src/basic/util.c @@ -6849,12 +6849,14 @@ int version(void) { bool fdname_is_valid(const char *s) { const char *p; - /* Validates a name for $LISTEN_NAMES. We basically allow + /* Validates a name for $LISTEN_FDNAMES. We basically allow * everything ASCII that's not a control character. Also, as * special exception the ":" character is not allowed, as we - * use that as field separator in $LISTEN_NAMES. + * use that as field separator in $LISTEN_FDNAMES. * - * Note that the empty string is explicitly allowed here.*/ + * Note that the empty string is explicitly allowed + * here. However, we limit the length of the names to 255 + * characters. */ if (!s) return false; -- cgit v1.2.3-54-g00ecf From d046fb936658e7239c8e2635ecb7fb32748ef535 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 6 Oct 2015 12:33:25 +0200 Subject: update NEWS --- NEWS | 59 ++++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 21 deletions(-) diff --git a/NEWS b/NEWS index 9a0d969739..8867110235 100644 --- a/NEWS +++ b/NEWS @@ -13,8 +13,8 @@ CHANGES WITH 227: stopped having this file around as anything else than a symlink to /proc/self/mounts. - * Support for the "pids" cgroup controller has been added. - It allows accounting the number of tasks in a cgroup and + * Support for the "pids" cgroup controller has been added. It + allows accounting the number of tasks in a cgroup and enforcing limits on it. This adds two new setting TasksAccounting= and TasksMax= to each unit, as well as a global option DefaultTasksAccounting=. @@ -44,10 +44,10 @@ CHANGES WITH 227: 'machine-id-setup --commit'. The separate binary has been removed. - * The WorkingDirectory= directive in unit files may now be - set to the special value '~'. In this case, the working - directory is set to the home directory of the user configured - in User=. + * The WorkingDirectory= directive in unit files may now be set + to the special value '~'. In this case, the working + directory is set to the home directory of the user + configured in User=. * "machinectl shell" will now open the shell in the home directory of the selected user by default. @@ -57,11 +57,12 @@ CHANGES WITH 227: also be set through CrashReboot= in systemd.conf. * The CrashChVT= configuration file setting is renamed to - CrashChangeVT=, following our usual logic of not abbreviating - unnecessarily. The old directive is still supported for compat - reasons. Also, this directive now takes an integer value - between 1 and 63, or a boolean value. The formerly supported - '-1' value for disabling stays around for compat reasons. + CrashChangeVT=, following our usual logic of not + abbreviating unnecessarily. The old directive is still + supported for compat reasons. Also, this directive now takes + an integer value between 1 and 63, or a boolean value. The + formerly supported '-1' value for disabling stays around for + compat reasons. * The PrivateTmp=, PrivateDevices=, PrivateNetwork=, NoNewPrivileges=, TTYPath=, WorkingDirectory= and @@ -114,12 +115,15 @@ CHANGES WITH 227: * The RuntimeDirectory= setting now understands unit specifiers like %i or %f. - * networkd gained support for: - - setting the IPv6 Router Advertisment settings via + * systemd-networkd gained support for: + + - Setting the IPv6 Router Advertisment settings via IPv6AcceptRouterAdvertisements= in .network files. - - configuring the HelloTimeSec, MaxAgeSec and - ForwardDelaySec bridge parameters in .netdev files. - - configuring PreferredSource for static routes in + + - Configuring the HelloTimeSec=, MaxAgeSec= and + ForwardDelaySec= bridge parameters in .netdev files. + + - Configuring PreferredSource= for static routes in .network files. * udev will now create /dev/disk/by-path links for ATA devices @@ -142,11 +146,24 @@ CHANGES WITH 227: only intermittendly, and even restores state if the previous system shutdown was abrupt rather than clean. - * Sockets passed using socket activation are now named. A new - API sd_listen_fds_with_names() is added to access the names. - The default names can be overwritten either in the .socket - file using the FileDescriptorName= parameter, or by passing - FDNAME= when storing the filedescriptor using sd_notify(). + * File descriptors passed during socket activation may now be + named. A new API sd_listen_fds_with_names() is added to + access the names. The default names may be overriden, + either in the .socket file using the FileDescriptorName= + parameter, or by passing FDNAME= when storing the file + descriptors using sd_notify(). + + * The journal daemon gained support for vacuuming old journal + files controlled by the number of files that shall remain, + in addition to the already existing control by size and by + date. This is useful as journal interleaving performance + degrades with too many seperate journal files, and allows + putting an effective limit on them. The new setting defaults + to 100, but this may be changed by setting SystemMaxFiles= + and RuntimeMaxFiles= in journald.conf. Also, the + "journalctl" tool gained the new --vacuum-files= switch to + manually vacuum journal files to leave only the specified + number of files in place. * Galician, Serbian, Turkish and Korean translations were added. -- cgit v1.2.3-54-g00ecf