mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 10:52:49 +00:00
kutils: sync password store on write
in case kded crashes for example Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
1eaf89824e
commit
6d1d1b7112
1 changed files with 2 additions and 0 deletions
|
@ -171,6 +171,7 @@ bool KPasswdStoreImpl::storePasswd(const QByteArray &key, const QString &passwd,
|
||||||
storekey.append(QLatin1Char('/'));
|
storekey.append(QLatin1Char('/'));
|
||||||
storekey.append(QString::fromLatin1(key.constData(), key.size()));
|
storekey.append(QString::fromLatin1(key.constData(), key.size()));
|
||||||
m_passwdstore.setString(storekey, encryptPasswd(passwd, &ok));
|
m_passwdstore.setString(storekey, encryptPasswd(passwd, &ok));
|
||||||
|
m_passwdstore.sync();
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -240,6 +241,7 @@ bool KPasswdStoreImpl::ensurePasswd(const qlonglong windowid, const bool showerr
|
||||||
|
|
||||||
if (storepasswdhash.isEmpty()) {
|
if (storepasswdhash.isEmpty()) {
|
||||||
m_passwdstore.setString(storekey, passhash);
|
m_passwdstore.setString(storekey, passhash);
|
||||||
|
m_passwdstore.sync();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (passhash != storepasswdhash) {
|
if (passhash != storepasswdhash) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue