]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Merge pull request #1429 from poettering/dhcp-hostname
authorDaniel Mack <github@zonque.org>
Thu, 1 Oct 2015 07:53:15 +0000 (09:53 +0200)
committerDaniel Mack <github@zonque.org>
Thu, 1 Oct 2015 07:53:15 +0000 (09:53 +0200)
DHCP and journal remoting fix, as well as NEWS update

NEWS
src/journal-remote/journal-gatewayd.c
src/journal-remote/journal-remote.c
src/libsystemd-network/sd-dhcp-lease.c

diff --git a/NEWS b/NEWS
index e56a922d2b37ab383a387a6b5c9bf0106c7d37e1..fb16632626c6baf3b7cc7b879dc605fc427fecfb 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -20,11 +20,11 @@ CHANGES WITH 227:
           global option DefaultTasksAccounting=.
 
         * Support for the "net_cls" cgroup controller has been added.
-          It allows assigning a net class ID to each task in the cgroup,
-          which can then be used in firewall rules and traffic shaping
-          configurations. Note that the kernel netfilter code does not
-          currently work reliably for ingress packets on unestablished
-          sockets.
+          It allows assigning a net class ID to each task in the
+          cgroup, which can then be used in firewall rules and traffic
+          shaping configurations. Note that the kernel netfilter net
+          class code does not currently work reliably for ingress
+          packets on unestablished sockets.
 
           This adds a new config directive called NetClass= to CGroup
           enabled units. Allowed values are positive numbers for fixed
@@ -49,6 +49,9 @@ CHANGES WITH 227:
           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.
+
         * A new systemd.crash_reboot=1 kernel command line option has
           been added that triggers a reboot after crashing. This can
           also be set through CrashReboot= in systemd.conf.
@@ -60,9 +63,68 @@ CHANGES WITH 227:
           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 RootDirectory
-          properties can now be set for transient units.
+        * The PrivateTmp=, PrivateDevices=, PrivateNetwork=,
+          NoNewPrivileges=, TTYPath, WorkingDirectory= and
+          RootDirectory= properties can now be set for transient
+          units.
+
+        * The systemd-analyze tool gained a new "set-log-target" verb
+          to change the logging target the system manager logs to
+          dynamically during runtime. This is similar to how
+          "systemd-analyze set-log-level" already changes the log
+          level.
+
+        * In nspawn /sys is now mounted as tmpfs, with only a selected
+          set of subdirectories mounted in from the real sysfs. This
+          enhances security slightly, and is useful for ensuring user
+          namespaces work correctly.
+
+        * Support for USB FunctionFS activation has been added. This
+          allows implementation of USB gadget services that are
+          activated as soon as they are requested, so that they don't
+          have to run continously, similar to classic socket
+          activation.
+
+        * The "systemctl exit" command now optionally takes an
+          additional parameter that sets the exit code to return from
+          the systemd manager when exiting. This is only relevant when
+          running the systemd user instance, or when running the
+          system instance in a container.
+
+        * sd-bus gained the new API calls sd_bus_path_encode_many()
+          and sd_bus_path_decode_many() that allow easy encoding and
+          decoding of multiple identifier strings inside a D-Bus
+          object path. Another new call sd_bus_default_flush_close()
+          has been added to flush and close per-thread default
+          connections.
+
+        * systemd-cgtop gained support for a -M/--machine= switch to
+          show the control groups within a certain container only.
+
+        * "systemctl kill" gained support for an optional --fail
+          switch. If specified the requested operation will fail of no
+          processes have been killed, because the unit had no
+          processes attached, or similar.
+
+        * A new (still internal) libary API sd-ipv4acd has been added,
+          that implements address conflict detection for IPv4. It's
+          based on code from sd-ipv4ll, and will be useful for
+          detecting DHCP address conflicts.
+
+        * The RuntimeDirectory= setting now understands unit
+          specifiers like %i or %f.
+
+        * networkd gained support for setting the IPv6 Router
+          Advertisment settings via IPv6AcceptRouterAdvertisements= in
+          .network files.
+
+        * udev will now create /dev/disk/by-path links for ATA devices
+          on kernels where that is supported.
+
+        * When downloading tar or raw images using "machinectl
+          pull-tar" or "machinectl pull-raw", a matching ".nspawn"
+          file is now also downloaded, if it is available and stored
+          next to the image file.
 
         * Galician, Turkish and Korean translations were added.
 
index 29df842277a8dcb3c4dda98048072002760da7c4..b839e5979b1deb9234c30a97d347dc4e6b4847b8 100644 (file)
@@ -1010,7 +1010,22 @@ int main(int argc, char *argv[]) {
                         { MHD_OPTION_END, 0, NULL },
                         { MHD_OPTION_END, 0, NULL }};
                 int opts_pos = 2;
-                int flags = MHD_USE_THREAD_PER_CONNECTION|MHD_USE_POLL|MHD_USE_DEBUG;
+
+                /* We force MHD_USE_PIPE_FOR_SHUTDOWN here, in order
+                 * to make sure libmicrohttpd doesn't use shutdown()
+                 * on our listening socket, which would break socket
+                 * re-activation. See
+                 *
+                 * https://lists.gnu.org/archive/html/libmicrohttpd/2015-09/msg00014.html
+                 * https://github.com/systemd/systemd/pull/1286
+                 */
+
+                int flags =
+                        MHD_USE_DEBUG |
+                        MHD_USE_DUAL_STACK |
+                        MHD_USE_PIPE_FOR_SHUTDOWN |
+                        MHD_USE_POLL |
+                        MHD_USE_THREAD_PER_CONNECTION;
 
                 if (n > 0)
                         opts[opts_pos++] = (struct MHD_OptionItem)
index 50f41a575d6d9f9bef8e5f730e6352d61e208bb1..5354bf6e51d97e56274e9cf52834bb1a7228acfa 100644 (file)
@@ -647,9 +647,10 @@ static int setup_microhttpd_server(RemoteServer *s,
         int opts_pos = 3;
         int flags =
                 MHD_USE_DEBUG |
-                MHD_USE_PEDANTIC_CHECKS |
+                MHD_USE_DUAL_STACK |
                 MHD_USE_EPOLL_LINUX_ONLY |
-                MHD_USE_DUAL_STACK;
+                MHD_USE_PEDANTIC_CHECKS |
+                MHD_USE_PIPE_FOR_SHUTDOWN;
 
         const union MHD_DaemonInfo *info;
         int r, epoll_fd;
index aa07846693dcdddc6e030a07198c1ce0bff2c141..df3d8e6e3c7ce95d10ded41106f5f1ec31dd04e5 100644 (file)
@@ -314,10 +314,14 @@ static int lease_parse_string(const uint8_t *option, size_t len, char **ret) {
         else {
                 char *string;
 
-                if (memchr(option, 0, len))
+                /*
+                 * One trailing NUL byte is OK, we don't mind. See:
+                 * https://github.com/systemd/systemd/issues/1337
+                 */
+                if (memchr(option, 0, len - 1))
                         return -EINVAL;
 
-                string = strndup((const char *)option, len);
+                string = strndup((const char *) option, len);
                 if (!string)
                         return -ENOMEM;