From ca56021c2636130244ba41018161ca69805bc6b9 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 25 Jan 2018 00:30:37 +0100 Subject: gnu: Update SELinux packages. * gnu/packages/selinux.scm (libsepol): Update to 2.7, release 20170804. [source]: Fetch from git. (checkpolicy)[arguments]: Set LIBSEPOLA. (libselinux)[arguments]: Likewise; remove build phase "patch-libsepol-path". (python-sepolgen)[arguments]: Adjust directory name in "enter-dir". (python-setools): Update to 4.1.1. [source]: Fetch from git. (policycoreutils)[source]: Remove patch. [arguments]: Remove build phases "fix-glib-cflags", "fix-linkage-with-libsepol", "fix-target-paths", and "wrap-python-tools". [inputs]: Remove python-wrapper, python-sepolgen, python-setools, python-ipy, libcap-ng, pcre, dbus, dbus-glib, and glib. * gnu/packages/patches/policycoreutils-make-sepolicy-use-python3.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- ...policycoreutils-make-sepolicy-use-python3.patch | 335 --------------------- 1 file changed, 335 deletions(-) delete mode 100644 gnu/packages/patches/policycoreutils-make-sepolicy-use-python3.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/policycoreutils-make-sepolicy-use-python3.patch b/gnu/packages/patches/policycoreutils-make-sepolicy-use-python3.patch deleted file mode 100644 index befe9fbb2a..0000000000 --- a/gnu/packages/patches/policycoreutils-make-sepolicy-use-python3.patch +++ /dev/null @@ -1,335 +0,0 @@ -Downloaded from https://anonscm.debian.org/cgit/selinux/policycoreutils.git/plain/debian/patches/policycoreutils-Make-sepolicy-work-with-python3.patch - -From 2d7ca0b862a35196d562f59bd098df011fd7f0e6 Mon Sep 17 00:00:00 2001 -From: Laurent Bigonville -Date: Mon, 7 Nov 2016 10:51:08 +0100 -Subject: [PATCH] policycoreutils: Make sepolicy work with python3 - -Add python3 support for sepolicy - -Signed-off-by: Laurent Bigonville ---- - policycoreutils/sepolicy/selinux_client.py | 6 ++-- - policycoreutils/sepolicy/sepolicy.py | 38 ++++++++++++------------ - policycoreutils/sepolicy/sepolicy/__init__.py | 16 ++++++---- - policycoreutils/sepolicy/sepolicy/communicate.py | 4 +-- - policycoreutils/sepolicy/sepolicy/generate.py | 30 +++++++++---------- - policycoreutils/sepolicy/sepolicy/interface.py | 14 ++++++--- - policycoreutils/sepolicy/sepolicy/manpage.py | 7 +++-- - 7 files changed, 65 insertions(+), 50 deletions(-) - -diff --git a/policycoreutils/sepolicy/selinux_client.py b/policycoreutils/sepolicy/selinux_client.py -index 7f4a91c..dc29f28 100644 ---- a/sepolicy/selinux_client.py -+++ b/sepolicy/selinux_client.py -@@ -39,6 +39,6 @@ if __name__ == "__main__": - try: - dbus_proxy = SELinuxDBus() - resp = dbus_proxy.customized() -- print convert_customization(resp) -- except dbus.DBusException, e: -- print e -+ print(convert_customization(resp)) -+ except dbus.DBusException as e: -+ print(e) -diff --git a/policycoreutils/sepolicy/sepolicy.py b/policycoreutils/sepolicy/sepolicy.py -index 3e502a7..5bf9b52 100755 ---- a/sepolicy/sepolicy.py -+++ b/sepolicy/sepolicy.py -@@ -262,7 +262,7 @@ def _print_net(src, protocol, perm): - if len(portdict) > 0: - bold_start = "\033[1m" - bold_end = "\033[0;0m" -- print "\n" + bold_start + "%s: %s %s" % (src, protocol, perm) + bold_end -+ print("\n" + bold_start + "%s: %s %s" % (src, protocol, perm) + bold_end) - port_strings = [] - boolean_text = "" - for p in portdict: -@@ -275,7 +275,7 @@ def _print_net(src, protocol, perm): - port_strings.append("%s (%s)" % (", ".join(recs), t)) - port_strings.sort(numcmp) - for p in port_strings: -- print "\t" + p -+ print("\t" + p) - - - def network(args): -@@ -286,7 +286,7 @@ def network(args): - if i[0] not in all_ports: - all_ports.append(i[0]) - all_ports.sort() -- print "\n".join(all_ports) -+ print("\n".join(all_ports)) - - for port in args.port: - found = False -@@ -297,18 +297,18 @@ def network(args): - else: - range = "%s-%s" % (i[0], i[1]) - found = True -- print "%d: %s %s %s" % (port, i[2], portrecsbynum[i][0], range) -+ print("%d: %s %s %s" % (port, i[2], portrecsbynum[i][0], range)) - if not found: - if port < 500: -- print "Undefined reserved port type" -+ print("Undefined reserved port type") - else: -- print "Undefined port type" -+ print("Undefined port type") - - for t in args.type: - if (t, 'tcp') in portrecs.keys(): -- print "%s: tcp: %s" % (t, ",".join(portrecs[t, 'tcp'])) -+ print("%s: tcp: %s" % (t, ",".join(portrecs[t, 'tcp']))) - if (t, 'udp') in portrecs.keys(): -- print "%s: udp: %s" % (t, ",".join(portrecs[t, 'udp'])) -+ print( "%s: udp: %s" % (t, ",".join(portrecs[t, 'udp']))) - - for a in args.applications: - d = sepolicy.get_init_transtype(a) -@@ -357,7 +357,7 @@ def manpage(args): - - for domain in test_domains: - m = ManPage(domain, path, args.root, args.source_files, args.web) -- print m.get_man_page_path() -+ print(m.get_man_page_path()) - - if args.web: - HTMLManPages(manpage_roles, manpage_domains, path, args.os) -@@ -418,7 +418,7 @@ def communicate(args): - out = list(set(writable) & set(readable)) - - for t in out: -- print t -+ print(t) - - - def gen_communicate_args(parser): -@@ -445,7 +445,7 @@ def booleans(args): - args.booleans.sort() - - for b in args.booleans: -- print "%s=_(\"%s\")" % (b, boolean_desc(b)) -+ print("%s=_(\"%s\")" % (b, boolean_desc(b))) - - - def gen_booleans_args(parser): -@@ -484,16 +484,16 @@ def print_interfaces(interfaces, args, append=""): - for i in interfaces: - if args.verbose: - try: -- print get_interface_format_text(i + append) -+ print(get_interface_format_text(i + append)) - except KeyError: -- print i -+ print(i) - if args.compile: - try: - interface_compile_test(i) - except KeyError: -- print i -+ print(i) - else: -- print i -+ print(i) - - - def interface(args): -@@ -565,7 +565,7 @@ def generate(args): - if args.policytype in APPLICATIONS: - mypolicy.gen_writeable() - mypolicy.gen_symbols() -- print mypolicy.generate(args.path) -+ print(mypolicy.generate(args.path)) - - - def gen_interface_args(parser): -@@ -698,12 +698,12 @@ if __name__ == '__main__': - args = parser.parse_args(args=parser_args) - args.func(args) - sys.exit(0) -- except ValueError, e: -+ except ValueError as e: - sys.stderr.write("%s: %s\n" % (e.__class__.__name__, str(e))) - sys.exit(1) -- except IOError, e: -+ except IOError as e: - sys.stderr.write("%s: %s\n" % (e.__class__.__name__, str(e))) - sys.exit(1) - except KeyboardInterrupt: -- print "Out" -+ print("Out") - sys.exit(0) -diff --git a/policycoreutils/sepolicy/sepolicy/__init__.py b/policycoreutils/sepolicy/sepolicy/__init__.py -index 8fbd5b4..fee6438 100644 ---- a/sepolicy/sepolicy/__init__.py -+++ b/sepolicy/sepolicy/__init__.py -@@ -695,7 +695,7 @@ def get_methods(): - # List of per_role_template interfaces - ifs = interfaces.InterfaceSet() - ifs.from_file(fd) -- methods = ifs.interfaces.keys() -+ methods = list(ifs.interfaces.keys()) - fd.close() - except: - sys.stderr.write("could not open interface info [%s]\n" % fn) -@@ -752,7 +752,10 @@ def get_all_entrypoint_domains(): - - - def gen_interfaces(): -- import commands -+ try: -+ from commands import getstatusoutput -+ except ImportError: -+ from subprocess import getstatusoutput - ifile = defaults.interface_info() - headers = defaults.headers() - try: -@@ -763,7 +766,7 @@ def gen_interfaces(): - - if os.getuid() != 0: - raise ValueError(_("You must regenerate interface info by running /usr/bin/sepolgen-ifgen")) -- print(commands.getstatusoutput("/usr/bin/sepolgen-ifgen")[1]) -+ print(getstatusoutput("/usr/bin/sepolgen-ifgen")[1]) - - - def gen_port_dict(): -@@ -1085,8 +1088,11 @@ def get_os_version(): - os_version = "" - pkg_name = "selinux-policy" - try: -- import commands -- rc, output = commands.getstatusoutput("rpm -q '%s'" % pkg_name) -+ try: -+ from commands import getstatusoutput -+ except ImportError: -+ from subprocess import getstatusoutput -+ rc, output = getstatusoutput("rpm -q '%s'" % pkg_name) - if rc == 0: - os_version = output.split(".")[-2] - except: -diff --git a/policycoreutils/sepolicy/sepolicy/communicate.py b/policycoreutils/sepolicy/sepolicy/communicate.py -index b96c4b9..299316e 100755 ---- a/sepolicy/sepolicy/communicate.py -+++ b/sepolicy/sepolicy/communicate.py -@@ -34,8 +34,8 @@ def usage(parser, msg): - - def expand_attribute(attribute): - try: -- return sepolicy.info(sepolicy.ATTRIBUTE, attribute)[0]["types"] -- except RuntimeError: -+ return list(next(sepolicy.info(sepolicy.ATTRIBUTE, attribute))["types"]) -+ except StopIteration: - return [attribute] - - -diff --git a/policycoreutils/sepolicy/sepolicy/generate.py b/policycoreutils/sepolicy/sepolicy/generate.py -index 65b33b6..5696110 100644 ---- a/sepolicy/sepolicy/generate.py -+++ b/sepolicy/sepolicy/generate.py -@@ -31,21 +31,21 @@ import time - import types - import platform - --from templates import executable --from templates import boolean --from templates import etc_rw --from templates import unit_file --from templates import var_cache --from templates import var_spool --from templates import var_lib --from templates import var_log --from templates import var_run --from templates import tmp --from templates import rw --from templates import network --from templates import script --from templates import spec --from templates import user -+from .templates import executable -+from .templates import boolean -+from .templates import etc_rw -+from .templates import unit_file -+from .templates import var_cache -+from .templates import var_spool -+from .templates import var_lib -+from .templates import var_log -+from .templates import var_run -+from .templates import tmp -+from .templates import rw -+from .templates import network -+from .templates import script -+from .templates import spec -+from .templates import user - import sepolgen.interfaces as interfaces - import sepolgen.defaults as defaults - -diff --git a/policycoreutils/sepolicy/sepolicy/interface.py b/policycoreutils/sepolicy/sepolicy/interface.py -index c2cb971..8956f39 100644 ---- a/sepolicy/sepolicy/interface.py -+++ b/sepolicy/sepolicy/interface.py -@@ -192,10 +192,13 @@ def generate_compile_te(interface, idict, name="compiletest"): - def get_xml_file(if_file): - """ Returns xml format of interfaces for given .if policy file""" - import os -- import commands -+ try: -+ from commands import getstatusoutput -+ except ImportError: -+ from subprocess import getstatusoutput - basedir = os.path.dirname(if_file) + "/" - filename = os.path.basename(if_file).split(".")[0] -- rc, output = commands.getstatusoutput("python /usr/share/selinux/devel/include/support/segenxml.py -w -m %s" % basedir + filename) -+ rc, output = getstatusoutput("python /usr/share/selinux/devel/include/support/segenxml.py -w -m %s" % basedir + filename) - if rc != 0: - sys.stderr.write("\n Could not proceed selected interface file.\n") - sys.stderr.write("\n%s" % output) -@@ -208,7 +211,10 @@ def interface_compile_test(interface, path="/usr/share/selinux/devel/policy.xml" - exclude_interfaces = ["userdom", "kernel", "corenet", "files", "dev"] - exclude_interface_type = ["template"] - -- import commands -+ try: -+ from commands import getstatusoutput -+ except ImportError: -+ from subprocess import getstatusoutput - import os - policy_files = {'pp': "compiletest.pp", 'te': "compiletest.te", 'fc': "compiletest.fc", 'if': "compiletest.if"} - idict = get_interface_dict(path) -@@ -219,7 +225,7 @@ def interface_compile_test(interface, path="/usr/share/selinux/devel/policy.xml" - fd = open(policy_files['te'], "w") - fd.write(generate_compile_te(interface, idict)) - fd.close() -- rc, output = commands.getstatusoutput("make -f /usr/share/selinux/devel/Makefile %s" % policy_files['pp']) -+ rc, output = getstatusoutput("make -f /usr/share/selinux/devel/Makefile %s" % policy_files['pp']) - if rc != 0: - sys.stderr.write(output) - sys.stderr.write(_("\nCompile test for %s failed.\n") % interface) -diff --git a/policycoreutils/sepolicy/sepolicy/manpage.py b/policycoreutils/sepolicy/sepolicy/manpage.py -index 7365f93..773a9ab 100755 ---- a/sepolicy/sepolicy/manpage.py -+++ b/sepolicy/sepolicy/manpage.py -@@ -27,7 +27,6 @@ __all__ = ['ManPage', 'HTMLManPages', 'manpage_domains', 'manpage_roles', 'gen_d - import string - import selinux - import sepolicy --import commands - import os - import time - -@@ -162,7 +161,11 @@ def get_alphabet_manpages(manpage_list): - - - def convert_manpage_to_html(html_manpage, manpage): -- rc, output = commands.getstatusoutput("/usr/bin/groff -man -Thtml %s 2>/dev/null" % manpage) -+ try: -+ from commands import getstatusoutput -+ except ImportError: -+ from subprocess import getstatusoutput -+ rc, output = getstatusoutput("/usr/bin/groff -man -Thtml %s 2>/dev/null" % manpage) - if rc == 0: - print(html_manpage, "has been created") - fd = open(html_manpage, 'w') --- -2.10.2 - -- cgit 1.4.1 From 238f3a39a0f302e2369a0914add4992ec7e259df Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Thu, 25 Jan 2018 13:27:09 -0500 Subject: gnu: dovecot: Fix CVE-2017-15132. * gnu/packages/patches/dovecot-CVE-2017-15132.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/mail.scm (dovecot)[source]: Use it. --- gnu/local.mk | 1 + gnu/packages/mail.scm | 1 + gnu/packages/patches/dovecot-CVE-2017-15132.patch | 36 +++++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 gnu/packages/patches/dovecot-CVE-2017-15132.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index e96040a4ea..fae837ddaf 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -609,6 +609,7 @@ dist_patch_DATA = \ %D%/packages/patches/diffutils-gets-undeclared.patch \ %D%/packages/patches/doc++-include-directives.patch \ %D%/packages/patches/doc++-segfault-fix.patch \ + %D%/packages/patches/dovecot-CVE-2017-15132.patch \ %D%/packages/patches/doxygen-test.patch \ %D%/packages/patches/dvd+rw-tools-add-include.patch \ %D%/packages/patches/eigen-arm-neon-fixes.patch \ diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 24dee8a590..9a398c1831 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -1144,6 +1144,7 @@ facilities for checking incoming mail.") (uri (string-append "https://www.dovecot.org/releases/" (version-major+minor version) "/" name "-" version ".tar.gz")) + (patches (search-patches "dovecot-CVE-2017-15132.patch")) (sha256 (base32 "10c5myzgys866c3x6jdr1s9x9pqnjd5vpyz8z384sph21m3wnq6y")))) (build-system gnu-build-system) diff --git a/gnu/packages/patches/dovecot-CVE-2017-15132.patch b/gnu/packages/patches/dovecot-CVE-2017-15132.patch new file mode 100644 index 0000000000..32666b8557 --- /dev/null +++ b/gnu/packages/patches/dovecot-CVE-2017-15132.patch @@ -0,0 +1,36 @@ +Fix CVE-2017-15132: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-15132 + +Patch copied from upstream source repository: + +https://github.com/dovecot/core/commit/1a29ed2f96da1be22fa5a4d96c7583aa81b8b060 + +From 1a29ed2f96da1be22fa5a4d96c7583aa81b8b060 Mon Sep 17 00:00:00 2001 +From: Timo Sirainen +Date: Mon, 18 Dec 2017 16:50:51 +0200 +Subject: [PATCH] lib-auth: Fix memory leak in auth_client_request_abort() + +This caused memory leaks when authentication was aborted. For example +with IMAP: + +a AUTHENTICATE PLAIN +* + +Broken by 9137c55411aa39d41c1e705ddc34d5bd26c65021 +--- + src/lib-auth/auth-client-request.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/lib-auth/auth-client-request.c b/src/lib-auth/auth-client-request.c +index 480fb42b30..046f7c307d 100644 +--- a/src/lib-auth/auth-client-request.c ++++ b/src/lib-auth/auth-client-request.c +@@ -186,6 +186,7 @@ void auth_client_request_abort(struct auth_client_request **_request) + + auth_client_send_cancel(request->conn->client, request->id); + call_callback(request, AUTH_REQUEST_STATUS_ABORT, NULL, NULL); ++ pool_unref(&request->pool); + } + + unsigned int auth_client_request_get_id(struct auth_client_request *request) -- cgit 1.4.1 From 218b94f3b8c5a01cd348b125c8d8dcd66225a220 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Thu, 25 Jan 2018 02:03:46 +0100 Subject: gnu: reposurgeon: Update to 3.43. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/version-control.scm (reposurgeon): Update to 3.43. [source]: Add a patch needed to build the package. [arguments]: Add ‘patch-inputs’ phase. [native-inputs]: Replace docbook-xml-4.1.2 with the latest docbook-xml. [inputs]: Add tzdata. * gnu/packages/patches/reposurgeon-add-missing-docbook-files.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + .../reposurgeon-add-missing-docbook-files.patch | 22 ++++++++++++++++++++++ gnu/packages/version-control.scm | 20 +++++++++++++++----- 3 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 gnu/packages/patches/reposurgeon-add-missing-docbook-files.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index fae837ddaf..80d6a8d4c4 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1058,6 +1058,7 @@ dist_patch_DATA = \ %D%/packages/patches/readline-link-ncurses.patch \ %D%/packages/patches/readline-6.2-CVE-2014-2524.patch \ %D%/packages/patches/readline-7.0-mingw.patch \ + %D%/packages/patches/reposurgeon-add-missing-docbook-files.patch \ %D%/packages/patches/reptyr-fix-gcc-7.patch \ %D%/packages/patches/ripperx-missing-file.patch \ %D%/packages/patches/rpcbind-CVE-2017-8779.patch \ diff --git a/gnu/packages/patches/reposurgeon-add-missing-docbook-files.patch b/gnu/packages/patches/reposurgeon-add-missing-docbook-files.patch new file mode 100644 index 0000000000..707d032744 --- /dev/null +++ b/gnu/packages/patches/reposurgeon-add-missing-docbook-files.patch @@ -0,0 +1,22 @@ +Author: Tobias Geerinckx-Rice +Upstream issue: + +Two files required to build the documentation (including man pages) are +not included in the latest reposurgeon release, breaking ‘make all’. + +Luckily, they are tiny: + +--- a/docbook-extra.xml 1970-01-01 01:00:00.000000000 +0100 ++++ b/docbook-extra.xml 2018-01-25 00:17:18.236727017 +0100 +@@ -0,0 +1,5 @@ ++ ++ ++ ++1 ++ +diff -Naur reposurgeon-3.43/nofooter.conf reposurgeon-3.43-b/nofooter.conf +--- a/nofooter.conf 1970-01-01 01:00:00.000000000 +0100 ++++ b/nofooter.conf 2018-01-25 00:23:15.384498847 +0100 +@@ -0,0 +1,2 @@ ++[footer-text] ++ diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 976849b184..ded181e8ab 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -11,7 +11,7 @@ ;;; Copyright © 2015, 2017 Ricardo Wurmus ;;; Copyright © 2016, 2017 Leo Famulari ;;; Copyright © 2016, 2017, 2018 ng0 -;;; Copyright © 2017 Tobias Geerinckx-Rice +;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice ;;; Copyright © 2017 Vasile Dumitrascu ;;; Copyright © 2017 Clément Lassieur ;;; Copyright © 2017 André @@ -1318,14 +1318,16 @@ any project with more than one developer, is one of Aegis's major functions.") (define-public reposurgeon (package (name "reposurgeon") - (version "3.37") + (version "3.43") (source (origin (method url-fetch) (uri (string-append "http://www.catb.org/~esr/" name "/" name "-" version ".tar.xz")) (sha256 (base32 - "14asjg4xy3mhh5z0r3k7c1wv9y803j2zfq32g5q5m95sf7yzygan")))) + "1af0z14wcm4bk5a9ysinbwq2fp3lf5f7i8mvwh7286hr3fnagcaz")) + (patches (search-patches + "reposurgeon-add-missing-docbook-files.patch")))) (build-system gnu-build-system) (arguments `(#:tests? #f ;no test suite distributed @@ -1333,6 +1335,13 @@ any project with more than one developer, is one of Aegis's major functions.") (list (string-append "target=" (assoc-ref %outputs "out"))) #:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-inputs + (lambda* (#:key inputs #:allow-other-keys) + (let ((tzdata (assoc-ref inputs "tzdata"))) + (substitute* "reposurgeon" + (("/usr/share/zoneinfo") + (string-append tzdata "/share/zoneinfo"))) + #t))) (delete 'configure) (add-before 'build 'fix-docbook (lambda* (#:key inputs #:allow-other-keys) @@ -1347,10 +1356,11 @@ any project with more than one developer, is one of Aegis's major functions.") (string-append (assoc-ref outputs "out") "/share/emacs/site-lisp"))))))) (inputs - `(("python" ,python-wrapper))) + `(("python" ,python-wrapper) + ("tzdata" ,tzdata))) (native-inputs `(("asciidoc" ,asciidoc) - ("docbook-xml" ,docbook-xml-4.1.2) + ("docbook-xml" ,docbook-xml) ("docbook-xsl" ,docbook-xsl) ("libxml2" ,libxml2) ("xmlto" ,xmlto))) -- cgit 1.4.1