=== modified file 'DBUS-API' --- DBUS-API 2017-02-23 19:11:11 +0000 +++ DBUS-API 2017-08-20 16:20:54 +0000 @@ -134,20 +134,21 @@ Copyright © 2010-2017 Björn Påhlsson ** License: - - This program is free software: you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but + + This file is part of Mandos. + + Mandos is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Mandos is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see - . + along with Mandos. If not, see . #+STARTUP: showall === modified file 'debian/control' --- debian/control 2017-01-21 22:22:44 +0000 +++ debian/control 2017-08-20 16:27:49 +0000 @@ -1,6 +1,6 @@ Source: mandos Section: admin -Priority: extra +Priority: optional Maintainer: Mandos Maintainers Uploaders: Teddy Hogeborn , Björn Påhlsson @@ -10,7 +10,7 @@ xsltproc, pkg-config, libnl-route-3-dev Build-Depends-Indep: systemd, python (>= 2.7), python (<< 3), python-dbus, python-gi -Standards-Version: 3.9.8 +Standards-Version: 4.0.1 Vcs-Bzr: https://ftp.recompile.se/pub/mandos/trunk Vcs-Browser: https://bzr.recompile.se/loggerhead/mandos/trunk/files Homepage: https://www.recompile.se/mandos === modified file 'debian/copyright' --- debian/copyright 2017-02-23 19:11:11 +0000 +++ debian/copyright 2017-08-20 16:23:14 +0000 @@ -1,4 +1,4 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: Mandos Upstream-Contact: Mandos Source: @@ -7,19 +7,20 @@ Copyright: Copyright © 2008-2017 Teddy Hogeborn Copyright © 2008-2017 Björn Påhlsson License: GPL-3+ - This program is free software: you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - . - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of + This file is part of Mandos. + . + Mandos is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + . + Mandos is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License - along with this program. If not, see - . + along with Mandos. If not, see . . On Debian systems, the complete text of the GNU General Public License can be found in "/usr/share/common-licenses/GPL-3". === modified file 'initramfs-tools-script' --- initramfs-tools-script 2017-02-21 21:42:08 +0000 +++ initramfs-tools-script 2017-08-20 14:41:20 +0000 @@ -113,10 +113,24 @@ test -x "$mandos" # parse /conf/conf.d/cryptroot. Format: -# target=sda2_crypt,source=/dev/sda2,key=none,keyscript=/foo/bar/baz +# target=sda2_crypt,source=/dev/sda2,rootdev,key=none,keyscript=/foo/bar/baz +# Is the root device specially marked? +changeall=yes +while read -r options; do + case "$options" in + rootdev,*|*,rootdev,*|*,rootdev) + # If the root device is specially marked, don't change all + # lines in crypttab by default. + changeall=no + ;; + esac +done < /conf/conf.d/cryptroot + exec 3>/conf/conf.d/cryptroot.mandos while read -r options; do newopts="" + keyscript="" + changethis="$changeall" # Split option line on commas old_ifs="$IFS" IFS="$IFS," @@ -128,6 +142,16 @@ newopts="$newopts,$opt" ;; "") : ;; + # Always use Mandos on the root device, if marked + rootdev) + changethis=yes + newopts="$newopts,$opt" + ;; + # Don't use Mandos on resume device, if marked + resumedev) + changethis=no + newopts="$newopts,$opt" + ;; *) newopts="$newopts,$opt" ;; @@ -136,7 +160,7 @@ IFS="$old_ifs" unset old_ifs # If there was no keyscript option, add one. - if [ -z "$keyscript" ]; then + if [ "$changethis" = yes ] && [ -z "$keyscript" ]; then replace_cryptroot=yes newopts="$newopts,keyscript=$mandos" fi === modified file 'initramfs-unpack' --- initramfs-unpack 2013-10-13 15:43:42 +0000 +++ initramfs-unpack 2017-08-20 16:20:54 +0000 @@ -5,18 +5,20 @@ # Copyright © 2013 Teddy Hogeborn # Copyright © 2013 Björn Påhlsson # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by +# This file is part of Mandos. +# +# Mandos is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This program is distributed in the hope that it will be useful, +# Mandos is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License -# along with this program. If not, see +# along with Mandos. If not, see # . # # Contact the authors at . === modified file 'legalnotice.xml' --- legalnotice.xml 2008-09-06 17:24:58 +0000 +++ legalnotice.xml 2017-08-20 16:20:54 +0000 @@ -3,25 +3,26 @@ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> - This manual page is free software: you can redistribute it and/or - modify it under the terms of the GNU General - Public License as published by the Free Software Foundation, - either version 3 of the License, or (at your option) any later - version. - - - - This manual page is distributed in the hope that it will be - useful, but WITHOUT ANY WARRANTY; without even the implied - warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more - details. + This manual page is part of Mandos. + + + + Mandos is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public + License as published by the Free Software Foundation, either + version 3 of the License, or (at your option) any later version. + + + + Mandos is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. You should have received a copy of the GNU - General Public License along with this program. If not, see - http://www.gnu.org/licenses/. === modified file 'mandos' --- mandos 2017-02-23 20:35:20 +0000 +++ mandos 2017-08-20 16:20:54 +0000 @@ -14,19 +14,20 @@ # Copyright © 2008-2017 Teddy Hogeborn # Copyright © 2008-2017 Björn Påhlsson # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by +# This file is part of Mandos. +# +# Mandos is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of +# Mandos is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see -# . +# along with Mandos. If not, see . # # Contact the authors at . # === modified file 'mandos-ctl' --- mandos-ctl 2017-02-23 20:35:20 +0000 +++ mandos-ctl 2017-08-20 16:20:54 +0000 @@ -6,19 +6,20 @@ # Copyright © 2008-2017 Teddy Hogeborn # Copyright © 2008-2017 Björn Påhlsson # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by +# This file is part of Mandos. +# +# Mandos is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of +# Mandos is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see -# . +# along with Mandos. If not, see . # # Contact the authors at . # @@ -38,7 +39,6 @@ import re import os import collections -import doctest import json import dbus @@ -345,6 +345,7 @@ parser.error("--all requires an action.") if options.check: + import doctest fail_count, test_count = doctest.testmod() sys.exit(os.EX_OK if fail_count == 0 else 1) === modified file 'mandos-keygen' --- mandos-keygen 2017-02-23 20:35:20 +0000 +++ mandos-keygen 2017-08-20 16:20:54 +0000 @@ -5,18 +5,20 @@ # Copyright © 2008-2017 Teddy Hogeborn # Copyright © 2008-2017 Björn Påhlsson # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by +# This file is part of Mandos. +# +# Mandos is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of +# Mandos is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with Mandos. If not, see . # # Contact the authors at . # @@ -161,8 +163,8 @@ [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|*) FORCE=0;; esac - if [ \( -e "$SECKEYFILE" -o -e "$PUBKEYFILE" \) \ - -a "$FORCE" -eq 0 ]; then + if { [ -e "$SECKEYFILE" ] || [ -e "$PUBKEYFILE" ]; } \ + && [ "$FORCE" -eq 0 ]; then echo "Refusing to overwrite old key files; use --force" >&2 exit 1 fi @@ -289,8 +291,9 @@ for ssh_keytype in ecdsa-sha2-nistp256 ed25519 rsa; do set +e ssh_fingerprint="`ssh-keyscan -t $ssh_keytype localhost 2>/dev/null`" + err=$? set -e - if [ $? -ne 0 ]; then + if [ $err -ne 0 ]; then ssh_fingerprint="" continue fi === modified file 'mandos-monitor' --- mandos-monitor 2017-02-23 20:35:20 +0000 +++ mandos-monitor 2017-08-20 16:20:54 +0000 @@ -6,19 +6,20 @@ # Copyright © 2009-2017 Teddy Hogeborn # Copyright © 2009-2017 Björn Påhlsson # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by +# This file is part of Mandos. +# +# Mandos is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of +# Mandos is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see -# . +# along with Mandos. If not, see . # # Contact the authors at . # === modified file 'mandos.lsm' --- mandos.lsm 2017-02-23 20:35:20 +0000 +++ mandos.lsm 2017-06-24 10:08:21 +0000 @@ -1,7 +1,7 @@ Begin4 Title: Mandos Version: 1.7.15 -Entered-date: 2017-02-23 +Entered-date: 2017-06-24 Description: The Mandos system allows computers to have encrypted root file systems and at the same time be capable of remote and/or unattended reboots. === modified file 'mandos.service' --- mandos.service 2016-10-30 21:08:05 +0000 +++ mandos.service 2017-08-20 14:14:14 +0000 @@ -28,6 +28,8 @@ ProtectSystem=full ProtectHome=yes CapabilityBoundingSet=CAP_KILL CAP_SETGID CAP_SETUID CAP_DAC_OVERRIDE CAP_NET_RAW +ProtectKernelTunables=yes +ProtectControlGroups=yes [Install] WantedBy=multi-user.target === modified file 'network-hooks.d/bridge' --- network-hooks.d/bridge 2012-06-13 22:06:57 +0000 +++ network-hooks.d/bridge 2017-08-20 14:08:59 +0000 @@ -29,7 +29,7 @@ . "$CONFIG" fi -if [ -z "$BRIDGE" -o -z "$PORT_ADDRESSES" ]; then +if [ -z "$BRIDGE" ] || [ -z "$PORT_ADDRESSES" ]; then exit fi === modified file 'plugin-helpers/mandos-client-iprouteadddel.c' --- plugin-helpers/mandos-client-iprouteadddel.c 2017-02-23 19:11:11 +0000 +++ plugin-helpers/mandos-client-iprouteadddel.c 2017-08-20 16:20:54 +0000 @@ -5,19 +5,20 @@ * Copyright © 2015-2017 Teddy Hogeborn * Copyright © 2015-2017 Björn Påhlsson * - * This program is free software: you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but + * This file is part of Mandos. + * + * Mandos is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Mandos is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see - * . + * along with Mandos. If not, see . * * Contact the authors at . */ === modified file 'plugin-runner.c' --- plugin-runner.c 2017-02-23 19:11:11 +0000 +++ plugin-runner.c 2017-08-20 16:20:54 +0000 @@ -5,19 +5,20 @@ * Copyright © 2008-2017 Teddy Hogeborn * Copyright © 2008-2017 Björn Påhlsson * - * This program is free software: you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but + * This file is part of Mandos. + * + * Mandos is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Mandos is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see - * . + * along with Mandos. If not, see . * * Contact the authors at . */ === modified file 'plugins.d/askpass-fifo.c' --- plugins.d/askpass-fifo.c 2017-02-23 19:11:11 +0000 +++ plugins.d/askpass-fifo.c 2017-08-20 16:20:54 +0000 @@ -5,19 +5,20 @@ * Copyright © 2008-2017 Teddy Hogeborn * Copyright © 2008-2017 Björn Påhlsson * - * This program is free software: you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but + * This file is part of Mandos. + * + * Mandos is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Mandos is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see - * . + * along with Mandos. If not, see . * * Contact the authors at . */ === modified file 'plugins.d/mandos-client.c' --- plugins.d/mandos-client.c 2017-02-23 19:11:11 +0000 +++ plugins.d/mandos-client.c 2017-08-20 16:20:54 +0000 @@ -12,19 +12,20 @@ * Copyright © 2008-2017 Teddy Hogeborn * Copyright © 2008-2017 Björn Påhlsson * - * This program is free software: you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but + * This file is part of Mandos. + * + * Mandos is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Mandos is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see - * . + * along with Mandos. If not, see . * * Contact the authors at . */ === modified file 'plugins.d/password-prompt.c' --- plugins.d/password-prompt.c 2017-02-23 19:11:11 +0000 +++ plugins.d/password-prompt.c 2017-08-20 16:20:54 +0000 @@ -5,19 +5,20 @@ * Copyright © 2008-2017 Teddy Hogeborn * Copyright © 2008-2017 Björn Påhlsson * - * This program is free software: you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but + * This file is part of Mandos. + * + * Mandos is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Mandos is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see - * . + * along with Mandos. If not, see . * * Contact the authors at . */ @@ -215,6 +216,12 @@ if(ret == -1){ error_plus(1, errno, "scandir"); } + { + int i = ret; + while(i--){ + free(direntries[i]); + } + } free(direntries); return ret > 0; } === modified file 'plugins.d/plymouth.c' --- plugins.d/plymouth.c 2017-02-23 19:11:11 +0000 +++ plugins.d/plymouth.c 2017-08-20 16:20:54 +0000 @@ -5,19 +5,20 @@ * Copyright © 2010-2017 Teddy Hogeborn * Copyright © 2010-2017 Björn Påhlsson * - * This program is free software: you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but + * This file is part of Mandos. + * + * Mandos is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Mandos is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see - * . + * along with Mandos. If not, see . * * Contact the authors at . */ === modified file 'plugins.d/splashy.c' --- plugins.d/splashy.c 2017-02-23 19:11:11 +0000 +++ plugins.d/splashy.c 2017-08-20 16:20:54 +0000 @@ -5,19 +5,20 @@ * Copyright © 2008-2017 Teddy Hogeborn * Copyright © 2008-2017 Björn Påhlsson * - * This program is free software: you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but + * This file is part of Mandos. + * + * Mandos is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Mandos is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see - * . + * along with Mandos. If not, see . * * Contact the authors at . */ === modified file 'plugins.d/usplash.c' --- plugins.d/usplash.c 2017-02-23 19:11:11 +0000 +++ plugins.d/usplash.c 2017-08-20 16:20:54 +0000 @@ -5,19 +5,20 @@ * Copyright © 2008-2017 Teddy Hogeborn * Copyright © 2008-2017 Björn Påhlsson * - * This program is free software: you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but + * This file is part of Mandos. + * + * Mandos is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Mandos is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see - * . + * along with Mandos. If not, see . * * Contact the authors at . */