OSDN Git Service

kioslave: prepare for KIO::AuthInfo changes
authorIvailo Monev <xakepa10@gmail.com>
Wed, 6 Apr 2022 20:29:48 +0000 (23:29 +0300)
committerIvailo Monev <xakepa10@gmail.com>
Wed, 6 Apr 2022 20:29:48 +0000 (23:29 +0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
kioslave/sftp/kio_sftp.cpp
kioslave/smb/kio_smb_auth.cpp

index adda8d3..6e816ac 100644 (file)
@@ -221,7 +221,6 @@ int sftpProtocol::auth_callback(const char *prompt, char *buf, size_t len,
     mPublicKeyAuthInfo->keepPassword = false; // don't save passwords for public key,
                                 // that's the task of ssh-agent.
     mPublicKeyAuthInfo->setExtraField(QLatin1String("hide-username-line"), true);
-    mPublicKeyAuthInfo->setModified(false);
 
     kDebug(KIO_SFTP_DB) << "Entering authentication callback, prompt=" << mPublicKeyAuthInfo->prompt;
 
@@ -776,7 +775,7 @@ void sftpProtocol::openConnection()
                 clearPubKeyAuthInfo();
                 error(KIO::ERR_COULD_NOT_LOGIN, i18n("Authentication failed."));
                 return;
-            } else if (rc != SSH_AUTH_DENIED || !mPublicKeyAuthInfo || !mPublicKeyAuthInfo->isModified()) {
+            } else if (rc != SSH_AUTH_DENIED || !mPublicKeyAuthInfo) {
                 clearPubKeyAuthInfo();
                 break;
             }
@@ -825,7 +824,6 @@ void sftpProtocol::openConnection()
         for(;;) {
             if (!isFirstLoginAttempt || info.password.isEmpty()) {
                 info.keepPassword = true; // make the "keep Password" check box visible to the user.
-                info.setModified(false);
 
                 QString username (info.username);
                 const QString errMsg(isFirstLoginAttempt ? QString() : i18n("Incorrect username or password"));
index 4d236b4..a40d6b6 100644 (file)
@@ -92,7 +92,6 @@ void SMBSlave::auth_smbc_get_data(const char *server,const char *share,
 
     info.username = s_username;
     info.password = s_password;
-    info.verifyPath = true;
 
     kDebug(KIO_SMB) << "libsmb-auth-callback URL:" << info.url;
 
@@ -133,7 +132,6 @@ bool SMBSlave::checkPassword(SMBUrl &url)
     if (share.at(0) == '/')
         share = share.mid(1);
     info.url.setPath('/' + share);
-    info.verifyPath = true;
     info.keepPassword = true;
 
     if ( share.isEmpty() )