From cb4f236278ef584d41d680f4cc42f2fa2e16ea62 Mon Sep 17 00:00:00 2001 From: KevinDuan Date: Wed, 22 Feb 2023 01:16:53 +0800 Subject: [PATCH] Fix lintian error --- debian/control | 6 +- debian/copyright | 157 +++++++++++++++++++++++++++++++ debian/libpam-biometric.install | 2 +- debian/libpam-biometric.manpages | 3 + debian/libpam-biometric.postinst | 2 +- images/huawei/.DS_Store | Bin 6148 -> 0 bytes man/bioctl-helper.1 | 25 +++++ man/biorestart.1 | 25 +++++ man/uniauth-backend.1 | 25 +++++ polkit-agent/src/mainwindow.cpp | 10 +- uniauth-backend/CMakeLists.txt | 2 +- 11 files changed, 246 insertions(+), 11 deletions(-) delete mode 100644 images/huawei/.DS_Store create mode 100644 man/bioctl-helper.1 create mode 100644 man/biorestart.1 create mode 100644 man/uniauth-backend.1 diff --git a/debian/control b/debian/control index a4a95fa..81c44d4 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: optional Maintainer: Kylin Team Uploaders: handsome_feng Build-Depends: cmake (>= 2.6), - debhelper-compat (= 12), + debhelper-compat (= 13), libglib2.0-dev, libgsettings-qt-dev, libopencv-dev, @@ -15,7 +15,7 @@ Build-Depends: cmake (>= 2.6), qtbase5-dev, qttools5-dev, qttools5-dev-tools, -Standards-Version: 4.5.0 +Standards-Version: 4.6.1.0 Rules-Requires-Root: no Homepage: https://github.com/ukui/ukui-biometric-auth Vcs-Git: https://github.com/ukui/ukui-biometric.git @@ -34,7 +34,7 @@ Description: Insertable authentication module for PAM Package: ukui-polkit Architecture: any -Depends: policykit-1, ${misc:Depends}, ${shlibs:Depends} +Depends: polkitd, ${misc:Depends}, ${shlibs:Depends} Suggests: biometric-auth Provides: polkit-1-auth-agent Description: UKUI authentication agent for PolicyKit-1 diff --git a/debian/copyright b/debian/copyright index c833905..6bb9948 100644 --- a/debian/copyright +++ b/debian/copyright @@ -4,6 +4,163 @@ Upstream-Contact: yanghao@kylinos.cn Source: https://github.com/ukui/ukui-biometric-auth Files: * +Copyright: 2018, 2022, Tianjin KYLIN Information Technology Co., Ltd. +License: GPL-3+ + This package 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 package 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 Genaral Public License for more details. + . + You should have received a copy og the GNU General Public License + along with this program. If not, see + . + On Debian systems, the complete text of the GNU General + Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". + +Files: bioauth/include/giodbus.h + bioauth/include/loginoptionswidget.h +Copyright: 2018, yanghao +License: GPL-3+ + This package 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 package 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 Genaral Public License for more details. + . + You should have received a copy og the GNU General Public License + along with this program. If not, see + . + On Debian systems, the complete text of the GNU General + Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". + +Files: bioauth/src/giodbus.cpp + bioauth/src/loginoptionswidget.cpp +Copyright: 2018, yanghao +License: GPL-3+ + This package 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 package 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 Genaral Public License for more details. + . + You should have received a copy og the GNU General Public License + along with this program. If not, see + . + On Debian systems, the complete text of the GNU General + Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". + +Files: debian/* +Copyright: 2022, yanghao +License: GPL-3+ + This package 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 package 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 Genaral Public License for more details. + . + You should have received a copy og the GNU General Public License + along with this program. If not, see + . + On Debian systems, the complete text of the GNU General + Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". + +Files: man/* +Copyright: 2018, yanghao +License: GPL-3+ + This package 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 package 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 Genaral Public License for more details. + . + You should have received a copy og the GNU General Public License + along with this program. If not, see + . + On Debian systems, the complete text of the GNU General + Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". + +Files: pam-biometric/data/* +Copyright: 2018, yanghao +License: GPL-3+ + This package 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 package 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 Genaral Public License for more details. + . + You should have received a copy og the GNU General Public License + along with this program. If not, see + . + On Debian systems, the complete text of the GNU General + Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". + +Files: pam-biometric/utils/* +Copyright: 2018, yanghao +License: GPL-3+ + This package 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 package 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 Genaral Public License for more details. + . + You should have received a copy og the GNU General Public License + along with this program. If not, see + . + On Debian systems, the complete text of the GNU General + Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". + +Files: polkit-agent/data/* +Copyright: 2018, yanghao +License: GPL-3+ + This package 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 package 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 Genaral Public License for more details. + . + You should have received a copy og the GNU General Public License + along with this program. If not, see + . + On Debian systems, the complete text of the GNU General + Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". + +Files: polkit-agent/src/kalabel.cpp + polkit-agent/src/kalabel.h + polkit-agent/src/modeButton.cpp + polkit-agent/src/modeButton.h Copyright: 2018, yanghao License: GPL-3+ This package is free software; you can redistribute it and/or modify diff --git a/debian/libpam-biometric.install b/debian/libpam-biometric.install index 6ce65fb..d67b8b3 100644 --- a/debian/libpam-biometric.install +++ b/debian/libpam-biometric.install @@ -1,6 +1,6 @@ /usr/share/ukui-biometric/ukui-biometric.conf /usr/share/dbus-1/system-services/org.ukui.UniauthBackend.service -/etc/dbus-1/system.d/org.ukui.UniauthBackend.conf +/usr/share/dbus-1/system.d/org.ukui.UniauthBackend.conf /lib/security/* /usr/bin/* /usr/share/pam-configs/* diff --git a/debian/libpam-biometric.manpages b/debian/libpam-biometric.manpages index ce85cd2..0eaf7d0 100644 --- a/debian/libpam-biometric.manpages +++ b/debian/libpam-biometric.manpages @@ -1,3 +1,6 @@ man/bioauth.1 man/bioctl.1 man/biodrvctl.1 +man/bioctl-helper.1 +man/biorestart.1 +man/uniauth-backend.1 diff --git a/debian/libpam-biometric.postinst b/debian/libpam-biometric.postinst index 46f1a0d..1add37b 100644 --- a/debian/libpam-biometric.postinst +++ b/debian/libpam-biometric.postinst @@ -39,7 +39,7 @@ set_opt(){ sed -i "s/\[${section}\]/\[${section}\]\n${key}\=${val}/g" ${file} fi else - echo -e "\n[${section}]\n${key}=${val}" >> ${file} + sed -i "\n[${section}]\n${key}=${val}" ${file} sed -i "s/\-e//g" ${file} fi } diff --git a/images/huawei/.DS_Store b/images/huawei/.DS_Store deleted file mode 100644 index 0ed9a3d4040b26b46119e99fb633973bac04e956..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK!Ab)$5PegNR6JOrpm^Gwo&?WcmQsaY6}(nk>slyXX{+FEFMf>Q=LhJUNvQ3% z1qBh28JN6HcHU(2QZ@|$X+GYb0CfO0x?*LE%?i`^>PuFMBb!9A9DVd~j}dYVm!f^( zFDjsWw~HnQ+_Nd>_b*3=XB=aKCuHqm-s=wYE~EKVsZ5B6?`F2BI$F$-(WkiK-gn69 zvo~7J$0=DybNmL*$?K8R!Pu(M*+-U7D_fW6wUlQEcQ$Lr9AiAtwT9{HDrB$3ZlG<9 z39GpHdKL0g%5#7#);zHFeAe)-mC0KvC%bO0fGgk%{Fnkfv(;+b0ljqvTme^LrhtAQ z61rj1rBR1e{U$U`H`y^(fw_n{hnR2Vxqr2*?qd{}C`5ym1A7Re=waWOfb! diff --git a/man/bioctl-helper.1 b/man/bioctl-helper.1 new file mode 100644 index 0000000..29f809b --- /dev/null +++ b/man/bioctl-helper.1 @@ -0,0 +1,25 @@ +.\" Man Page for bioctl +.TH BIOCTL 1 "August 05, 2018" +.SH "NAME" +bioctl \- control tool for biometric authentication +.SH "SYNOPSIS" +.B bioctl +.SH "DESCRIPTION" +.B bioctl +is a control tool for biometric authentication in the UKUI desktop. +It show or change the status that biometric authentication is enabled or not. +.TP +\fB status\fR +Show the status of biometric authentication. +.TP +\fB enable\fR +Enable biometric authentication. +.TP +\fB disable\fR +Disable biometric authenticaion. +.SH "BUGS" +.SS Should you encounter any bugs, they may be reported at: +http://github.com/ukui/ukui-biometric-auth/issues +.SH "AUTHORS" +.SS This Manual Page has been written for the UKUI Desktop Environment by: +yanghao (2018) diff --git a/man/biorestart.1 b/man/biorestart.1 new file mode 100644 index 0000000..29f809b --- /dev/null +++ b/man/biorestart.1 @@ -0,0 +1,25 @@ +.\" Man Page for bioctl +.TH BIOCTL 1 "August 05, 2018" +.SH "NAME" +bioctl \- control tool for biometric authentication +.SH "SYNOPSIS" +.B bioctl +.SH "DESCRIPTION" +.B bioctl +is a control tool for biometric authentication in the UKUI desktop. +It show or change the status that biometric authentication is enabled or not. +.TP +\fB status\fR +Show the status of biometric authentication. +.TP +\fB enable\fR +Enable biometric authentication. +.TP +\fB disable\fR +Disable biometric authenticaion. +.SH "BUGS" +.SS Should you encounter any bugs, they may be reported at: +http://github.com/ukui/ukui-biometric-auth/issues +.SH "AUTHORS" +.SS This Manual Page has been written for the UKUI Desktop Environment by: +yanghao (2018) diff --git a/man/uniauth-backend.1 b/man/uniauth-backend.1 new file mode 100644 index 0000000..29f809b --- /dev/null +++ b/man/uniauth-backend.1 @@ -0,0 +1,25 @@ +.\" Man Page for bioctl +.TH BIOCTL 1 "August 05, 2018" +.SH "NAME" +bioctl \- control tool for biometric authentication +.SH "SYNOPSIS" +.B bioctl +.SH "DESCRIPTION" +.B bioctl +is a control tool for biometric authentication in the UKUI desktop. +It show or change the status that biometric authentication is enabled or not. +.TP +\fB status\fR +Show the status of biometric authentication. +.TP +\fB enable\fR +Enable biometric authentication. +.TP +\fB disable\fR +Disable biometric authenticaion. +.SH "BUGS" +.SS Should you encounter any bugs, they may be reported at: +http://github.com/ukui/ukui-biometric-auth/issues +.SH "AUTHORS" +.SS This Manual Page has been written for the UKUI Desktop Environment by: +yanghao (2018) diff --git a/polkit-agent/src/mainwindow.cpp b/polkit-agent/src/mainwindow.cpp index 850a82a..e722936 100644 --- a/polkit-agent/src/mainwindow.cpp +++ b/polkit-agent/src/mainwindow.cpp @@ -602,7 +602,7 @@ void MainWindow::setPrompt(const QString &text, bool echo) /* 转换pam英文提示,目前转换的就3个翻译 Authenticated failed, account locked! - Authenticated failed, 1 login attemps left + Authenticated failed, 1 login attempts left Account locked, 4 minutes left */ QString MainWindow::check_is_pam_message(QString text) @@ -618,12 +618,12 @@ QString MainWindow::check_is_pam_message(QString text) char l_str[1024]; int a,b; //兼容旧版本翻译,以及适配新版本翻译 - if(text.contains("attemps",Qt::CaseSensitive) && sscanf(str,"Authenticated failed, %d login attemps left",&a)) - snprintf(l_str,1024,_("Authenticated failed, %d login attemps left"),a); + if(text.contains("attempts",Qt::CaseSensitive) && sscanf(str,"Authenticated failed, %d login attempts left",&a)) + snprintf(l_str,1024,_("Authenticated failed, %d login attempts left"),a); + else if(text.contains("attempts",Qt::CaseSensitive) && sscanf(str,"Authenticated failed, %d login attempts left",&a)) + snprintf(l_str,1024,_("Authenticated failed, %d login attempts left"),a); else if(text.contains("attempts",Qt::CaseSensitive) && sscanf(str,"Authenticated failed, %d login attempts left",&a)) snprintf(l_str,1024,_("Authenticated failed, %d login attempts left"),a); - else if(text.contains("attempt",Qt::CaseSensitive) && sscanf(str,"Authenticated failed, %d login attempt left",&a)) - snprintf(l_str,1024,_("Authenticated failed, %d login attempt left"),a); else if(text.contains("days",Qt::CaseSensitive) && sscanf(str,"Account locked, %d days left",&a)){ strTrans = tr("Account locked,") + QString("%1 ").arg(a) + tr("days left"); return strTrans; diff --git a/uniauth-backend/CMakeLists.txt b/uniauth-backend/CMakeLists.txt index 330a65e..ed3ad48 100644 --- a/uniauth-backend/CMakeLists.txt +++ b/uniauth-backend/CMakeLists.txt @@ -22,5 +22,5 @@ add_executable(uniauth-backend ${bin_SRCS}) target_link_libraries(uniauth-backend Qt5::Core Qt5::DBus) install(TARGETS uniauth-backend DESTINATION bin) -install(FILES org.ukui.UniauthBackend.conf DESTINATION /etc/dbus-1/system.d/) +install(FILES org.ukui.UniauthBackend.conf DESTINATION /usr/share/dbus-1/system.d/) install(FILES org.ukui.UniauthBackend.service DESTINATION /usr/share/dbus-1/system-services/)