!13 bug#I6Z7N bug#I73JHD

Merge pull request !13 from liudunfa/openkylin/yangtze
This commit is contained in:
杨敏 2023-08-25 00:52:42 +00:00 committed by Gitee
commit 0913fc57c2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 15 additions and 4 deletions

View File

@ -262,7 +262,7 @@ QString BiometricsWidget::_accountTypeIntToString(int type){
void BiometricsWidget::showChangePwdDialog()
{
ChangeUserPwd dialog(m_user.username);
ChangeUserPwd dialog(m_user.username,this);
dialog.exec();
}
@ -644,7 +644,7 @@ void BiometricsWidget::showEnrollDialog()
}
}
isShowEnrollDialog = true;
BiometricEnrollDialog * dialog = new BiometricEnrollDialog(serviceInterface,deviceInfo->deviceType,deviceInfo->id,getuid());
BiometricEnrollDialog * dialog = new BiometricEnrollDialog(serviceInterface,deviceInfo->deviceType,deviceInfo->id,getuid(),this);
dialog->setAttribute(Qt::WA_DeleteOnClose);
//gdxfp显示指纹图片
if(deviceInfo->shortName == "gdxfp")
@ -783,7 +783,7 @@ void BiometricsWidget::addFeature(FeatureInfoPtr &featureinfo)
return ;
QStringList names = m_biometricProxy->getAllFeaturelist(getuid());
//QStringList names = m_biometricProxy->getFeaturelist(deviceInfoPtr->id,getuid());
ChangeFeatureName * dialog = new ChangeFeatureName(names);
ChangeFeatureName * dialog = new ChangeFeatureName(names,this);
dialog->setTitle(ui->biometrictypeBox->currentText());
connect(dialog, &ChangeFeatureName::sendNewName, [&,this,featureinfo](QString rename){

View File

@ -26,6 +26,7 @@
#include <pwd.h>
#include <unistd.h>
#include <QSettings>
#include <kysdk/kysdk-system/libkysysinfo.h>
#define PAM_CONF_FILE "/etc/pam.d/common-password"
@ -36,7 +37,7 @@ PasswdCheckUtil::PasswdCheckUtil(QObject *parent) : QObject(parent)
bool PasswdCheckUtil::getCurrentPamState(){
// pam_pwquality.so为安全中心密码强度是否开启判断社区版不做判断
if (isCommunity() || isWayland()) {
if (isCommunity() || isWayland() || isOpenkylin()) {
return true;
}
QFile * readFile = new QFile(PAM_CONF_FILE);
@ -79,6 +80,15 @@ bool PasswdCheckUtil::isWayland() {
}
}
bool PasswdCheckUtil::isOpenkylin()
{
QString systemName = QString(QLatin1String(kdk_system_get_systemName()));
if (systemName.compare("openkylin", Qt::CaseInsensitive) == 0) {
return true;
}
return false;
}
static int palindrome(const char *newPw)
{
int i = 0, j = 0;

View File

@ -49,6 +49,7 @@ public:
private:
static bool isWayland();
static bool isCommunity();
static bool isOpenkylin();
};
#endif // PASSWDCHECKUTIL_H