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 0ed9a3d..0000000 Binary files a/images/huawei/.DS_Store and /dev/null differ 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/)