summary refs log tree commit diff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-04-08 00:54:01 +0200
committerMarius Bakke <mbakke@fastmail.com>2019-04-08 00:54:01 +0200
commitba00235a9652bb129ff6867ffc3c7cfafe1cca09 (patch)
tree1ce56f512707e89362e1fed3d5b26d690462fbda /gnu/packages/patches
parentf19ccdc62ca721b68745c35b046826b356f46c62 (diff)
parent0e2b0b05accdea7c3f016f8483d0ec04021114d3 (diff)
downloadguix-ba00235a9652bb129ff6867ffc3c7cfafe1cca09.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/emacs-undohist-ignored.patch27
-rw-r--r--gnu/packages/patches/lcms-CVE-2018-16435.patch171
-rw-r--r--gnu/packages/patches/ledger-fix-uninitialized.patch27
-rw-r--r--gnu/packages/patches/localed-xorg-keyboard.patch322
-rw-r--r--gnu/packages/patches/ntfs-3g-CVE-2019-9755.patch72
5 files changed, 592 insertions, 27 deletions
diff --git a/gnu/packages/patches/emacs-undohist-ignored.patch b/gnu/packages/patches/emacs-undohist-ignored.patch
new file mode 100644
index 0000000000..c1ad827a26
--- /dev/null
+++ b/gnu/packages/patches/emacs-undohist-ignored.patch
@@ -0,0 +1,27 @@
+From 52bfd419bf9022726048f818d955b8ea10a16d5c Mon Sep 17 00:00:00 2001
+From: Patrick Mosby <info@schreiblogade.de>
+Date: Mon, 7 Sep 2015 09:05:56 +0200
+Subject: [PATCH] Don't save undo file for ignored files.
+
+This fixes #4.
+---
+ undohist.el | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/undohist.el b/undohist.el
+index b184a26..de60356 100644
+--- a/undohist.el
++++ b/undohist.el
+@@ -164,7 +164,8 @@ To use undohist, you just call this function."
+                 undohist-ignored-files)))
+ 
+ (defun undohist-save-1 ()
+-  (when (consp buffer-undo-list)
++  (when (and (consp buffer-undo-list)
++             (undohist-recover-file-p (buffer-file-name (current-buffer))))
+     (let ((file (make-undohist-file-name (buffer-file-name)))
+           (contents `((digest . ,(md5 (current-buffer)))
+                       (undo-list . ,(undohist-encode buffer-undo-list)))))
+-- 
+2.21.0
+
diff --git a/gnu/packages/patches/lcms-CVE-2018-16435.patch b/gnu/packages/patches/lcms-CVE-2018-16435.patch
new file mode 100644
index 0000000000..60228e73af
--- /dev/null
+++ b/gnu/packages/patches/lcms-CVE-2018-16435.patch
@@ -0,0 +1,171 @@
+https://github.com/mm2/Little-CMS/commit/768f70ca405cd3159d990e962d54456773bb8cf8.patch
+
+From 768f70ca405cd3159d990e962d54456773bb8cf8 Mon Sep 17 00:00:00 2001
+From: Marti Maria <info@littlecms.com>
+Date: Wed, 15 Aug 2018 20:07:56 +0200
+Subject: [PATCH] Upgrade Visual studio 2017 15.8
+
+- Upgrade to 15.8
+- Add check on CGATS memory allocation (thanks to Quang Nguyen for
+pointing out this)
+---
+ Projects/VC2017/jpegicc/jpegicc.vcxproj           |  1 +
+ Projects/VC2017/lcms2_DLL/lcms2_DLL.vcxproj       |  2 +-
+ Projects/VC2017/lcms2_static/lcms2_static.vcxproj |  2 +-
+ Projects/VC2017/linkicc/linkicc.vcxproj           |  2 +-
+ Projects/VC2017/psicc/psicc.vcxproj               |  2 +-
+ Projects/VC2017/testbed/testbed.vcxproj           |  2 +-
+ Projects/VC2017/tiffdiff/tiffdiff.vcxproj         |  2 +-
+ Projects/VC2017/tifficc/tifficc.vcxproj           |  2 +-
+ Projects/VC2017/transicc/transicc.vcxproj         |  1 +
+ src/cmscgats.c                                    | 14 ++++++++++----
+ 10 files changed, 19 insertions(+), 11 deletions(-)
+
+diff --git a/Projects/VC2017/jpegicc/jpegicc.vcxproj b/Projects/VC2017/jpegicc/jpegicc.vcxproj
+index ab26a53..39cfd00 100644
+--- a/Projects/VC2017/jpegicc/jpegicc.vcxproj
++++ b/Projects/VC2017/jpegicc/jpegicc.vcxproj
+@@ -22,6 +22,7 @@
+     <ProjectGuid>{62812507-F926-4968-96A9-17678460AD90}</ProjectGuid>
+     <RootNamespace>jpegicc</RootNamespace>
+     <Keyword>Win32Proj</Keyword>
++    <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
+   </PropertyGroup>
+   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+diff --git a/Projects/VC2017/lcms2_DLL/lcms2_DLL.vcxproj b/Projects/VC2017/lcms2_DLL/lcms2_DLL.vcxproj
+index 4c8aa3f..d1bf3eb 100644
+--- a/Projects/VC2017/lcms2_DLL/lcms2_DLL.vcxproj
++++ b/Projects/VC2017/lcms2_DLL/lcms2_DLL.vcxproj
+@@ -22,7 +22,7 @@
+     <ProjectGuid>{8C51BE48-ADB8-4089-A9EC-F6BF993A0548}</ProjectGuid>
+     <RootNamespace>lcms2_DLL</RootNamespace>
+     <Keyword>Win32Proj</Keyword>
+-    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
++    <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
+   </PropertyGroup>
+   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+diff --git a/Projects/VC2017/lcms2_static/lcms2_static.vcxproj b/Projects/VC2017/lcms2_static/lcms2_static.vcxproj
+index 2a9988a..9fc05ce 100644
+--- a/Projects/VC2017/lcms2_static/lcms2_static.vcxproj
++++ b/Projects/VC2017/lcms2_static/lcms2_static.vcxproj
+@@ -22,7 +22,7 @@
+     <ProjectGuid>{71DEDE59-3F1E-486B-A899-4283000F76B5}</ProjectGuid>
+     <RootNamespace>lcms2_static</RootNamespace>
+     <Keyword>Win32Proj</Keyword>
+-    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
++    <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
+   </PropertyGroup>
+   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+diff --git a/Projects/VC2017/linkicc/linkicc.vcxproj b/Projects/VC2017/linkicc/linkicc.vcxproj
+index 30c2b4e..51586dd 100644
+--- a/Projects/VC2017/linkicc/linkicc.vcxproj
++++ b/Projects/VC2017/linkicc/linkicc.vcxproj
+@@ -22,7 +22,7 @@
+     <ProjectGuid>{FBFBE1DC-DB84-4BA1-9552-B4780F457849}</ProjectGuid>
+     <RootNamespace>linkicc</RootNamespace>
+     <Keyword>Win32Proj</Keyword>
+-    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
++    <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
+   </PropertyGroup>
+   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+diff --git a/Projects/VC2017/psicc/psicc.vcxproj b/Projects/VC2017/psicc/psicc.vcxproj
+index 9dcf89a..8f26e12 100644
+--- a/Projects/VC2017/psicc/psicc.vcxproj
++++ b/Projects/VC2017/psicc/psicc.vcxproj
+@@ -22,7 +22,7 @@
+     <ProjectGuid>{EF6A8851-65FE-46F5-B9EF-14F0B671F693}</ProjectGuid>
+     <RootNamespace>psicc</RootNamespace>
+     <Keyword>Win32Proj</Keyword>
+-    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
++    <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
+   </PropertyGroup>
+   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+diff --git a/Projects/VC2017/testbed/testbed.vcxproj b/Projects/VC2017/testbed/testbed.vcxproj
+index 0af3762..3f6aea3 100644
+--- a/Projects/VC2017/testbed/testbed.vcxproj
++++ b/Projects/VC2017/testbed/testbed.vcxproj
+@@ -22,7 +22,7 @@
+     <ProjectGuid>{928A3A2B-46EF-4279-959C-513B3652FF0E}</ProjectGuid>
+     <RootNamespace>testbed</RootNamespace>
+     <Keyword>Win32Proj</Keyword>
+-    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
++    <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
+   </PropertyGroup>
+   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+diff --git a/Projects/VC2017/tiffdiff/tiffdiff.vcxproj b/Projects/VC2017/tiffdiff/tiffdiff.vcxproj
+index 7edfe28..3a6d837 100644
+--- a/Projects/VC2017/tiffdiff/tiffdiff.vcxproj
++++ b/Projects/VC2017/tiffdiff/tiffdiff.vcxproj
+@@ -22,7 +22,7 @@
+     <ProjectGuid>{75B91835-CCD7-48BE-A606-A9C997D5DBEE}</ProjectGuid>
+     <RootNamespace>tiffdiff</RootNamespace>
+     <Keyword>Win32Proj</Keyword>
+-    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
++    <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
+   </PropertyGroup>
+   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+diff --git a/Projects/VC2017/tifficc/tifficc.vcxproj b/Projects/VC2017/tifficc/tifficc.vcxproj
+index cd9f04c..5ef954f 100644
+--- a/Projects/VC2017/tifficc/tifficc.vcxproj
++++ b/Projects/VC2017/tifficc/tifficc.vcxproj
+@@ -22,7 +22,7 @@
+     <ProjectGuid>{2256DE16-ED92-4A6F-9C54-F65BB61E64A2}</ProjectGuid>
+     <RootNamespace>tifficc</RootNamespace>
+     <Keyword>Win32Proj</Keyword>
+-    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
++    <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
+   </PropertyGroup>
+   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+diff --git a/Projects/VC2017/transicc/transicc.vcxproj b/Projects/VC2017/transicc/transicc.vcxproj
+index d9b77c6..b3173d8 100644
+--- a/Projects/VC2017/transicc/transicc.vcxproj
++++ b/Projects/VC2017/transicc/transicc.vcxproj
+@@ -22,6 +22,7 @@
+     <ProjectGuid>{9EE22D66-C849-474C-9ED5-C3E141DAB160}</ProjectGuid>
+     <RootNamespace>transicc</RootNamespace>
+     <Keyword>Win32Proj</Keyword>
++    <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
+   </PropertyGroup>
+   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+diff --git a/src/cmscgats.c b/src/cmscgats.c
+index 1a87613..8c3e96d 100644
+--- a/src/cmscgats.c
++++ b/src/cmscgats.c
+@@ -1,7 +1,7 @@
+ //---------------------------------------------------------------------------------
+ //
+ //  Little Color Management System
+-//  Copyright (c) 1998-2017 Marti Maria Saguer
++//  Copyright (c) 1998-2018 Marti Maria Saguer
+ //
+ // Permission is hereby granted, free of charge, to any person obtaining
+ // a copy of this software and associated documentation files (the "Software"),
+@@ -1506,10 +1506,16 @@ void AllocateDataSet(cmsIT8* it8)
+     t-> nSamples   = atoi(cmsIT8GetProperty(it8, "NUMBER_OF_FIELDS"));
+     t-> nPatches   = atoi(cmsIT8GetProperty(it8, "NUMBER_OF_SETS"));
+ 
+-    t-> Data = (char**)AllocChunk (it8, ((cmsUInt32Number) t->nSamples + 1) * ((cmsUInt32Number) t->nPatches + 1) *sizeof (char*));
+-    if (t->Data == NULL) {
++    if (t -> nSamples < 0 || t->nSamples > 0x7ffe || t->nPatches < 0 || t->nPatches > 0x7ffe)
++    {
++        SynError(it8, "AllocateDataSet: too much data");
++    }
++    else {
++        t->Data = (char**)AllocChunk(it8, ((cmsUInt32Number)t->nSamples + 1) * ((cmsUInt32Number)t->nPatches + 1) * sizeof(char*));
++        if (t->Data == NULL) {
+ 
+-        SynError(it8, "AllocateDataSet: Unable to allocate data array");
++            SynError(it8, "AllocateDataSet: Unable to allocate data array");
++        }
+     }
+ 
+ }
diff --git a/gnu/packages/patches/ledger-fix-uninitialized.patch b/gnu/packages/patches/ledger-fix-uninitialized.patch
deleted file mode 100644
index 128c90ec13..0000000000
--- a/gnu/packages/patches/ledger-fix-uninitialized.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-This fixes failures of tests "BaseLine_opt-datetime-format" and
-"BaseLine_opt-time-report", which were printing an unexpected trailing '*' on
-the last line of output, e.g.:
-
-  @@ -5,4 +5,4 @@
-     04/05/13 12:00 PM    04/05/13 01:30 PM       1.50h    Lunch
-     04/05/13 11:30 AM    04/05/13 12:00 PM       30.0m    Walk
-   --------------------------------------------------
-  -                                           
-  +                                          *
-
-Reported upstream at
-https://groups.google.com/d/msg/ledger-cli/EeJUrUk8YDc/pIR-LOTVEAAJ
-
-diff --git a/src/account.h b/src/account.h
-index 1b97463d..f2555593 100644
---- a/src/account.h
-+++ b/src/account.h
-@@ -187,7 +187,7 @@ public:
- 
-       datetime_t         earliest_checkin;
-       datetime_t         latest_checkout;
--      bool               latest_checkout_cleared;
-+      bool               latest_checkout_cleared = false;
- 
-       std::set<path>     filenames;
-       std::set<string>   accounts_referenced;
diff --git a/gnu/packages/patches/localed-xorg-keyboard.patch b/gnu/packages/patches/localed-xorg-keyboard.patch
new file mode 100644
index 0000000000..9a9071ba0a
--- /dev/null
+++ b/gnu/packages/patches/localed-xorg-keyboard.patch
@@ -0,0 +1,322 @@
+Normally localed would do an approximate parsing of the Xorg config file
+to determine the XKB keyboard layout.  This doesn't make sense on Guix
+where there's no such file in /etc, and where the keyboard layout is
+known statically at configuration time.
+
+This patch removes the XOrg configuration parsing and expects to read the
+configuration from environment variables instead.  It also removes the
+stateful bits that would write configuration to /etc/vconsole.conf
+and /etc/X11, which are unused in Guix anyway.
+
+Patch by Ludovic Courtès <ludo@gnu.org>.
+
+diff --git a/src/locale/keymap-util.c b/src/locale/keymap-util.c
+index 6b6b32a591..46aab472b0 100644
+--- a/src/locale/keymap-util.c
++++ b/src/locale/keymap-util.c
+@@ -174,32 +174,16 @@ int vconsole_read_data(Context *c, sd_bus_message *m) {
+                 c->vc_cache = sd_bus_message_ref(m);
+         }
+ 
+-        if (stat("/etc/vconsole.conf", &st) < 0) {
+-                if (errno != ENOENT)
+-                        return -errno;
+-
+-                c->vc_mtime = USEC_INFINITY;
+-                context_free_vconsole(c);
+-                return 0;
+-        }
+-
+-        /* If mtime is not changed, then we do not need to re-read */
+-        t = timespec_load(&st.st_mtim);
+-        if (c->vc_mtime != USEC_INFINITY && t == c->vc_mtime)
+-                return 0;
+-
+-        c->vc_mtime = t;
++        c->vc_mtime = USEC_INFINITY;
+         context_free_vconsole(c);
+-
+-        r = parse_env_file(NULL, "/etc/vconsole.conf",
+-                           "KEYMAP",        &c->vc_keymap,
+-                           "KEYMAP_TOGGLE", &c->vc_keymap_toggle);
+-        if (r < 0)
+-                return r;
+-
+         return 0;
+ }
+ 
++static char *getenv_strdup(const char *variable) {
++        const char *value = getenv(variable);
++        return value == NULL ? NULL : strdup(value);
++}
++
+ int x11_read_data(Context *c, sd_bus_message *m) {
+         _cleanup_fclose_ FILE *f = NULL;
+         bool in_section = false;
+@@ -216,258 +200,27 @@ int x11_read_data(Context *c, sd_bus_message *m) {
+                 c->x11_cache = sd_bus_message_ref(m);
+         }
+ 
+-        if (stat("/etc/X11/xorg.conf.d/00-keyboard.conf", &st) < 0) {
+-                if (errno != ENOENT)
+-                        return -errno;
+-
+-                c->x11_mtime = USEC_INFINITY;
+-                context_free_x11(c);
+-                return 0;
+-        }
+-
+-        /* If mtime is not changed, then we do not need to re-read */
+-        t = timespec_load(&st.st_mtim);
+-        if (c->x11_mtime != USEC_INFINITY && t == c->x11_mtime)
+-                return 0;
+-
+-        c->x11_mtime = t;
++        c->x11_mtime = 0;
+         context_free_x11(c);
+ 
+-        f = fopen("/etc/X11/xorg.conf.d/00-keyboard.conf", "re");
+-        if (!f)
+-                return -errno;
+-
+-        for (;;) {
+-                _cleanup_free_ char *line = NULL;
+-                char *l;
+-
+-                r = read_line(f, LONG_LINE_MAX, &line);
+-                if (r < 0)
+-                        return r;
+-                if (r == 0)
+-                        break;
+-
+-                l = strstrip(line);
+-                if (IN_SET(l[0], 0, '#'))
+-                        continue;
+-
+-                if (in_section && first_word(l, "Option")) {
+-                        _cleanup_strv_free_ char **a = NULL;
+-
+-                        r = strv_split_extract(&a, l, WHITESPACE, EXTRACT_QUOTES);
+-                        if (r < 0)
+-                                return r;
+-
+-                        if (strv_length(a) == 3) {
+-                                char **p = NULL;
+-
+-                                if (streq(a[1], "XkbLayout"))
+-                                        p = &c->x11_layout;
+-                                else if (streq(a[1], "XkbModel"))
+-                                        p = &c->x11_model;
+-                                else if (streq(a[1], "XkbVariant"))
+-                                        p = &c->x11_variant;
+-                                else if (streq(a[1], "XkbOptions"))
+-                                        p = &c->x11_options;
+-
+-                                if (p) {
+-                                        free_and_replace(*p, a[2]);
+-                                }
+-                        }
+-
+-                } else if (!in_section && first_word(l, "Section")) {
+-                        _cleanup_strv_free_ char **a = NULL;
+-
+-                        r = strv_split_extract(&a, l, WHITESPACE, EXTRACT_QUOTES);
+-                        if (r < 0)
+-                                return -ENOMEM;
+-
+-                        if (strv_length(a) == 2 && streq(a[1], "InputClass"))
+-                                in_section = true;
+-
+-                } else if (in_section && first_word(l, "EndSection"))
+-                        in_section = false;
+-        }
++        c->x11_layout = getenv_strdup("GUIX_XKB_LAYOUT");
++        c->x11_model = getenv_strdup("GUIX_XKB_MODEL");
++        c->x11_variant = getenv_strdup("GUIX_XKB_VARIANT");
++        c->x11_options = getenv_strdup("GUIX_XKB_OPTIONS");
+ 
+         return 0;
+ }
+ 
+ int locale_write_data(Context *c, char ***settings) {
+-        _cleanup_strv_free_ char **l = NULL;
+-        struct stat st;
+-        int r, p;
+-
+-        /* Set values will be returned as strv in *settings on success. */
+-
+-        for (p = 0; p < _VARIABLE_LC_MAX; p++) {
+-                _cleanup_free_ char *t = NULL;
+-                char **u;
+-                const char *name;
+-
+-                name = locale_variable_to_string(p);
+-                assert(name);
+-
+-                if (isempty(c->locale[p]))
+-                        continue;
+-
+-                if (asprintf(&t, "%s=%s", name, c->locale[p]) < 0)
+-                        return -ENOMEM;
+-
+-                u = strv_env_set(l, t);
+-                if (!u)
+-                        return -ENOMEM;
+-
+-                strv_free_and_replace(l, u);
+-        }
+-
+-        if (strv_isempty(l)) {
+-                if (unlink("/etc/locale.conf") < 0)
+-                        return errno == ENOENT ? 0 : -errno;
+-
+-                c->locale_mtime = USEC_INFINITY;
+-                return 0;
+-        }
+-
+-        r = write_env_file_label("/etc/locale.conf", l);
+-        if (r < 0)
+-                return r;
+-
+-        *settings = TAKE_PTR(l);
+-
+-        if (stat("/etc/locale.conf", &st) >= 0)
+-                c->locale_mtime = timespec_load(&st.st_mtim);
+-
+-        return 0;
++        return -ENOSYS;
+ }
+ 
+ int vconsole_write_data(Context *c) {
+-        _cleanup_strv_free_ char **l = NULL;
+-        struct stat st;
+-        int r;
+-
+-        r = load_env_file(NULL, "/etc/vconsole.conf", &l);
+-        if (r < 0 && r != -ENOENT)
+-                return r;
+-
+-        if (isempty(c->vc_keymap))
+-                l = strv_env_unset(l, "KEYMAP");
+-        else {
+-                _cleanup_free_ char *s = NULL;
+-                char **u;
+-
+-                s = strappend("KEYMAP=", c->vc_keymap);
+-                if (!s)
+-                        return -ENOMEM;
+-
+-                u = strv_env_set(l, s);
+-                if (!u)
+-                        return -ENOMEM;
+-
+-                strv_free_and_replace(l, u);
+-        }
+-
+-        if (isempty(c->vc_keymap_toggle))
+-                l = strv_env_unset(l, "KEYMAP_TOGGLE");
+-        else  {
+-                _cleanup_free_ char *s = NULL;
+-                char **u;
+-
+-                s = strappend("KEYMAP_TOGGLE=", c->vc_keymap_toggle);
+-                if (!s)
+-                        return -ENOMEM;
+-
+-                u = strv_env_set(l, s);
+-                if (!u)
+-                        return -ENOMEM;
+-
+-                strv_free_and_replace(l, u);
+-        }
+-
+-        if (strv_isempty(l)) {
+-                if (unlink("/etc/vconsole.conf") < 0)
+-                        return errno == ENOENT ? 0 : -errno;
+-
+-                c->vc_mtime = USEC_INFINITY;
+-                return 0;
+-        }
+-
+-        r = write_env_file_label("/etc/vconsole.conf", l);
+-        if (r < 0)
+-                return r;
+-
+-        if (stat("/etc/vconsole.conf", &st) >= 0)
+-                c->vc_mtime = timespec_load(&st.st_mtim);
+-
+-        return 0;
++        return -ENOSYS;
+ }
+ 
+ int x11_write_data(Context *c) {
+-        _cleanup_fclose_ FILE *f = NULL;
+-        _cleanup_free_ char *temp_path = NULL;
+-        struct stat st;
+-        int r;
+-
+-        if (isempty(c->x11_layout) &&
+-            isempty(c->x11_model) &&
+-            isempty(c->x11_variant) &&
+-            isempty(c->x11_options)) {
+-
+-                if (unlink("/etc/X11/xorg.conf.d/00-keyboard.conf") < 0)
+-                        return errno == ENOENT ? 0 : -errno;
+-
+-                c->vc_mtime = USEC_INFINITY;
+-                return 0;
+-        }
+-
+-        mkdir_p_label("/etc/X11/xorg.conf.d", 0755);
+-
+-        r = fopen_temporary("/etc/X11/xorg.conf.d/00-keyboard.conf", &f, &temp_path);
+-        if (r < 0)
+-                return r;
+-
+-        (void) __fsetlocking(f, FSETLOCKING_BYCALLER);
+-        (void) fchmod(fileno(f), 0644);
+-
+-        fputs("# Written by systemd-localed(8), read by systemd-localed and Xorg. It's\n"
+-              "# probably wise not to edit this file manually. Use localectl(1) to\n"
+-              "# instruct systemd-localed to update it.\n"
+-              "Section \"InputClass\"\n"
+-              "        Identifier \"system-keyboard\"\n"
+-              "        MatchIsKeyboard \"on\"\n", f);
+-
+-        if (!isempty(c->x11_layout))
+-                fprintf(f, "        Option \"XkbLayout\" \"%s\"\n", c->x11_layout);
+-
+-        if (!isempty(c->x11_model))
+-                fprintf(f, "        Option \"XkbModel\" \"%s\"\n", c->x11_model);
+-
+-        if (!isempty(c->x11_variant))
+-                fprintf(f, "        Option \"XkbVariant\" \"%s\"\n", c->x11_variant);
+-
+-        if (!isempty(c->x11_options))
+-                fprintf(f, "        Option \"XkbOptions\" \"%s\"\n", c->x11_options);
+-
+-        fputs("EndSection\n", f);
+-
+-        r = fflush_sync_and_check(f);
+-        if (r < 0)
+-                goto fail;
+-
+-        if (rename(temp_path, "/etc/X11/xorg.conf.d/00-keyboard.conf") < 0) {
+-                r = -errno;
+-                goto fail;
+-        }
+-
+-        if (stat("/etc/X11/xorg.conf.d/00-keyboard.conf", &st) >= 0)
+-                c->x11_mtime = timespec_load(&st.st_mtim);
+-
+-        return 0;
+-
+-fail:
+-        if (temp_path)
+-                (void) unlink(temp_path);
+-
+-        return r;
++        return -ENOSYS;
+ }
+ 
+ static int read_next_mapping(const char* filename,
diff --git a/gnu/packages/patches/ntfs-3g-CVE-2019-9755.patch b/gnu/packages/patches/ntfs-3g-CVE-2019-9755.patch
new file mode 100644
index 0000000000..a7794aed47
--- /dev/null
+++ b/gnu/packages/patches/ntfs-3g-CVE-2019-9755.patch
@@ -0,0 +1,72 @@
+Fix CVE-2019-9755:
+
+https://security-tracker.debian.org/tracker/CVE-2019-9755
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-9755
+
+Patch copied from upstream source repository:
+
+https://sourceforge.net/p/ntfs-3g/ntfs-3g/ci/85c1634a26faa572d3c558d4cf8aaaca5202d4e9/
+
+From 85c1634a26faa572d3c558d4cf8aaaca5202d4e9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= <jean-pierre.andre@wanadoo.fr>
+Date: Wed, 19 Dec 2018 15:57:50 +0100
+Subject: [PATCH] Fixed reporting an error when failed to build the mountpoint
+
+The size check was inefficient because getcwd() uses an unsigned int
+argument.
+---
+ src/lowntfs-3g.c | 6 +++++-
+ src/ntfs-3g.c    | 6 +++++-
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/src/lowntfs-3g.c b/src/lowntfs-3g.c
+index 993867fa..0660439b 100644
+--- a/src/lowntfs-3g.c
++++ b/src/lowntfs-3g.c
+@@ -4411,7 +4411,8 @@ int main(int argc, char *argv[])
+ 	else {
+ 		ctx->abs_mnt_point = (char*)ntfs_malloc(PATH_MAX);
+ 		if (ctx->abs_mnt_point) {
+-			if (getcwd(ctx->abs_mnt_point,
++			if ((strlen(opts.mnt_point) < PATH_MAX)
++			    && getcwd(ctx->abs_mnt_point,
+ 				     PATH_MAX - strlen(opts.mnt_point) - 1)) {
+ 				strcat(ctx->abs_mnt_point, "/");
+ 				strcat(ctx->abs_mnt_point, opts.mnt_point);
+@@ -4419,6 +4420,9 @@ int main(int argc, char *argv[])
+ 			/* Solaris also wants the absolute mount point */
+ 				opts.mnt_point = ctx->abs_mnt_point;
+ #endif /* defined(__sun) && defined (__SVR4) */
++			} else {
++				free(ctx->abs_mnt_point);
++				ctx->abs_mnt_point = (char*)NULL;
+ 			}
+ 		}
+ 	}
+diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c
+index 6ce89fef..4e0912ae 100644
+--- a/src/ntfs-3g.c
++++ b/src/ntfs-3g.c
+@@ -4148,7 +4148,8 @@ int main(int argc, char *argv[])
+ 	else {
+ 		ctx->abs_mnt_point = (char*)ntfs_malloc(PATH_MAX);
+ 		if (ctx->abs_mnt_point) {
+-			if (getcwd(ctx->abs_mnt_point,
++			if ((strlen(opts.mnt_point) < PATH_MAX)
++			    && getcwd(ctx->abs_mnt_point,
+ 				     PATH_MAX - strlen(opts.mnt_point) - 1)) {
+ 				strcat(ctx->abs_mnt_point, "/");
+ 				strcat(ctx->abs_mnt_point, opts.mnt_point);
+@@ -4156,6 +4157,9 @@ int main(int argc, char *argv[])
+ 			/* Solaris also wants the absolute mount point */
+ 				opts.mnt_point = ctx->abs_mnt_point;
+ #endif /* defined(__sun) && defined (__SVR4) */
++			} else {
++				free(ctx->abs_mnt_point);
++				ctx->abs_mnt_point = (char*)NULL;
+ 			}
+ 		}
+ 	}
+-- 
+2.21.0
+