Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package usbauth for openSUSE:Factory checked in at 2023-03-15 18:54:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/usbauth (Old) and /work/SRC/openSUSE:Factory/.usbauth.new.31432 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "usbauth" Wed Mar 15 18:54:34 2023 rev:8 rq:1071873 version:1.0.5 Changes: -------- --- /work/SRC/openSUSE:Factory/usbauth/usbauth.changes 2022-05-03 21:19:52.505066537 +0200 +++ /work/SRC/openSUSE:Factory/.usbauth.new.31432/usbauth.changes 2023-03-15 18:54:48.460479138 +0100 @@ -1,0 +2,8 @@ +Tue Mar 14 11:42:45 UTC 2023 - Dirk Müller <dmuel...@suse.com> + +- update to 1.0.5: + * Support devpath comparisation + * Support explicit value type comparisation + * Add default value types + +------------------------------------------------------------------- Old: ---- usbauth-all-1.0.3.tar.gz New: ---- usbauth-all-1.0.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ usbauth.spec ++++++ --- /var/tmp/diff_new_pack.tixDi0/_old 2023-03-15 18:54:49.240483287 +0100 +++ /var/tmp/diff_new_pack.tixDi0/_new 2023-03-15 18:54:49.248483330 +0100 @@ -1,7 +1,7 @@ # # spec file for package usbauth # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # Copyright (c) 2017 Stefan Koch <stefan.koc...@gmail.com> # Copyright (c) 2015 SUSE LLC. All Rights Reserved. # Author: Stefan Koch <sk...@suse.de> @@ -21,15 +21,18 @@ %define _name usbauth-all Name: usbauth -Version: 1.0.3 -Release: 0 +Version: 1.0.5 Summary: USB firewall against BadUSB attacks -License: GPL-2.0-only -Group: Productivity/Security URL: https://github.com/kochstefan/usbauth-all/ Source: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{_name}-%{version}.tar.gz + +Release: 0 +License: GPL-2.0-only +Group: Productivity/Security + Requires: systemd Requires: udev +BuildRequires: gcc BuildRequires: libtool BuildRequires: systemd-rpm-macros BuildRequires: pkgconfig(dbus-1) @@ -46,22 +49,30 @@ %autosetup -n %{_name}-%{version} %build -cd usbauth +pushd %{name}/ autoreconf -f -i %configure %make_build +popd %install -cd usbauth +pushd %{name}/ %make_install udevrulesdir=%_udevrulesdir +popd %files -%doc %{name}/README %{name}/CHANGELOG.md %license %{name}/COPYING +%doc %{name}/README +%doc %_mandir/*/* %_sbindir/usbauth %config %_sysconfdir/dbus-1/system.d/org.opensuse.usbauth.conf %config(noreplace) %_sysconfdir/usbauth.conf %_udevrulesdir/20-usbauth.rules -%_mandir/man8/usbauth.8.* + +%post +%{?udev_rules_update:%udev_rules_update} + +%postun +%{?udev_rules_update:%udev_rules_update} %changelog ++++++ usbauth-all-1.0.3.tar.gz -> usbauth-all-1.0.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/libusbauth-configparser/CHANGELOG.md new/usbauth-all-1.0.5/libusbauth-configparser/CHANGELOG.md --- old/usbauth-all-1.0.3/libusbauth-configparser/CHANGELOG.md 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/libusbauth-configparser/CHANGELOG.md 2022-12-19 22:15:35.000000000 +0100 @@ -1,3 +1,6 @@ +libusbauth-configparser 1.0.5 (2022-12-19) + * Add default value types + libusbauth-configparser 1.0.1 (2019-01-22) * Support string quoting diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/libusbauth-configparser/src/generic.h new/usbauth-all-1.0.5/libusbauth-configparser/src/generic.h --- old/usbauth-all-1.0.3/libusbauth-configparser/src/generic.h 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/libusbauth-configparser/src/generic.h 2022-12-19 22:15:35.000000000 +0100 @@ -30,11 +30,13 @@ #include <stdint.h> #include <stdbool.h> +enum Valuetype {UNKNOWN, STRING, DEC, HEX}; + enum Parameter { INVALID, busnum, devpath, idVendor, idProduct, bDeviceClass, bDeviceSubClass, bDeviceProtocol, bConfigurationValue, bNumInterfaces, bInterfaceNumber, bInterfaceClass, bInterfaceSubClass, bInterfaceProtocol, bNumEndpoints, bcdDevice, speed, devnum, serial, manufacturer, product, connectType, intfcount, devcount, PARAM_NUM_ITEMS }; -enum Operator { eq, neq, lt, gt, l, g, OP_NUM_ITEMS }; +enum Operator { eq, neq, le, ge, l, g, OP_NUM_ITEMS }; // structure for parameters, example bInterfaceNumber==01 struct Data { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/libusbauth-configparser/src/usbauth-configparser.c new/usbauth-all-1.0.5/libusbauth-configparser/src/usbauth-configparser.c --- old/usbauth-all-1.0.3/libusbauth-configparser/src/usbauth-configparser.c 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/libusbauth-configparser/src/usbauth-configparser.c 2022-12-19 22:15:35.000000000 +0100 @@ -41,6 +41,11 @@ const char* parameter_strings[] = {"INVALID", "busnum", "devpath", "idVendor", "idProduct", "bDeviceClass", "bDeviceSubClass", "bDeviceProtocol", "bConfigurationValue", "bNumInterfaces", "bInterfaceNumber", "bInterfaceClass", "bInterfaceSubClass", "bInterfaceProtocol", "bNumEndpoints", "bcdDevice", "speed", "devnum", "serial", "manufacturer", "product", "connectType", "intfcount", "devcount", "PARAM_NUM_ITEMS"}; const char* operator_strings[] = {"==", "!=", "<=", ">=", "<", ">", "OP_NUM_ITEMS"}; +// mapping table for value types of parameters (maps with parameter_strings array) +enum Valuetype value_map[] = { + INVALID, DEC, DEC, HEX, HEX, HEX, HEX, HEX, DEC, DEC, HEX, HEX, HEX, HEX, HEX, HEX, STRING, DEC, STRING, STRING, STRING, STRING, HEX, HEX, PARAM_NUM_ITEMS +}; + const char* usbauth_get_param_valStr(enum Parameter param, struct udev_device *udevdev) { struct udev_device *parent = NULL; const char* paramStr = usbauth_param_to_str(param); @@ -75,6 +80,11 @@ return val; } +enum Valuetype usbauth_get_param_type(enum Parameter param) { + size_t maplen = sizeof(value_map)/sizeof(enum Valuetype); + return param < maplen ? value_map[param] : UNKNOWN; +} + int usbauth_str_to_enum(const char *string, const char** string_array, unsigned array_len) { enum Parameter ret = INVALID; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/libusbauth-configparser/src/usbauth-configparser.h new/usbauth-all-1.0.5/libusbauth-configparser/src/usbauth-configparser.h --- old/usbauth-all-1.0.3/libusbauth-configparser/src/usbauth-configparser.h 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/libusbauth-configparser/src/usbauth-configparser.h 2022-12-19 22:15:35.000000000 +0100 @@ -50,6 +50,15 @@ int usbauth_get_param_val(enum Parameter param, struct udev_device *udevdev); /** + * get parameter type as ValueType enum + * + * @param: parameter as enum + * + * Return: parameter type as ValueType enum + */ +enum Valuetype usbauth_get_param_type(enum Parameter param); + +/** * convert string to enum * * @string: string to convert diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/changelog new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/changelog --- old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/changelog 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/changelog 2022-12-19 22:15:35.000000000 +0100 @@ -1,11 +1,113 @@ -libusbauth-configparser (1.0.1) unstable; urgency=medium +libusbauth-configparser (1.0.3-1) unstable; urgency=medium - * Support string quoting + * Import new upstream release + * Add yml to enable salsa CI + * d/control: + - Bump Standards-Version to 4.5.1 + - Bump debhelper-compat to 13 + * d/rules: + - Remove unneeded linker flag - -- Stefan Koch <stefan.koc...@gmail.com> Tue, 22 Jan 2019 23:00:00 +0200 + -- SZ Lin (æä¸æº) <sz...@debian.org> Fri, 08 Jan 2021 16:02:29 +0800 -libusbauth-configparser (1.0) unstable; urgency=medium +libusbauth-configparser (1.0.2-1) unstable; urgency=low - * Initial Release. + [ Kun-Hung Tsai (è¡æå®) ] + * Import new upstream release + * d/control: + - Replace debian/compat with debhelper-compat build dependency + - Bump Standards-Version to 4.5.0 - -- Stefan Koch <stefan.koc...@gmail.com> Wed, 17 Jan 2018 23:50:00 +0200 + -- Kun-Hung Tsai (è¡æå®) <moonape1...@gmail.com> Sun, 8 Mar 2020 10:00:10 +0800 + +libusbauth-configparser (1.0.1+git20190123.0e6393b-4) unstable; urgency=low + + [ Kun-Hung Tsai (è¡æå®) ] + * d/test: Fix debian test script sudo error + + [ SZ Lin (æä¸æº) ] + * d/control: + - Bump Standards-Version to 4.4.0 + + -- SZ Lin (æä¸æº) <sz...@debian.org> Tue, 06 Aug 2019 14:39:01 +0800 + +libusbauth-configparser (1.0.1+git20190123.0e6393b-3) unstable; urgency=low + + [ Kun-Hung Tsai (è¡æå®) ] + * d/test: Update debian test script + * d/watch: Update watch file to fix lintian warning + + [ SZ Lin (æä¸æº) ] + * d/control: + - Update package maintainer + + -- SZ Lin (æä¸æº) <sz...@debian.org> Fri, 26 Apr 2019 09:51:49 +0800 + +libusbauth-configparser (1.0.1+git20190123.0e6393b-2) unstable; urgency=medium + + [ Kun-Hung Tsai (è¡æå®) ] + * d/.git-dpm: Remove unused .git-dpm file + + [ SZ Lin (æä¸æº) ] + * d/copyright: + - Update copyright information + + -- SZ Lin (æä¸æº) <sz...@debian.org> Tue, 12 Feb 2019 23:14:35 +0800 + +libusbauth-configparser (1.0.1+git20190123.0e6393b-1) unstable; urgency=medium + + * Import new upstream release + + -- Kun-Hung Tsai (è¡æå®) <moonape1...@gmail.com> Tue, 29 Jan 2019 16:01:02 +0800 + +libusbauth-configparser (1.0+git20190118.15c218a-1) unstable; urgency=medium + + * Import new upstream release + * d/upstream: Add upstream metadata + * d/control: Bump debhelper version to 12 + * d/control: Bump standard version to 4.3.0 + * d/compat: Bump compat version to 12 + * d/libusbauth-configparser1.symbols: Add build depends package field + * d/test: Add test files + + -- Kun-Hung Tsai (è¡æå®) <moonape1...@gmail.com> Thu, 10 Jan 2019 19:51:03 +0800 + +libusbauth-configparser (1.0~git20180214-1) unstable; urgency=medium + + * Import new upstream release + + -- SZ Lin (æä¸æº) <sz...@debian.org> Mon, 26 Feb 2018 21:54:25 +0800 + +libusbauth-configparser (1.0~git20180119-1) unstable; urgency=medium + + * Import new upstream release + * Move VCS to salsa + + -- SZ Lin (æä¸æº) <sz...@debian.org> Thu, 22 Feb 2018 10:44:37 +0800 + +libusbauth-configparser (1.0~git20180118-2) UNRELEASED; urgency=medium + + * Import new upstream release + * d/control: Bump debhelper version to 11 + * d/control: Bump standard version to 4.1.3 + * d/compat: Bump compat version to 11 + * d/copyright: Update copyright + + -- SZ Lin (æä¸æº) <sz...@debian.org> Sun, 21 Jan 2018 22:16:51 +0800 + +libusbauth-configparser (1.0~git20171209-2) unstable; urgency=medium + + * d/copyright: make license type consistent with source files + * d/control: Update information of Vcs and homepage URL + + -- SZ Lin (æä¸æº) <sz...@debian.org> Tue, 19 Dec 2017 11:26:48 +0800 + +libusbauth-configparser (1.0~git20171209-1) unstable; urgency=medium + + [ Stefan Koch ] + * Initial Release (Closes: 879714) + + [ SZ Lin (æä¸æº) ] + * Correct the copyright + + -- SZ Lin (æä¸æº) <sz...@debian.org> Tue, 12 Dec 2017 15:26:47 +0800 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/control new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/control --- old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/control 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/control 2022-12-19 22:15:35.000000000 +0100 @@ -1,20 +1,46 @@ Source: libusbauth-configparser -Priority: optional -Maintainer: Stefan Koch <stefan.koc...@gmail.com> -Build-Depends: debhelper (>= 9) -Standards-Version: 3.9.8 Section: libs -Homepage: https://github.com/kochstefan/usbauth-all -#Vcs-Git: https://github.com/kochstefan/usbauth-all.git -#Vcs-Browser: https://github.com/kochstefan/usbauth-all/libusbauth-configparser +Priority: optional +Maintainer: Kun-Hung Tsai (è¡æå®) <moonape1...@gmail.com> +Uploaders: SZ Lin (æä¸æº) <sz...@debian.org> +Build-Depends: debhelper-compat (= 13), + pkg-config, + automake, + flex, + bison, + libudev-dev, + m4 +Standards-Version: 4.5.1 +Homepage: https://github.com/kochstefan/usbauth-all/tree/master/libusbauth-configparser +Vcs-Git: https://salsa.debian.org/debian/libusbauth-configparser.git +Vcs-Browser: https://salsa.debian.org/debian/libusbauth-configparser +Rules-Requires-Root: no Package: libusbauth-configparser-dev Section: libdevel -Architecture: any +Architecture: linux-any Depends: libusbauth-configparser1 (= ${binary:Version}), ${misc:Depends} Description: Development package of library for USB Firewall including flex/bison parser + It is a firewall against BadUSB attacks. A config file describes in which way + USB interfaces would be accepted or denied. To the kernel an interface + authorization was developed with this firewall. The firewall sets the + authorization mask according to the rules. + . + The library is used to read the usbauth config file into data structures and is + used by usbauth and YaST + . + This package contains the required libraries, headers Package: libusbauth-configparser1 -Architecture: any +Architecture: linux-any Depends: ${shlibs:Depends}, ${misc:Depends} Description: Library for USB Firewall including flex/bison parser + It is a firewall against BadUSB attacks. A config file describes in which way + USB interfaces would be accepted or denied. To the kernel an interface + authorization was developed with this firewall. The firewall sets the + authorization mask according to the rules. + . + The library is used to read the usbauth config file into data structures and is + used by usbauth and YaST + . + This package contains the shared library diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/copyright new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/copyright --- old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/copyright 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/copyright 2022-12-19 22:15:35.000000000 +0100 @@ -1,6 +1,6 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: libusbauth-configparser -Source: <https://github.com/kochstefan/usbauth-all.git> +Source: https://github.com/kochstefan/usbauth-all.git Files: * Copyright: 2015 SUSE LLC. Author: Stefan Koch <sk...@suse.de> @@ -8,26 +8,24 @@ License: LGPL-2.1 Files: debian/* -Copyright: 2017 Stefan Koch <stefan.koc...@gmail.com> +Copyright: 2017-2018 Stefan Koch <stefan.koc...@gmail.com> + 2017-2019 SZ Lin (æä¸æº) <sz...@debian.org> + 2019 Kun-Hung Tsai (è¡æå®) <moonape1...@gmail.com> License: LGPL-2.1 License: LGPL-2.1 - This package is free software; you can redistribute it and/or - modify it under the terms of version 2.1 of the GNU Lesser - General Public License as published by the Free Software Foundation. + This program is free software; you can redistribute it and/or + modify it under the terms of version 2.1 of the GNU Lesser General + Public License as published by the Free Software Foundation. . - This package is distributed in the hope that it will be useful, + This library 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 Lesser General Public License for more details. . - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see <https://www.gnu.org/licenses/>. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . - On Debian systems, the complete text of the GNU Lesser General - Public License can be found in "/usr/share/common-licenses/LGPL-2.1". - -# Please also look if there are files or directories which have a -# different copyright/license attached and list them here. -# Please avoid picking licenses with terms that are more restrictive than the -# packaged work, as it may make Debian's contributions unacceptable upstream. + On Debian systems, the complete text of the GNU Lesser General Public License + Version 2.1 can be found in `/usr/share/common-licenses/LGPL-2.1'. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/libusbauth-configparser-dev.install new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/libusbauth-configparser-dev.install --- old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/libusbauth-configparser-dev.install 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/libusbauth-configparser-dev.install 2022-12-19 22:15:35.000000000 +0100 @@ -1,4 +1,3 @@ usr/include/* usr/lib/*/lib*.so usr/lib/*/pkgconfig/* -usr/share/man/* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/libusbauth-configparser1.docs new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/libusbauth-configparser1.docs --- old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/libusbauth-configparser1.docs 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/libusbauth-configparser1.docs 2022-12-19 22:15:35.000000000 +0100 @@ -1,2 +1 @@ -COPYING README diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/libusbauth-configparser1.manpages new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/libusbauth-configparser1.manpages --- old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/libusbauth-configparser1.manpages 1970-01-01 01:00:00.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/libusbauth-configparser1.manpages 2022-12-19 22:15:35.000000000 +0100 @@ -0,0 +1 @@ +data/libusbauth-configparser.3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/libusbauth-configparser1.symbols new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/libusbauth-configparser1.symbols --- old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/libusbauth-configparser1.symbols 1970-01-01 01:00:00.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/libusbauth-configparser1.symbols 2022-12-19 22:15:35.000000000 +0100 @@ -0,0 +1,62 @@ +libusbauth-configparser.so.1 libusbauth-configparser1 #MINVER# +* Build-Depends-Package: libudev-dev + allocate_copy_yytext@Base 1.0~git20171209 + gen_auths@Base 1.0~git20171209 + gen_length@Base 1.0~git20171209 + operator_strings@Base 1.0~git20171209 + parameter_strings@Base 1.0~git20171209 + process@Base 1.0~git20171209 + usbauth_allocate_and_copy@Base 1.0~git20171209 + usbauth_auth_to_str@Base 1.0~git20171209 + usbauth_config_free@Base 1.0~git20171209 + usbauth_config_free_auths@Base 1.0~git20171209 + usbauth_config_get_auths@Base 1.0~git20171209 + usbauth_config_read@Base 1.0~git20171209 + usbauth_config_set_auths@Base 1.0~git20171209 + usbauth_config_write@Base 1.0~git20171209 + usbauth_convert_str_to_data@Base 1.0~git20171209 + usbauth_enum_to_str@Base 1.0~git20171209 + usbauth_get_param_val@Base 1.0~git20171209 + usbauth_get_param_valStr@Base 1.0~git20171209 + usbauth_op_to_str@Base 1.0~git20171209 + usbauth_param_to_str@Base 1.0~git20171209 + usbauth_str_to_enum@Base 1.0~git20171209 + usbauth_str_to_op@Base 1.0~git20171209 + usbauth_str_to_param@Base 1.0~git20171209 + usbauth_sub_length@Base 1.0~git20171209 + usbauth_yy_create_buffer@Base 1.0~git20171209 + usbauth_yy_delete_buffer@Base 1.0~git20171209 + usbauth_yy_flex_debug@Base 1.0~git20171209 + usbauth_yy_flush_buffer@Base 1.0~git20171209 + usbauth_yy_scan_buffer@Base 1.0~git20171209 + usbauth_yy_scan_bytes@Base 1.0~git20171209 + usbauth_yy_scan_string@Base 1.0~git20171209 + usbauth_yy_switch_to_buffer@Base 1.0~git20171209 + usbauth_yyalloc@Base 1.0~git20171209 + usbauth_yychar@Base 1.0~git20171209 + usbauth_yyerror@Base 1.0~git20171209 + usbauth_yyfree@Base 1.0~git20171209 + usbauth_yyget_debug@Base 1.0~git20171209 + usbauth_yyget_in@Base 1.0~git20171209 + usbauth_yyget_leng@Base 1.0~git20171209 + usbauth_yyget_lineno@Base 1.0~git20171209 + usbauth_yyget_out@Base 1.0~git20171209 + usbauth_yyget_text@Base 1.0~git20171209 + usbauth_yyin@Base 1.0~git20171209 + usbauth_yyleng@Base 1.0~git20171209 + usbauth_yylex@Base 1.0~git20171209 + usbauth_yylex_destroy@Base 1.0~git20171209 + usbauth_yylineno@Base 1.0~git20171209 + usbauth_yylval@Base 1.0~git20171209 + usbauth_yynerrs@Base 1.0~git20171209 + usbauth_yyout@Base 1.0~git20171209 + usbauth_yyparse@Base 1.0~git20171209 + usbauth_yypop_buffer_state@Base 1.0~git20171209 + usbauth_yypush_buffer_state@Base 1.0~git20171209 + usbauth_yyrealloc@Base 1.0~git20171209 + usbauth_yyrestart@Base 1.0~git20171209 + usbauth_yyset_debug@Base 1.0~git20171209 + usbauth_yyset_in@Base 1.0~git20171209 + usbauth_yyset_lineno@Base 1.0~git20171209 + usbauth_yyset_out@Base 1.0~git20171209 + usbauth_yytext@Base 1.0~git20171209 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/not-installed new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/not-installed --- old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/not-installed 1970-01-01 01:00:00.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/not-installed 2022-12-19 22:15:35.000000000 +0100 @@ -0,0 +1 @@ +usr/share/man/man3/libusbauth-configparser.3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/rules new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/rules --- old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/rules 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/rules 2022-12-19 22:15:35.000000000 +0100 @@ -1,24 +1,10 @@ #!/usr/bin/make -f -# See debhelper(7) (uncomment to enable) -# output every command that modifies files on the build system. -#export DH_VERBOSE = 1 - - -# see FEATURE AREAS in dpkg-buildflags(1) -#export DEB_BUILD_MAINT_OPTIONS = hardening=+all - -# see ENVIRONMENT in dpkg-buildflags(1) -# package maintainers to append CFLAGS -#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic -# package maintainers to append LDFLAGS -#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic %: - dh $@ --with autoreconf - + dh $@ -# dh_make generated override targets -# This is example for Cmake (See https://bugs.debian.org/641051 ) -#override_dh_auto_configure: -# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) +override_dh_missing: + dh_missing --fail-missing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/salsa-ci.yml new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/salsa-ci.yml --- old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/salsa-ci.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/salsa-ci.yml 2022-12-19 22:15:35.000000000 +0100 @@ -0,0 +1,3 @@ +include: + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/source/format new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/source/format --- old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/source/format 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/source/format 2022-12-19 22:15:35.000000000 +0100 @@ -1 +1 @@ -3.0 (native) +3.0 (quilt) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/tests/control new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/tests/control --- old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/tests/control 1970-01-01 01:00:00.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/tests/control 2022-12-19 22:15:35.000000000 +0100 @@ -0,0 +1,2 @@ +Tests: test +Depends: @, libc-bin diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/tests/test new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/tests/test --- old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/tests/test 1970-01-01 01:00:00.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/tests/test 2022-12-19 22:15:35.000000000 +0100 @@ -0,0 +1,15 @@ +#!/bin/dash +# autopkgtest check: Build and run a program against glib, to verify that the +# headers and pkg-config file are installed correctly +# Author: Kun-Hung Tsai (è¡æå®) <moonape1...@gmail.com> + +set -e + +echo "run: Check if library file exist" +if /sbin/ldconfig -p | grep libusbauth-configparser +then + echo "run: Found libary" +else + echo "run: Fail" + exit 1 +fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/upstream/metadata new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/upstream/metadata --- old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/upstream/metadata 1970-01-01 01:00:00.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/upstream/metadata 2022-12-19 22:15:35.000000000 +0100 @@ -0,0 +1,5 @@ +Bug-Database: https://github.com/kochstefan/usbauth-all/issues +Bug-Submit: https://github.com/kochstefan/usbauth-all/issues/new +Name: libusbauth-configparser +Repository: https://github.com/kochstefan/usbauth-all.git +Repository-Browse: https://github.com/kochstefan/usbauth-all diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/watch new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/watch --- old/usbauth-all-1.0.3/packages/libusbauth-configparser/debian/watch 1970-01-01 01:00:00.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/libusbauth-configparser/debian/watch 2022-12-19 22:15:35.000000000 +0100 @@ -0,0 +1,5 @@ +version=4 + +opts=\ + "filenamemangle=s/(?:.*)?v?(\d[\d\.]*)\.tar\.gz/usbauth-all-$1.tar.gz/" \ + https://github.com/kochstefan/usbauth-all/releases (?:.*/)?v?(\d[\d\.]*)\.tar\.gz diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/usbauth/debian/changelog new/usbauth-all-1.0.5/packages/usbauth/debian/changelog --- old/usbauth-all-1.0.3/packages/usbauth/debian/changelog 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/usbauth/debian/changelog 2022-12-19 22:15:35.000000000 +0100 @@ -1,12 +1,115 @@ -usbauth (1.0.1) unstable; urgency=medium +usbauth (1.0.3-1) unstable; urgency=medium - * Fix string comparing - * Support string quoting + * Import new upstream release + * d/control: + - Bump Standards-Version to 4.5.1 - -- Stefan Koch <stefan.koc...@gmail.com> Tue, 22 Jan 2019 23:00:00 +0200 + -- SZ Lin (æä¸æº) <sz...@debian.org> Fri, 08 Jan 2021 15:46:15 +0800 -usbauth (1.0) unstable; urgency=medium +usbauth (1.0.2-3) UNRELEASED; urgency=medium - * Initial Release. + [Alvin Chenw] + * d/tests/: + - Add condition check to check if systemd are used. - -- Stefan Koch <stefan.koc...@gmail.com> Wed, 17 Jan 2018 23:50:00 +0200 + -- Alvin Chen <sonoma...@gmail.com> Sun, 19 Jul 2020 23:15:12 -0400 + +usbauth (1.0.2-2) unstable; urgency=medium + + [ Alvin Chen ] + * d/control: + - Bump debhelper-compat version to 13 + - Bump Standards-Version to 4.5.0 + * d/rules: + - Fix Lintian error + remove -wl,--as-needed since the flag is set by default now. + * d/tests/: + - Add condition check to start/stop dbus only if it is not started. + (Closes: #960564) + * d/salsa-ci.yml: + - add salsa-ci script + + -- SZ Lin (æä¸æº) <sz...@debian.org> Tue, 02 Jun 2020 10:56:42 +0800 + +usbauth (1.0.2-1) unstable; urgency=low + + [ Kun-Hung Tsai (è¡æå®) ] + * Import new upstream release + * d/control: + - Bump Standards-Version to 4.4.1 + - Set Rules-Requires-Root: no + * d/tests/: + - Enable dbus service to solve error + + * d/t/control: + - Add allow-stderr attribute + + -- SZ Lin (æä¸æº) <sz...@debian.org> Wed, 11 Dec 2019 10:18:38 +0800 + +usbauth (1.0.1+git20190123.5004f7d-3) unstable; urgency=low + + [ Kun-Hung Tsai (è¡æå®) ] + * d/tests/control: Add root restriction for debian test + + -- Kun-Hung Tsai (è¡æå®) <moonape1...@gmail.com> Tue, 30 Apr 2019 22:48:27 +0800 + +usbauth (1.0.1+git20190123.5004f7d-2) unstable; urgency=low + + [ Kun-Hung Tsai (è¡æå®) ] + * d/test: Update debian test script + * d/watch: Update watch file to fix lintian warning + + [ SZ Lin (æä¸æº) ] + * d/control: + - Update package maintainer + + -- SZ Lin (æä¸æº) <sz...@debian.org> Fri, 26 Apr 2019 09:48:27 +0800 + +usbauth (1.0.1+git20190123.5004f7d-1) unstable; urgency=medium + + [ Kun-Hung Tsai (è¡æå®) ] + * Import new upstream release + * d/upstream: Add upstream metadata + * d/control: Bump debhelper version to 12 + * d/control: Bump standard version to 4.3.0 + * d/compat: Bump compat version to 12 + * d/test: Add test files + * d/.git-dpm: Remove unused .git-dpm + + [ SZ Lin (æä¸æº) ] + * d/copyright: + - Update copyright information + + -- SZ Lin (æä¸æº) <sz...@debian.org> Tue, 12 Feb 2019 23:36:56 +0800 + +usbauth (1.0~git20180214-1) unstable; urgency=medium + + * Import new upstream release + + -- SZ Lin (æä¸æº) <sz...@debian.org> Mon, 26 Feb 2018 22:04:49 +0800 + +usbauth (1.0~git20180119-1) unstable; urgency=medium + + * Import new upstream release (Closes: #880983) + * Move the d/post* scripts to usbauth-notifier + * Move VCS to salsa + + -- SZ Lin (æä¸æº) <sz...@debian.org> Thu, 22 Feb 2018 11:42:52 +0800 + +usbauth (1.0~git20180118-1) UNRELEASED; urgency=medium + + * Import new upstream release + * d/control: Bump standard version to 4.1.3 + * d/copyright: Update copyright + + -- SZ Lin (æä¸æº) <sz...@debian.org> Sun, 21 Jan 2018 22:22:51 +0800 + +usbauth (1.0~git20171209-1) unstable; urgency=medium + + [ Stefan Koch ] + * Initial Release + + [ SZ Lin (æä¸æº) ] + * Tidy debian/* files + + -- SZ Lin (æä¸æº) <sz...@debian.org> Wed, 13 Dec 2017 13:36:02 +0800 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/usbauth/debian/control new/usbauth-all-1.0.5/packages/usbauth/debian/control --- old/usbauth-all-1.0.3/packages/usbauth/debian/control 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/usbauth/debian/control 2022-12-19 22:15:35.000000000 +0100 @@ -1,14 +1,28 @@ Source: usbauth -Section: unknown +Section: utils Priority: optional -Maintainer: Stefan Koch <stefan.koc...@gmail.com> -Build-Depends: debhelper (>= 9) -Standards-Version: 3.9.8 -Homepage: https://github.com/kochstefan/usbauth-all -#Vcs-Git: https://github.com/kochstefan/usbauth-all.git -#Vcs-Browser: https://github.com/kochstefan/usbauth-all/usbauth +Maintainer: Kun-Hung Tsai (è¡æå®) <moonape1...@gmail.com> +Uploaders: SZ Lin (æä¸æº) <sz...@debian.org> +Build-Depends: debhelper-compat (= 13), + pkg-config, + automake, + flex, + bison, + libudev-dev, + libusbauth-configparser-dev, + libdbus-1-dev, + m4 +Standards-Version: 4.5.1 +Homepage: https://github.com/kochstefan/usbauth-all/tree/master/usbauth +Vcs-Git: https://salsa.debian.org/debian/usbauth.git +Vcs-Browser: https://salsa.debian.org/debian/usbauth +Rules-Requires-Root: no Package: usbauth -Architecture: any +Architecture: linux-any Depends: ${shlibs:Depends}, ${misc:Depends} Description: USB firewall against BadUSB attacks + It is a firewall against BadUSB attacks. A config file describes in which way + USB interfaces would be accepted or denied. To the kernel an interface + authorization was developed with this firewall. The firewall sets the + authorization mask according to the rules. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/usbauth/debian/copyright new/usbauth-all-1.0.5/packages/usbauth/debian/copyright --- old/usbauth-all-1.0.3/packages/usbauth/debian/copyright 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/usbauth/debian/copyright 2022-12-19 22:15:35.000000000 +0100 @@ -1,17 +1,19 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: usbauth -Source: <https://github.com/kochstefan/usbauth-all.git> +Source: https://github.com/kochstefan/usbauth-all.git Files: * Copyright: 2015 SUSE LLC. Author: Stefan Koch <sk...@suse.de> 2017 Stefan Koch <stefan.koc...@gmail.com> -License: GPL-2.0 +License: GPL-2 Files: debian/* -Copyright: 2017 Stefan Koch <stefan.koc...@gmail.com> -License: GPL-2.0 +Copyright: 2017-2018 Stefan Koch <stefan.koc...@gmail.com> + 2017-2019 SZ Lin (æä¸æº) <sz...@debian.org> + 2019 Kun-Hung Tsai (è¡æå®) <moonape1...@gmail.com> +License: GPL-2 -License: GPL-2.0 +License: GPL-2 This package is free software; you can redistribute it and/or modify it under the terms version 2 of the GNU General Public License as published by the Free Software Foundation. @@ -22,12 +24,7 @@ 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 <https://www.gnu.org/licenses/> + along with this program. If not, see <http://www.gnu.org/licenses/>. . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". - -# Please also look if there are files or directories which have a -# different copyright/license attached and list them here. -# Please avoid picking licenses with terms that are more restrictive than the -# packaged work, as it may make Debian's contributions unacceptable upstream. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/usbauth/debian/docs new/usbauth-all-1.0.5/packages/usbauth/debian/docs --- old/usbauth-all-1.0.3/packages/usbauth/debian/docs 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/usbauth/debian/docs 2022-12-19 22:15:35.000000000 +0100 @@ -1,2 +1 @@ -COPYING README diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/usbauth/debian/rules new/usbauth-all-1.0.5/packages/usbauth/debian/rules --- old/usbauth-all-1.0.3/packages/usbauth/debian/rules 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/usbauth/debian/rules 2022-12-19 22:15:35.000000000 +0100 @@ -1,24 +1,10 @@ #!/usr/bin/make -f -# See debhelper(7) (uncomment to enable) -# output every command that modifies files on the build system. -#export DH_VERBOSE = 1 - - -# see FEATURE AREAS in dpkg-buildflags(1) -#export DEB_BUILD_MAINT_OPTIONS = hardening=+all - -# see ENVIRONMENT in dpkg-buildflags(1) -# package maintainers to append CFLAGS -#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic -# package maintainers to append LDFLAGS -#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic %: - dh $@ --with autoreconf - + dh $@ -# dh_make generated override targets -# This is example for Cmake (See https://bugs.debian.org/641051 ) -#override_dh_auto_configure: -# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) +override_dh_missing: + dh_missing --fail-missing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/usbauth/debian/salsa-ci.yml new/usbauth-all-1.0.5/packages/usbauth/debian/salsa-ci.yml --- old/usbauth-all-1.0.3/packages/usbauth/debian/salsa-ci.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/usbauth/debian/salsa-ci.yml 2022-12-19 22:15:35.000000000 +0100 @@ -0,0 +1,3 @@ +include: + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/usbauth/debian/source/format new/usbauth-all-1.0.5/packages/usbauth/debian/source/format --- old/usbauth-all-1.0.3/packages/usbauth/debian/source/format 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/usbauth/debian/source/format 2022-12-19 22:15:35.000000000 +0100 @@ -1 +1 @@ -3.0 (native) +3.0 (quilt) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/usbauth/debian/tests/control new/usbauth-all-1.0.5/packages/usbauth/debian/tests/control --- old/usbauth-all-1.0.3/packages/usbauth/debian/tests/control 1970-01-01 01:00:00.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/usbauth/debian/tests/control 2022-12-19 22:15:35.000000000 +0100 @@ -0,0 +1,3 @@ +Tests: test +Depends: @, libc-bin, usbauth-notifier, dbus +Restrictions: needs-root, allow-stderr diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/usbauth/debian/tests/test new/usbauth-all-1.0.5/packages/usbauth/debian/tests/test --- old/usbauth-all-1.0.3/packages/usbauth/debian/tests/test 1970-01-01 01:00:00.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/usbauth/debian/tests/test 2022-12-19 22:15:35.000000000 +0100 @@ -0,0 +1,29 @@ +#!/bin/dash +# autopkgtest check: Build and run a program against glib, to verify that the +# headers and pkg-config file are installed correctly +# Author: Kun-Hung Tsai (è¡æå®) <moonape1...@gmail.com> + +set -e +echo "run: Test" +dbus_manual_start=0 +if ! test -x "/var/run/dbus/system_bus_socket"; then + if [ -d /run/systemd/system ] && \ + which systemctl >/dev/null 2>&1; then + systemctl start dbus.socket + else + service dbus start + fi + dbus_manual_start=1 +fi +echo "allow all" | tee /etc/usbauth.conf +usbauth init +if test ${dbus_manual_start} = 1; then + if [ -d /run/systemd/system ] && \ + which systemctl >/dev/null 2>&1; then + systemctl stop dbus.socket + else + service dbus stop + fi +fi +echo "run: Successful" +exit 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/usbauth/debian/upstream/metadata new/usbauth-all-1.0.5/packages/usbauth/debian/upstream/metadata --- old/usbauth-all-1.0.3/packages/usbauth/debian/upstream/metadata 1970-01-01 01:00:00.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/usbauth/debian/upstream/metadata 2022-12-19 22:15:35.000000000 +0100 @@ -0,0 +1,5 @@ +Bug-Database: https://github.com/kochstefan/usbauth-all/issues +Bug-Submit: https://github.com/kochstefan/usbauth-all/issues/new +Name: usbauth +Repository: https://github.com/kochstefan/usbauth-all.git +Repository-Browse: https://github.com/kochstefan/usbauth-all diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/usbauth/debian/usbauth.manpages new/usbauth-all-1.0.5/packages/usbauth/debian/usbauth.manpages --- old/usbauth-all-1.0.3/packages/usbauth/debian/usbauth.manpages 1970-01-01 01:00:00.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/usbauth/debian/usbauth.manpages 2022-12-19 22:15:35.000000000 +0100 @@ -0,0 +1 @@ +data/usbauth.8 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/usbauth/debian/watch new/usbauth-all-1.0.5/packages/usbauth/debian/watch --- old/usbauth-all-1.0.3/packages/usbauth/debian/watch 1970-01-01 01:00:00.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/usbauth/debian/watch 2022-12-19 22:15:35.000000000 +0100 @@ -0,0 +1,5 @@ +version=4 + +opts=\ + "filenamemangle=s/(?:.*)?v?(\d[\d\.]*)\.tar\.gz/usbauth-all-$1.tar.gz/" \ + https://github.com/kochstefan/usbauth-all/releases (?:.*/)?v?(\d[\d\.]*)\.tar\.gz diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/usbauth-notifier/debian/changelog new/usbauth-all-1.0.5/packages/usbauth-notifier/debian/changelog --- old/usbauth-all-1.0.3/packages/usbauth-notifier/debian/changelog 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/usbauth-notifier/debian/changelog 2022-12-19 22:15:35.000000000 +0100 @@ -1,5 +1,100 @@ -usbauth-notifier (1.0) unstable; urgency=medium +usbauth-notifier (1.0.3-1) unstable; urgency=medium - * Initial Release. + * Import new upstream release + * Remove unsuitable test case + * d/control: + - Bump Standards-Version to 4.5.1 + - Bump debhelper-compat to 13 + - Set Rules-Requires-Root: no + * d/docs: + - Remove non-existing files + * d/postinst: + - Sync up with the upstream's path + * d/rules: + - Remove unneeded linker flag - -- Stefan Koch <stefan.koc...@gmail.com> Wed, 17 Jan 2018 23:50:00 +0200 + -- SZ Lin (æä¸æº) <sz...@debian.org> Fri, 08 Jan 2021 16:48:22 +0800 + +usbauth-notifier (1.0.1+git20190124.b308d5b-3) unstable; urgency=medium + + [ Kun-Hung Tsai (è¡æå®) ] + * d/test: Fix debian test script sudo error + + [ SZ Lin (æä¸æº) ] + * d/control: + - Bump Standards-Version to 4.4.0 + + -- SZ Lin (æä¸æº) <sz...@debian.org> Tue, 06 Aug 2019 14:29:57 +0800 + +usbauth-notifier (1.0.1+git20190124.b308d5b-2) unstable; urgency=low + + [ Kun-Hung Tsai (è¡æå®) ] + * d/test: Update debian test script + * d/watch: Update watch file to fix lintian warning + + [ SZ Lin (æä¸æº) ] + * d/control: + - Update package maintainer + + -- SZ Lin (æä¸æº) <sz...@debian.org> Fri, 26 Apr 2019 09:56:31 +0800 + +usbauth-notifier (1.0.1+git20190124.b308d5b-1) unstable; urgency=medium + + [ Kun-Hung Tsai (è¡æå®) ] + * Import new upstream release + * d/upstream: Add upstream metadata + * d/control: Bump debhelper version to 12 + * d/control: Bump standard version to 4.3.0 + * d/compat: Bump compat version to 12 + * d/test: Add test files + * d/.git-dpm: Remove unused .git-dpm + + [ SZ Lin (æä¸æº) ] + * d/copyright: + - Update copyright info. + + -- SZ Lin (æä¸æº) <sz...@debian.org> Tue, 12 Feb 2019 23:45:59 +0800 + +usbauth-notifier (1.0~git20180226-1) unstable; urgency=medium + + * Import new upstream release + * Remove d/install by using XDG autostart + + -- SZ Lin (æä¸æº) <sz...@debian.org> Mon, 26 Feb 2018 22:24:10 +0800 + +usbauth-notifier (1.0~git20180119-2) unstable; urgency=medium + + * d/control: Fix missing build dependency (Closes: #891110) + * Add debconf in pre-depends + * Add debconf library in pre* post* scripts (Closes: #891159) + * d/rules: Remove all *.gmo files + + -- SZ Lin (æä¸æº) <sz...@debian.org> Sat, 24 Feb 2018 11:38:26 +0800 + +usbauth-notifier (1.0~git20180119-1) unstable; urgency=medium + + * Import new upstream release (Closes: #879716, #880983) + * Add d/manpages + * Change postrm & preinst permission to 755 + + -- SZ Lin (æä¸æº) <sz...@debian.org> Thu, 22 Feb 2018 16:27:53 +0800 + +usbauth-notifier (1.0~git20180118-1) UNRELEASED; urgency=medium + + * Import new upstream release + * d/control: Bump standard version to 4.1.3 + * d/copyright: Update copyright + * Add postrm/ preinst + * Modify postinst + + -- SZ Lin (æä¸æº) <sz...@debian.org> Fri, 19 Jan 2018 10:30:32 +0800 + +usbauth-notifier (1.0~git20171209-1) unstable; urgency=medium + + [ Stefan Koch ] + * Initial Release + + [ SZ Lin (æä¸æº) ] + * Tidy debian/* files + + -- SZ Lin (æä¸æº) <sz...@debian.org> Thu, 21 Dec 2017 16:56:34 +0800 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/usbauth-notifier/debian/control new/usbauth-all-1.0.5/packages/usbauth-notifier/debian/control --- old/usbauth-all-1.0.3/packages/usbauth-notifier/debian/control 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/usbauth-notifier/debian/control 2022-12-19 22:15:35.000000000 +0100 @@ -1,14 +1,26 @@ Source: usbauth-notifier -Section: unknown +Section: utils Priority: optional -Maintainer: Stefan Koch <stefan.koc...@gmail.com> -Build-Depends: debhelper (>= 9) -Standards-Version: 3.9.8 -Homepage: https://github.com/kochstefan/usbauth-all -#Vcs-Git: https://github.com/kochstefan/usbauth-all.git -#Vcs-Browser: https://github.com/kochstefan/usbauth-all/usbauth-notifier +Maintainer: Kun-Hung Tsai (è¡æå®) <moonape1...@gmail.com> +Uploaders: SZ Lin (æä¸æº) <sz...@debian.org> +Build-Depends: debhelper-compat (= 13), + libnotify-dev, + libusbauth-configparser-dev, + libudev-dev, + libdbus-1-dev, + pkg-config, + po-debconf +Standards-Version: 4.5.1 +Homepage: https://github.com/kochstefan/usbauth-all/tree/master/usbauth-notifier +Vcs-Git: https://salsa.debian.org/debian/usbauth-notifier.git +Vcs-Browser: https://salsa.debian.org/debian/usbauth-notifier +Rules-Requires-Root: no Package: usbauth-notifier -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} +Architecture: linux-any +Pre-Depends: debconf +Depends: ${shlibs:Depends}, ${misc:Depends}, usbauth Description: Notifier for USB Firewall to use with desktop environments + A notifier for the usbauth firewall against BadUSB attacks. The user could + manually allow or deny USB devices. Every user that wants use the notifier must + be added to the usbauth group. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/usbauth-notifier/debian/copyright new/usbauth-all-1.0.5/packages/usbauth-notifier/debian/copyright --- old/usbauth-all-1.0.3/packages/usbauth-notifier/debian/copyright 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/usbauth-notifier/debian/copyright 2022-12-19 22:15:35.000000000 +0100 @@ -1,17 +1,19 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: usbauth-notifier -Source: <https://github.com/kochstefan/usbauth-all.git> +Source: https://github.com/kochstefan/usbauth-all.git Files: * Copyright: 2015 SUSE LLC. Author: Stefan Koch <sk...@suse.de> 2017 Stefan Koch <stefan.koc...@gmail.com> -License: GPL-2.0 +License: GPL-2 Files: debian/* -Copyright: 2017 Stefan Koch <stefan.koc...@gmail.com> -License: GPL-2.0 +Copyright: 2017-2018 Stefan Koch <stefan.koc...@gmail.com> + 2017-2019 SZ Lin (æä¸æº) <sz...@debian.org> + 2019 Kun-Hung Tsai (è¡æå®) <moonape1...@gmail.com> +License: GPL-2 -License: GPL-2.0 +License: GPL-2 This package is free software; you can redistribute it and/or modify it under the terms version 2 of the GNU General Public License as published by the Free Software Foundation. @@ -22,12 +24,7 @@ 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 <https://www.gnu.org/licenses/> + along with this program. If not, see <http://www.gnu.org/licenses/>. . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". - -# Please also look if there are files or directories which have a -# different copyright/license attached and list them here. -# Please avoid picking licenses with terms that are more restrictive than the -# packaged work, as it may make Debian's contributions unacceptable upstream. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/usbauth-notifier/debian/docs new/usbauth-all-1.0.5/packages/usbauth-notifier/debian/docs --- old/usbauth-all-1.0.3/packages/usbauth-notifier/debian/docs 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/usbauth-notifier/debian/docs 2022-12-19 22:15:35.000000000 +0100 @@ -1,2 +1 @@ -COPYING README diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/usbauth-notifier/debian/postinst new/usbauth-all-1.0.5/packages/usbauth-notifier/debian/postinst --- old/usbauth-all-1.0.3/packages/usbauth-notifier/debian/postinst 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/usbauth-notifier/debian/postinst 2022-12-19 22:15:35.000000000 +0100 @@ -1,6 +1,12 @@ #!/bin/sh -NPRIV_PATH=/usr/bin/usbauth-npriv -NOTIFIER_DIR=/usr/lib/usbauth-notifier + +set -e + +# source debconf library +. /usr/share/debconf/confmodule + +NPRIV_PATH=/usr/libexec/usbauth-npriv +NOTIFIER_DIR=/usr/libexec/usbauth-notifier NOTIFIER_PATH=$NOTIFIER_DIR/usbauth-notifier chown root:usbauth $NPRIV_PATH @@ -10,3 +16,9 @@ chmod 00750 $NOTIFIER_DIR chown root:usbauth $NOTIFIER_PATH chmod 02755 $NOTIFIER_PATH + +#DEBHELPER# + +db_stop + +exit 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/usbauth-notifier/debian/postrm new/usbauth-all-1.0.5/packages/usbauth-notifier/debian/postrm --- old/usbauth-all-1.0.3/packages/usbauth-notifier/debian/postrm 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/usbauth-notifier/debian/postrm 2022-12-19 22:15:35.000000000 +0100 @@ -1,6 +1,18 @@ #!/bin/sh +set -e + +# source debconf library +. /usr/share/debconf/confmodule + if [ "$1" = "purge" ]; then delgroup --system --quiet usbauth || true delgroup --system --quiet usbauth-notifier || true + db_purge fi + +#DEBHELPER# + +db_stop + +exit 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/usbauth-notifier/debian/preinst new/usbauth-all-1.0.5/packages/usbauth-notifier/debian/preinst --- old/usbauth-all-1.0.3/packages/usbauth-notifier/debian/preinst 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/usbauth-notifier/debian/preinst 2022-12-19 22:15:35.000000000 +0100 @@ -1,5 +1,10 @@ #!/bin/sh +set -e + +# source debconf library +. /usr/share/debconf/confmodule + if ! getent group usbauth>/dev/null; then addgroup --system --quiet usbauth || true fi @@ -7,3 +12,9 @@ if ! getent group usbauth-notifier>/dev/null; then addgroup --system --quiet usbauth-notifier || true fi + +#DEBHELPER# + +db_stop + +exit 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/usbauth-notifier/debian/rules new/usbauth-all-1.0.5/packages/usbauth-notifier/debian/rules --- old/usbauth-all-1.0.3/packages/usbauth-notifier/debian/rules 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/usbauth-notifier/debian/rules 2022-12-19 22:15:35.000000000 +0100 @@ -1,24 +1,19 @@ #!/usr/bin/make -f -# See debhelper(7) (uncomment to enable) -# output every command that modifies files on the build system. -#export DH_VERBOSE = 1 - - -# see FEATURE AREAS in dpkg-buildflags(1) -#export DEB_BUILD_MAINT_OPTIONS = hardening=+all - -# see ENVIRONMENT in dpkg-buildflags(1) -# package maintainers to append CFLAGS -#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic -# package maintainers to append LDFLAGS -#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic %: - dh $@ --with autoreconf + dh $@ +override_dh_missing: + dh_missing --fail-missing -# dh_make generated override targets -# This is example for Cmake (See https://bugs.debian.org/641051 ) -#override_dh_auto_configure: -# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) +override_dh_fixperms: + dh_fixperms + find debian -name '*90usbauth-notifier' -exec chmod 0644 {} + + +override_dh_clean: + dh_clean + find -name "stamp-po" | xargs rm -rf + find -name "*.gmo" | xargs rm -rf diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/usbauth-notifier/debian/source/format new/usbauth-all-1.0.5/packages/usbauth-notifier/debian/source/format --- old/usbauth-all-1.0.3/packages/usbauth-notifier/debian/source/format 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/usbauth-notifier/debian/source/format 2022-12-19 22:15:35.000000000 +0100 @@ -1 +1 @@ -3.0 (native) +3.0 (quilt) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/usbauth-notifier/debian/upstream/metadata new/usbauth-all-1.0.5/packages/usbauth-notifier/debian/upstream/metadata --- old/usbauth-all-1.0.3/packages/usbauth-notifier/debian/upstream/metadata 1970-01-01 01:00:00.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/usbauth-notifier/debian/upstream/metadata 2022-12-19 22:15:35.000000000 +0100 @@ -0,0 +1,6 @@ +Bug-Database: https://github.com/kochstefan/usbauth-all/issues +Bug-Submit: https://github.com/kochstefan/usbauth-all/issues/new +Name: usbauth-notifier +Repository: https://github.com/kochstefan/usbauth-all.git +Repository-Browse: https://github.com/kochstefan/usbauth-all + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/usbauth-notifier/debian/usbauth-notifier-docs.docs new/usbauth-all-1.0.5/packages/usbauth-notifier/debian/usbauth-notifier-docs.docs --- old/usbauth-all-1.0.3/packages/usbauth-notifier/debian/usbauth-notifier-docs.docs 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/usbauth-notifier/debian/usbauth-notifier-docs.docs 2022-12-19 22:15:35.000000000 +0100 @@ -1,3 +1 @@ -README.Debian -README.source README diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/usbauth-notifier/debian/usbauth-notifier.manpages new/usbauth-all-1.0.5/packages/usbauth-notifier/debian/usbauth-notifier.manpages --- old/usbauth-all-1.0.3/packages/usbauth-notifier/debian/usbauth-notifier.manpages 1970-01-01 01:00:00.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/usbauth-notifier/debian/usbauth-notifier.manpages 2022-12-19 22:15:35.000000000 +0100 @@ -0,0 +1,2 @@ +data/usbauth-npriv.1 +data/usbauth-notifier.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/packages/usbauth-notifier/debian/watch new/usbauth-all-1.0.5/packages/usbauth-notifier/debian/watch --- old/usbauth-all-1.0.3/packages/usbauth-notifier/debian/watch 1970-01-01 01:00:00.000000000 +0100 +++ new/usbauth-all-1.0.5/packages/usbauth-notifier/debian/watch 2022-12-19 22:15:35.000000000 +0100 @@ -0,0 +1,5 @@ +version=4 + +opts=\ + "filenamemangle=s/(?:.*)?v?(\d[\d\.]*)\.tar\.gz/usbauth-all-$1.tar.gz/" \ + https://github.com/kochstefan/usbauth-all/releases (?:.*/)?v?(\d[\d\.]*)\.tar\.gz diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/usbauth/CHANGELOG.md new/usbauth-all-1.0.5/usbauth/CHANGELOG.md --- old/usbauth-all-1.0.3/usbauth/CHANGELOG.md 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/usbauth/CHANGELOG.md 2022-12-19 22:15:35.000000000 +0100 @@ -1,3 +1,8 @@ +usbauth 1.0.5 (2020-12-19) + * Support devpath comparisation + * Support explicit value type comparisation + * Add default value types + usbauth 1.0.3 (2020-12-09) * Improve logging of dbus errors diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/usbauth/README new/usbauth-all-1.0.5/usbauth/README --- old/usbauth-all-1.0.3/usbauth/README 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/usbauth/README 2022-12-19 22:15:35.000000000 +0100 @@ -95,10 +95,13 @@ Values ---------- -Values are strings in the data strucures of the firewall. -At first a numeric compare is attempt. If failed a string comparement will used. -When using double quotes it is possible to specify strings containing spaces. - +The configured value will be compared with the default value type from sysfs. +If not specified the type of the configured value is assumed to be in sysfs value type. +Using \x as value prefix will set the configured value type as hexadecimal. +Using \d as value prefix will set the configured value type as decimal. +With an explicit integer value a type conversion will be done if the value type does not match the sysfs value type. +Using double quotes for the configured value foces a string comparisation. It allows to specify strings containing spaces, too. +Point separated integer values like 1.2.3 (e.g. for devpath) are possible, they allow also explicit type prefixing like \x1.2.3 Exampels ---------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/usbauth/data/usbauth.8 new/usbauth-all-1.0.5/usbauth/data/usbauth.8 --- old/usbauth-all-1.0.3/usbauth/data/usbauth.8 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/usbauth/data/usbauth.8 2022-12-19 22:15:35.000000000 +0100 @@ -185,11 +185,19 @@ .SH Values .br -Values are strings in the data strucures of the firewall. +The configured value will be compared with the default value type from sysfs. .br -At first a numeric compare is attempt. If failed a string comparement will used. +If not specified the type of the configured value is assumed to be in sysfs value type. .br -When using double quotes it is possible to specify strings containing spaces. +Using \\x as value prefix will set the configured value type as hexadecimal. +.br +Using \\d as value prefix will set the configured value type as decimal. +.br +With an explicit integer value a type conversion will be done if the value type does not match the sysfs value type. +.br +Using double quotes for the configured value foces a string comparisation. It allows to specify strings containing spaces, too. +.br +Point separated integer values like 1.2.3 (e.g. for devpath) are possible, they allow also explicit type prefixing like \\x1.2.3 .LP diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/usbauth/src/usbauth.c new/usbauth-all-1.0.5/usbauth/src/usbauth.c --- old/usbauth-all-1.0.3/usbauth/src/usbauth.c 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/usbauth/src/usbauth.c 2022-12-19 22:15:35.000000000 +0100 @@ -52,9 +52,9 @@ ret = true; else if (op == neq && cmp != 0) ret = true; - else if (op == lt && cmp <= 0) + else if (op == le && cmp <= 0) ret = true; - else if (op == gt && cmp >= 0) + else if (op == ge && cmp >= 0) ret = true; else if (op == l && cmp < 0) ret = true; @@ -74,9 +74,9 @@ ret = true; else if (op == neq && lval != rval) ret = true; - else if (op == lt && lval <= rval) + else if (op == le && lval <= rval) ret = true; - else if (op == gt && lval >= rval) + else if (op == ge && lval >= rval) ret = true; else if (op == l && lval < rval) ret = true; @@ -86,36 +86,137 @@ return ret; } -bool match_vals(const char *lvalStr, enum Operator op, const char *rvalStr) { +bool match_vals_devpath(const char *lvalStr, enum Operator op, const char *rvalStr, enum Valuetype lvalType, enum Valuetype rvalType) { bool ret = false; + int comp = 0; + + int lvalLen = strlen(lvalStr); + int rvalLen = strlen(rvalStr); + char *lval = calloc(lvalLen, sizeof(char)); + char *rval = calloc(rvalLen, sizeof(char)); + + if(lval && rval) { + char *lStr = NULL; + char *rStr = NULL; + char *lvalAllocPtr = lval; + char *rvalAllocPtr = rval; + strcpy(lval, lvalStr); + strcpy(rval, rvalStr); + + // compare devnum like a software version number using sub version (e. g. major, minor, patch version) + while ((lStr = strsep(&lval, ".")) && (rStr = strsep(&rval, "."))) + { + if (match_vals(lStr, g, rStr, lvalType, rvalType)) { + comp = 1; + break; + } else if (match_vals(lStr, l, rStr, lvalType, rvalType)) { + comp = -1; + break; + } + } + + // compare result -1, 0, 1 with given operator + ret = match_valsInt(comp, op, 0); + + free(lvalAllocPtr); + free(rvalAllocPtr); + } + + return ret; +} + +bool match_vals_devpath_autotype(const char *lvalStr, enum Operator op, const char *rvalStr, enum Valuetype lvalType) { + return match_vals_devpath(lvalStr, op, rvalStr, lvalType, UNKNOWN); +} + +bool match_vals(const char *lvalStr, enum Operator op, const char *rvalStr, enum Valuetype lvalType, enum Valuetype rvalType) { + bool ret = false; + bool useDevpathMatching = false; char* lend = NULL; char* rend = NULL; - int lval = strtol(lvalStr, &lend, 16); - int rval = strtol(rvalStr, &rend, 16); - - if (lend && *lend != 0) - lval = -1; + char* tmpStr = NULL; + int lbase = 16; + int rbase = 16; + int lval = -1; + int rval = -1; + int rvalLen = strlen(rvalStr); + + if (rvalType == UNKNOWN) { + if (rvalLen >= 2 && rvalStr[0] == '"' && rvalStr[rvalLen-1] == '"') { // right value type is STRING + rvalType = STRING; + rvalLen -= 2; + + tmpStr = calloc(rvalLen + 1, sizeof(char)); + strncpy(tmpStr, rvalStr + 2, rvalLen); + tmpStr[rvalLen] = '\0'; + rvalStr = tmpStr; + } else if (rvalLen >= 2 && rvalStr[0] == '\\') { // right value type is HEX, DEC or UNKNOWN + if (rvalStr[1] == 'x') { + rvalType = HEX; + rbase = 16; + } else if (rvalStr[1] == 'd') { + rvalType = DEC; + rbase = 10; + } + + if (rvalType != UNKNOWN) { // right value type is HEX or DEC + rvalLen -= 2; + tmpStr = calloc(rvalLen + 1, sizeof(char)); + strncpy(tmpStr, rvalStr + 2, rvalLen); + tmpStr[rvalLen] = '\0'; + rvalStr = tmpStr; + } + } + } - if (rend && *rend != 0) - rval = -1; + // use (determined) rbase for lbase as default + // will be overwritten if proper lbase is given + lbase = rbase; + + if (lvalType == HEX) + lbase = 16; + else if (lvalType == DEC) + lbase = 10; + + if (rvalType != STRING) { + if (strchr(rvalStr, '.')) // right value type contains '.' + useDevpathMatching = true; + else { // right value type is HEX, DEC or UNKNOWN + lval = strtol(lvalStr, &lend, lbase); + rval = strtol(rvalStr, &rend, rbase); + + if (lend && *lend != 0) + lval = -1; + + if (rend && *rend != 0) + rval = -1; + } + } - if (lval != -1 && rval != -1) + if (useDevpathMatching) // use devpath match mode for right value type + ret = match_vals_devpath(lvalStr, op, rvalStr, lvalType, rvalType); + else if (lval != -1 && rval != -1) // integer match of right value type ret = match_valsInt(lval, op, rval); - else + else if (rvalType == STRING || rvalType == UNKNOWN) // string match of right value type ret = match_valsStr(lvalStr, op, rvalStr); if (debuglog) syslog(LOG_DEBUG, "match_vals:%i (%s %s %s), (%i %s %i)\n", ret, lvalStr, usbauth_op_to_str(op), rvalStr, lval, usbauth_op_to_str(op), rval); + if (tmpStr) + free(tmpStr); + return ret; } +bool match_vals_autotype(const char *lvalStr, enum Operator op, const char *rvalStr, enum Valuetype lvalType) { + return match_vals(lvalStr, op, rvalStr, lvalType, UNKNOWN); +} + bool match_vals_interface(struct Auth *rule, struct Data *d, struct udev_device *interface) { bool ret = false; - char* tmpStr = NULL; const char* lvalStr = NULL; const char* rvalStr = d->val; - int rvalLen = 0; const char* type = udev_device_get_devtype(interface); char cntStr[16]; strcpy(cntStr, ""); @@ -123,16 +224,6 @@ if (!type || !rvalStr || strcmp(type, "usb_interface") != 0) return false; - rvalLen = strlen(rvalStr); - if (rvalLen >= 2 && rvalStr[0] == '"' && rvalStr[rvalLen-1] == '"') - { - rvalLen -= 2; - tmpStr = calloc(rvalLen + 1, sizeof(char)); - strncpy(tmpStr, rvalStr + 1, rvalLen); - tmpStr[rvalLen] = '\0'; - rvalStr = tmpStr; - } - if (intfcount == d->param) { // intfcount parameter is not in sysfs char* rend = NULL; int rval = strtol(rvalStr, &rend, 16); @@ -149,13 +240,11 @@ ret = match_valsInt(rule->devcount + 1, d->op, rval); } else { lvalStr = usbauth_get_param_valStr(d->param, interface); // get parameter from sysfs + enum Valuetype lvalType = usbauth_get_param_type(d->param); if (lvalStr) - ret = match_vals(lvalStr, d->op, rvalStr); + ret = match_vals_autotype(lvalStr, d->op, rvalStr, lvalType); } - if (tmpStr) - free(tmpStr); - return ret; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/usbauth/src/usbauth.h new/usbauth-all-1.0.5/usbauth/src/usbauth.h --- old/usbauth-all-1.0.3/usbauth/src/usbauth.h 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/usbauth/src/usbauth.h 2022-12-19 22:15:35.000000000 +0100 @@ -62,6 +62,59 @@ bool match_valsInt(int lval, enum Operator op, int rval); /** + * checks constraint with multi-separated values + * tries first to convert strings to integer, if failed a string compare is processed + * + * lval op rval + * examlpe: 1.2.1 <= 1.2.2 : return true + * + * @lvalStr: left value + * @op: operator + * @rvalStr: right value + * @lvalType: type of left value + * @lvalType: type of right value + * when UNKNOWN tries first to convert strings to integer + * if failed a string compare is processed + * + * return: true if constraint is matched + */ +bool match_vals_devpath(const char *lvalStr, enum Operator op, const char *rvalStr, enum Valuetype lvalType, enum Valuetype rvalType); + +/** + * checks constraint with multi-separated values + * tries first to convert strings to integer, if failed a string compare is processed + * + * lval op rval + * examlpe: 1.2.1 <= 1.2.2 : return true + * + * @lvalStr: left value + * @op: operator + * @rvalStr: right value + * @lvalType: type of left value + * + * return: true if constraint is matched + */ +bool match_vals_devpath_autotype(const char *lvalStr, enum Operator op, const char *rvalStr, enum Valuetype lvalType); + +/** + * checks constraint + * + * lval op rval + * examlpe: 01 <= 02 : return true + * + * @lvalStr: left value + * @op: operator + * @rvalStr: right value + * @lvalType: type of left value + * @rvalType: type of right value + * when UNKNOWN tries first to convert strings to integer + * if failed a string compare is processed + * + * return: true if constraint is matched + */ +bool match_vals(const char *lvalStr, enum Operator op, const char *rvalStr, enum Valuetype lvalType, enum Valuetype rvalType); + +/** * checks constraint * tries first to convert strings to integer, if failed a string compare is processed * @@ -71,11 +124,11 @@ * @lvalStr: left value * @op: operator * @rvalStr: right value - * @parent: if not NULL parent will matched, too + * @lvalType: type of left value * * return: true if constraint is matched */ -bool match_vals(const char *lvalStr, enum Operator op, const char *rvalStr); +bool match_vals_autotype(const char *lvalStr, enum Operator op, const char *rvalStr, enum Valuetype lvalType); /** * checks if constraint from rule and data matches for an interface diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/usbauth-notifier/CHANGELOG.md new/usbauth-all-1.0.5/usbauth-notifier/CHANGELOG.md --- old/usbauth-all-1.0.3/usbauth-notifier/CHANGELOG.md 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/usbauth-notifier/CHANGELOG.md 2022-12-19 22:15:35.000000000 +0100 @@ -1,3 +1,6 @@ +usbauth-notifier 1.0.4 (2021-01-21) + * Fix libexecdir expansion for usbauth-notifier.desktop + usbauth-notifier 1.0.2 (2019-09-30) * Move binaries from bindir to libexecdir diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/usbauth-notifier/configure.ac new/usbauth-all-1.0.5/usbauth-notifier/configure.ac --- old/usbauth-all-1.0.3/usbauth-notifier/configure.ac 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/usbauth-notifier/configure.ac 2022-12-19 22:15:35.000000000 +0100 @@ -58,6 +58,5 @@ data/Makefile src/Makefile po/Makefile.in - usbauth-notifier.spec - data/usbauth-notifier.desktop]) + usbauth-notifier.spec]) AC_OUTPUT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/usbauth-notifier/data/Makefile.am new/usbauth-all-1.0.5/usbauth-notifier/data/Makefile.am --- old/usbauth-all-1.0.3/usbauth-notifier/data/Makefile.am 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/usbauth-notifier/data/Makefile.am 2022-12-19 22:15:35.000000000 +0100 @@ -12,3 +12,6 @@ man_MANS = usbauth-notifier.1 usbauth-npriv.1 xdgautostartdir = $(sysconfdir)/xdg/autostart dist_xdgautostart_DATA = usbauth-notifier.desktop + +$(dist_xdgautostart_DATA): + $(SED) "s#LIBEXECDIR#$(libexecdir)#g" $(srcdir)/$@.tmpl > $@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/usbauth-notifier/data/usbauth-notifier.desktop.in new/usbauth-all-1.0.5/usbauth-notifier/data/usbauth-notifier.desktop.in --- old/usbauth-all-1.0.3/usbauth-notifier/data/usbauth-notifier.desktop.in 2020-12-09 01:31:49.000000000 +0100 +++ new/usbauth-all-1.0.5/usbauth-notifier/data/usbauth-notifier.desktop.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,16 +0,0 @@ -# Copyright (C) 2018 Stefan Koch <stefan.koc...@gmail.com> -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of version 2 of the GNU General Public -# License as published by the Free Software Foundation. -# -# This program 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. - -[Desktop Entry] -Type=Application -Name=usbauth-notifier -Exec=@libexecdir@/usbauth-notifier/usbauth-notifier - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/usbauth-all-1.0.3/usbauth-notifier/data/usbauth-notifier.desktop.tmpl new/usbauth-all-1.0.5/usbauth-notifier/data/usbauth-notifier.desktop.tmpl --- old/usbauth-all-1.0.3/usbauth-notifier/data/usbauth-notifier.desktop.tmpl 1970-01-01 01:00:00.000000000 +0100 +++ new/usbauth-all-1.0.5/usbauth-notifier/data/usbauth-notifier.desktop.tmpl 2022-12-19 22:15:35.000000000 +0100 @@ -0,0 +1,16 @@ +# Copyright (C) 2018 Stefan Koch <stefan.koc...@gmail.com> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of version 2 of the GNU General Public +# License as published by the Free Software Foundation. +# +# This program 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. + +[Desktop Entry] +Type=Application +Name=usbauth-notifier +Exec=LIBEXECDIR/usbauth-notifier/usbauth-notifier +