173
kDebug() << "No wallet or wallet not open ..." << endl;
173
Smb4KNotification *notification = new Smb4KNotification( this );
174
notification->loginsNotAccessible();
178
void Smb4KWalletManager::readAuthInfo( Smb4KAuthInfo *authInfo )
179
void Smb4KWalletManager::readAuthInfo( Smb4KBasicNetworkItem *networkItem )
180
Q_ASSERT( authInfo );
181
Q_ASSERT( networkItem );
182
183
// Initialize the wallet manager. In case the wallet is already
183
// set up, init() will just do nothing.
184
// set up, init() will do nothing.
187
if ( useWalletSystem() && m_wallet )
188
bool set_auth_info = false;
189
bool auth_info_set = false;
190
// Read the authentication information.
191
switch ( authInfo->type() )
191
switch ( networkItem->type() )
193
case Smb4KAuthInfo::Host:
195
QMap<QString,QString> map;
197
if ( m_wallet->hasEntry( authInfo->unc().toUpper() ) )
199
m_wallet->readMap( authInfo->unc().toUpper(), map );
201
else if ( m_wallet->hasEntry( authInfo->hostName().toUpper() ) )
203
m_wallet->readMap( authInfo->hostName().toUpper(), map );
204
m_wallet->removeEntry( authInfo->hostName().toUpper() );
211
// Only set the authentication information the map is not empty and if
212
// either the login was not set in authInfo or it is equal to map["Login"].
213
if ( !map.isEmpty() &&
214
(authInfo->login().isEmpty() || QString::compare( QString::fromLocal8Bit( authInfo->login() ), map["Login"] ) == 0) )
216
// Do not set the authentication, if the workgroup does not match.
217
if ( map["Workgroup"].isEmpty() || authInfo->workgroupName().isEmpty() ||
218
QString::compare( map["Workgroup"], authInfo->workgroupName().toUpper() ) == 0 )
220
authInfo->setLogin( map["Login"] );
221
authInfo->setPassword( map["Password"] );
223
if ( !map["Workgroup"].isEmpty() && authInfo->workgroupName().isEmpty() )
225
authInfo->setWorkgroupName( map["Workgroup"] );
232
set_auth_info = true;
246
case Smb4KAuthInfo::Share:
248
// Read the authentication information. Prefer the exact match,
249
// but also look for an entry that was provided for the host.
250
QMap<QString,QString> map;
251
m_wallet->readMap( authInfo->unc().toUpper(), map );
255
m_wallet->readMap( authInfo->hostUNC().toUpper(), map );
262
// Only set the authentication information the map is not empty and if
263
// either the login was not set in authInfo or it is equal to map["Login"].
264
if ( !map.isEmpty() &&
265
(authInfo->login().isEmpty() || QString::compare( QString::fromLocal8Bit( authInfo->login() ), map["Login"] ) == 0) )
267
if ( map["Workgroup"].isEmpty() || authInfo->workgroupName().isEmpty() ||
268
QString::compare( map["Workgroup"], authInfo->workgroupName().toUpper() ) == 0 )
270
authInfo->setLogin( map["Login"] );
271
authInfo->setPassword( map["Password"] );
273
if ( !map["Workgroup"].isEmpty() && authInfo->workgroupName().isEmpty() )
275
authInfo->setWorkgroupName( map["Workgroup"] );
282
set_auth_info = true;
296
case Smb4KAuthInfo::Default:
298
QMap<QString,QString> map;
299
m_wallet->readMap( "DEFAULT_LOGIN", map );
301
if ( !map.isEmpty() )
303
authInfo->setLogin( map["Login"] );
304
authInfo->setPassword( map["Password"] );
193
case Smb4KBasicNetworkItem::Host:
195
Smb4KHost *host = static_cast<Smb4KHost *>( networkItem );
199
QMap<QString,QString> map;
201
if ( m_wallet->hasEntry( host->unc().toUpper() ) )
203
m_wallet->readMap( host->unc().toUpper(), map );
210
// Set the authentication information.
211
if ( !map.isEmpty() && (host->workgroupName().isEmpty() || map["Workgroup"].isEmpty() ||
212
QString::compare( host->workgroupName(), map.value( "Workgroup" ), Qt::CaseInsensitive ) == 0) )
214
if ( !host->login().isEmpty() )
216
if ( QString::compare( host->login(), map.value( "Login" ) ) == 0 )
218
host->setLogin( map.value( "Login" ) );
219
host->setPassword( map.value( "Password" ) );
220
auth_info_set = true;
229
host->setLogin( map.value( "Login" ) );
230
host->setPassword( map.value( "Password" ) );
231
auth_info_set = true;
234
// In difference to the readAuthInfo() function that takes an Smb4KAuthInfo
235
// object, do not set the workgroup or IP address here.
242
// If no authentication information was set until now, check if
243
// we have to set the default login then.
244
if ( !auth_info_set && Smb4KSettings::useDefaultLogin() )
246
QMap<QString,QString> map;
247
m_wallet->readMap( "DEFAULT_LOGIN", map );
249
if ( !map.isEmpty() )
251
host->setLogin( map["Login"] );
252
host->setPassword( map["Password"] );
264
Smb4KAuthInfo authInfo( host );
265
writeToConfigFile( &authInfo );
274
case Smb4KBasicNetworkItem::Share:
276
Smb4KShare *share = static_cast<Smb4KShare *>( networkItem );
280
QMap<QString,QString> map;
282
if ( !share->isHomesShare() )
284
if ( m_wallet->hasEntry( share->unc().toUpper() ) )
286
m_wallet->readMap( share->unc().toUpper(), map );
290
m_wallet->readMap( share->hostUNC().toUpper(), map );
295
// Specify a user name if necessary. The overwrite argument
296
// is set to FALSE here, so that no dialog is shown if a user
297
// name has already been provided.
298
Smb4KHomesSharesHandler::self()->specifyUser( share, false );
300
if ( m_wallet->hasEntry( share->homeUNC().toUpper() ) )
302
m_wallet->readMap( share->homeUNC().toUpper(), map );
306
m_wallet->readMap( share->hostUNC().toUpper(), map );
310
// Set the authentication information.
311
if ( !map.isEmpty() && (share->workgroupName().isEmpty() || map["Workgroup"].isEmpty() ||
312
QString::compare( share->workgroupName(), map.value( "Workgroup" ), Qt::CaseInsensitive ) == 0) )
314
if ( !share->login().isEmpty() )
316
if ( QString::compare( share->login(), map.value( "Login" ) ) == 0 )
318
share->setLogin( map.value( "Login" ) );
319
share->setPassword( map.value( "Password" ) );
320
auth_info_set = true;
329
share->setLogin( map.value( "Login" ) );
330
share->setPassword( map.value( "Password" ) );
331
auth_info_set = true;
334
// In difference to the readAuthInfo() function that takes an Smb4KAuthInfo
335
// object, do not set the workgroup or IP address here.
342
// If no authentication information was set until now, check if
343
// we have to set the default login then.
344
if ( !auth_info_set && Smb4KSettings::useDefaultLogin() )
346
QMap<QString,QString> map;
347
m_wallet->readMap( "DEFAULT_LOGIN", map );
349
if ( !map.isEmpty() )
351
share->setLogin( map["Login"] );
352
share->setPassword( map["Password"] );
364
Smb4KAuthInfo authInfo( share );
365
writeToConfigFile( &authInfo );
319
// If there was no matching authentication information, use the
320
// default one, if it exists.
321
if ( !set_auth_info && Smb4KSettings::useDefaultLogin() &&
322
authInfo->type() != Smb4KAuthInfo::Default )
324
QMap<QString,QString> map;
325
m_wallet->readMap( "DEFAULT_LOGIN", map );
327
if ( !map.isEmpty() )
329
authInfo->setLogin( map["Login"] );
330
authInfo->setPassword( map["Password"] );
344
for ( int i = 0; i < m_list.size(); ++i )
382
switch ( networkItem->type() )
346
if ( QString::compare( authInfo->unc().toUpper(), m_list.at( i )->unc().toUpper() ) == 0 )
349
authInfo->setLogin( m_list.at( i )->login() );
350
authInfo->setPassword( m_list.at( i )->password() );
352
if ( authInfo->workgroupName().isEmpty() )
354
authInfo->setWorkgroupName( m_list.at( i )->workgroupName() );
363
else if ( QString::compare( authInfo->hostUNC().toUpper(),
364
m_list.at( i )->hostUNC().toUpper() ) == 0 )
366
// The host is the same
367
authInfo->setLogin( m_list.at( i )->login() );
368
authInfo->setPassword( m_list.at( i )->password() );
370
if ( authInfo->workgroupName().isEmpty() )
372
authInfo->setWorkgroupName( m_list.at( i )->workgroupName() );
384
case Smb4KBasicNetworkItem::Host:
386
Smb4KHost *host = static_cast<Smb4KHost *>( networkItem );
390
for ( int i = 0; i < m_list.size(); ++i )
392
if ( QString::compare( host->unc(), m_list.at( i )->unc(), Qt::CaseInsensitive ) == 0 &&
393
(host->workgroupName().isEmpty() || m_list.at( i )->workgroupName().isEmpty() ||
394
QString::compare( host->workgroupName(), m_list.at( i )->workgroupName(), Qt::CaseInsensitive ) == 0) )
396
if ( !host->login().isEmpty() )
398
if ( QString::compare( host->login(), m_list.at( i )->login() ) == 0 )
400
host->setLogin( m_list.at( i )->login() );
401
host->setPassword( m_list.at( i )->password() );
410
host->setLogin( m_list.at( i )->login() );
411
host->setPassword( m_list.at( i )->password() );
421
Smb4KAuthInfo authInfo( host );
422
writeToConfigFile( &authInfo );
431
case Smb4KBasicNetworkItem::Share:
433
Smb4KShare *share = static_cast<Smb4KShare *>( networkItem );
439
if ( !share->isHomesShare() )
445
// Specify a user name if necessary. The overwrite argument
446
// is set to FALSE here, so that no dialog is shown if a user
447
// name has already been provided.
448
Smb4KHomesSharesHandler::self()->specifyUser( share, false );
450
unc = share->homeUNC();
453
for ( int i = 0; i < m_list.size(); ++i )
455
if ( QString::compare( unc, m_list.at( i )->unc(), Qt::CaseInsensitive ) == 0 &&
456
(share->workgroupName().isEmpty() || m_list.at( i )->workgroupName().isEmpty() ||
457
QString::compare( share->workgroupName(), m_list.at( i )->workgroupName(), Qt::CaseInsensitive ) == 0) )
460
if ( !share->login().isEmpty() )
462
if ( QString::compare( share->login(), m_list.at( i )->login() ) == 0 )
464
share->setLogin( m_list.at( i )->login() );
465
share->setPassword( m_list.at( i )->password() );
474
share->setLogin( m_list.at( i )->login() );
475
share->setPassword( m_list.at( i )->password() );
479
else if ( QString::compare( share->hostUNC(), m_list.at( i )->hostUNC(), Qt::CaseInsensitive ) == 0 &&
480
(share->workgroupName().isEmpty() || m_list.at( i )->workgroupName().isEmpty() ||
481
QString::compare( share->workgroupName(), m_list.at( i )->workgroupName(), Qt::CaseInsensitive ) == 0) )
483
// The host is the same
484
if ( !share->login().isEmpty() )
486
if ( QString::compare( share->login(), m_list.at( i )->login() ) == 0 )
488
share->setLogin( m_list.at( i )->login() );
489
share->setPassword( m_list.at( i )->password() );
498
share->setLogin( m_list.at( i )->login() );
499
share->setPassword( m_list.at( i )->password() );
509
Smb4KAuthInfo authInfo( share );
510
writeToConfigFile( &authInfo );
402
writeToConfigFile( authInfo );
407
void Smb4KWalletManager::writeAuthInfo( Smb4KAuthInfo *authInfo )
542
void Smb4KWalletManager::readDefaultAuthInfo( Smb4KAuthInfo *authInfo )
409
544
Q_ASSERT( authInfo );
411
546
// Initialize the wallet manager. In case the wallet is already
412
547
// set up, init() will just do nothing.
550
// Since we do not store default authentication information
551
// when no wallet is used, we only need to read from the wallet.
552
if ( useWalletSystem() && m_wallet )
417
// Write the authentication information to the wallet, if it
419
554
QMap<QString,QString> map;
421
if ( !authInfo->login().isEmpty() /* allow empty passwords */ )
555
m_wallet->readMap( "DEFAULT_LOGIN", map );
557
if ( !map.isEmpty() )
559
authInfo->setLogin( map["Login"] );
560
authInfo->setPassword( map["Password"] );
567
authInfo->useDefaultAuthInfo();
576
void Smb4KWalletManager::writeAuthInfo( Smb4KBasicNetworkItem *networkItem )
578
Q_ASSERT( networkItem );
580
// Initialize the wallet manager. In case the wallet is already
581
// set up, init() will just do nothing.
584
if ( useWalletSystem() && m_wallet )
586
switch ( networkItem->type() )
588
case Smb4KBasicNetworkItem::Host:
590
Smb4KHost *host = static_cast<Smb4KHost *>( networkItem );
594
// Write the authentication information to the wallet, if it
596
if ( !host->login().isEmpty() /* allow empty passwords */ && !host->hostName().isEmpty() )
598
QMap<QString,QString> map;
599
map["Login"] = host->login();
600
map["Password"] = host->password();
602
if ( !host->workgroupName().isEmpty() )
604
map["Workgroup"] = host->workgroupName().toUpper();
611
if ( !host->ip().isEmpty() )
613
map["IP Address"] = host->ip();
620
m_wallet->writeMap( host->unc().toUpper(), map );
629
Smb4KAuthInfo authInfo( host );
630
writeToConfigFile( &authInfo );
639
case Smb4KBasicNetworkItem::Share:
641
Smb4KShare *share = static_cast<Smb4KShare *>( networkItem );
645
// Write the authentication information to the wallet, if it
647
if ( !share->login().isEmpty() /* allow empty passwords */ && !share->hostName().isEmpty() )
649
QMap<QString,QString> map;
650
map["Login"] = share->login();
651
map["Password"] = share->password();
653
if ( !share->workgroupName().isEmpty() )
655
map["Workgroup"] = share->workgroupName().toUpper();
662
if ( !share->hostIP().isEmpty() )
664
map["IP Address"] = share->hostIP();
671
if ( !share->isHomesShare() )
673
m_wallet->writeMap( share->unc().toUpper(), map );
677
m_wallet->writeMap( share->homeUNC().toUpper(), map );
687
Smb4KAuthInfo authInfo( share );
688
writeToConfigFile( &authInfo );
705
// Clear the list if necessary, i.e. if the wallet manager
706
// should forget the previously used login(s).
707
if ( !Smb4KSettings::rememberLogins() )
709
while ( !m_list.isEmpty() )
711
delete m_list.takeFirst();
719
// Now insert the new authentication information. Before we
720
// do this, remove the old one, if one is present.
721
switch ( networkItem->type() )
723
case Smb4KBasicNetworkItem::Host:
725
Smb4KHost *host = static_cast<Smb4KHost *>( networkItem );
729
Smb4KAuthInfo authInfo( host );
731
QMutableListIterator<Smb4KAuthInfo *> it( m_list );
733
while ( it.hasNext() )
735
Smb4KAuthInfo *auth_info = it.next();
737
if ( QString::compare( auth_info->unc(), authInfo.unc(), Qt::CaseInsensitive ) == 0 &&
738
(auth_info->workgroupName().isEmpty() || authInfo.workgroupName().isEmpty() ||
739
QString::compare( auth_info->workgroupName(), authInfo.workgroupName(), Qt::CaseInsensitive ) == 0) )
750
m_list << new Smb4KAuthInfo( authInfo );
753
writeToConfigFile( &authInfo );
762
case Smb4KBasicNetworkItem::Share:
764
Smb4KShare *share = static_cast<Smb4KShare *>( networkItem );
768
Smb4KAuthInfo authInfo( share );
770
QMutableListIterator<Smb4KAuthInfo *> it( m_list );
772
while ( it.hasNext() )
774
Smb4KAuthInfo *auth_info = it.next();
776
if ( QString::compare( auth_info->unc(), authInfo.unc(), Qt::CaseInsensitive ) == 0 &&
777
(auth_info->workgroupName().isEmpty() || authInfo.workgroupName().isEmpty() ||
778
QString::compare( auth_info->workgroupName(), authInfo.workgroupName(), Qt::CaseInsensitive ) == 0) )
789
m_list << new Smb4KAuthInfo( authInfo );
792
writeToConfigFile( &authInfo );
810
void Smb4KWalletManager::writeDefaultAuthInfo( Smb4KAuthInfo *authInfo )
812
Q_ASSERT( authInfo );
814
if ( useWalletSystem() && m_wallet )
816
// Write the default authentication information to the wallet
817
if ( authInfo->type() == Smb4KAuthInfo::Default && !authInfo->login().isEmpty() /* allow empty passwords */ )
819
QMap<QString,QString> map;
423
820
map["Login"] = authInfo->login();
424
821
map["Password"] = authInfo->password();
822
m_wallet->writeMap( "DEFAULT_LOGIN", map );
431
switch ( authInfo->type() )
433
case Smb4KAuthInfo::Default:
435
m_wallet->writeMap( "DEFAULT_LOGIN", map );
440
if ( !authInfo->workgroupName().isEmpty() )
442
map["Workgroup"] = authInfo->workgroupName().toUpper();
449
m_wallet->writeMap( authInfo->unc().toUpper(), map );
458
// Clear the list if necessary, i.e. if the wallet manager
459
// should forget the previously used login(s).
460
if ( !Smb4KSettings::rememberLogins() )
462
while ( !m_list.isEmpty() )
464
delete m_list.takeFirst();
472
// We do not store a default login if no wallet is used.
473
if ( authInfo->type() != Smb4KAuthInfo::Default )
475
m_list.append( new Smb4KAuthInfo( *authInfo ) );
484
writeToConfigFile( authInfo );
489
bool Smb4KWalletManager::showPasswordDialog( Smb4KAuthInfo *authInfo, QWidget *parent )
837
bool Smb4KWalletManager::showPasswordDialog( Smb4KBasicNetworkItem *networkItem, QWidget *parent )
491
Q_ASSERT( authInfo );
839
Q_ASSERT( networkItem );
841
// Initialize the wallet manager. In case the wallet is already
842
// set up, init() will do nothing.
493
846
bool success = false;
495
// Read the authentication information.
496
readAuthInfo( authInfo );
498
// Get known logins in case we have a 'homes' share and the share
499
// name has not yet been changed.
500
QMap<QString, QString> logins;
502
if ( authInfo->isHomesShare() && QString::compare( authInfo->shareName(), "homes" ) == 0 )
504
if ( authInfo->homesUsers().isEmpty() )
506
// Normally, authInfo should already carry the homes users,
507
// but we will check once more.
508
Smb4KHomesSharesHandler::self()->setHomesUsers( authInfo );
515
for ( int i = 0; i < authInfo->homesUsers().size(); ++i )
517
Smb4KAuthInfo user_auth_info( *authInfo );
518
user_auth_info.setHomesUser( authInfo->homesUsers().at( i ) );
520
// Read the authentication data for the share. If it does not
521
// exist yet, user() and password() will be empty.
522
readAuthInfo( &user_auth_info );
524
if ( user_auth_info.login().isEmpty() )
526
logins.insert( authInfo->homesUsers().at( i ), QString() );
530
logins.insert( QString::fromLocal8Bit( user_auth_info.login() ),
531
QString::fromLocal8Bit( user_auth_info.password() ) );
848
// Read authentication information
849
readAuthInfo( networkItem );
540
851
// Set up the password dialog.
541
852
KPasswordDialog dlg( parent, KPasswordDialog::ShowUsernameLine );
543
if ( !logins.isEmpty() )
545
dlg.setKnownLogins( logins );
550
dlg.setUsername( authInfo->login() );
551
dlg.setPassword( authInfo->password() );
556
switch ( authInfo->type() )
558
case Smb4KAuthInfo::Host:
854
switch ( networkItem->type() )
856
case Smb4KBasicNetworkItem::Host:
560
prompt = i18n( "<qt>Please enter a user name and a password for the host %1.</qt>" ).arg( authInfo->hostName() );
858
Smb4KHost *host = static_cast<Smb4KHost *>( networkItem );
862
dlg.setUsername( host->login() );
863
dlg.setPassword( host->password() );
864
dlg.setPrompt( i18n( "<qt>Please enter a username and a password for the host <b>%1</b>.</qt>", host->hostName() ) );
866
// Execute the password dialog, retrieve the new authentication
867
// information and save it.
868
if ( (success = dlg.exec()) )
870
host->setLogin( dlg.username() );
871
host->setPassword( dlg.password() );
872
writeAuthInfo( host );
563
case Smb4KAuthInfo::Share:
885
case Smb4KBasicNetworkItem::Share:
565
prompt = i18n( "<qt>Please enter a user name and a password for the share %1.</qt>" ).arg( authInfo->unc() );
887
Smb4KShare *share = static_cast<Smb4KShare *>( networkItem );
891
// Get known logins in case we have a 'homes' share and the share
892
// name has not yet been changed.
893
QMap<QString,QString> logins;
894
QStringList users = Smb4KHomesSharesHandler::self()->homesUsers( share );
896
for ( int i = 0; i < users.size(); ++i )
898
Smb4KShare tmp_share( *share );
899
tmp_share.setLogin( users.at( i ) );
901
// Read the authentication data for the share. If it does not
902
// exist yet, login() and password() will be empty.
903
readAuthInfo( &tmp_share );
904
logins.insert( tmp_share.login(), tmp_share.password() );
907
// Enter authentication information into the dialog
908
if ( !logins.isEmpty() )
910
dlg.setKnownLogins( logins );
914
dlg.setUsername( share->login() );
915
dlg.setPassword( share->password() );
918
dlg.setPrompt( i18n( "<qt>Please enter a username and a password for the share <b>%1</b>.</qt>", share->unc() ) );
920
// Execute the password dialog, retrieve the new authentication
921
// information and save it.
922
if ( (success = dlg.exec()) )
924
share->setLogin( dlg.username() );
925
share->setPassword( dlg.password() );
926
writeAuthInfo( share );
570
prompt = i18n( "<qt>Please enter a user name and a password below.</qt>" );
575
dlg.setPrompt( prompt );
577
// Execute the password dialog, retrieve the new authentication
578
// information and save it.
579
if ( (success = dlg.exec()) )
581
authInfo->setLogin( dlg.username() );
582
authInfo->setPassword( dlg.password() );
584
writeAuthInfo( authInfo );
955
QList<Smb4KAuthInfo *> Smb4KWalletManager::walletEntries()
957
// Initialize the wallet manager. In case the wallet is already
958
// set up, init() will just do nothing.
961
QList<Smb4KAuthInfo *> list;
963
if ( useWalletSystem() && m_wallet )
965
QStringList entries = m_wallet->entryList();
967
if ( !entries.isEmpty() )
969
for ( int i = 0; i < entries.size(); ++i )
971
Smb4KAuthInfo *authInfo = new Smb4KAuthInfo();
973
QMap<QString,QString> map;
974
m_wallet->readMap( entries.at( i ), map );
976
if ( QString::compare( entries.at( i ), "DEFAULT_LOGIN" ) == 0 )
979
authInfo->useDefaultAuthInfo();
980
authInfo->setLogin( map["Login"] );
981
authInfo->setPassword( map["Password"] );
985
authInfo->setURL( QUrl( entries.at( i ) ) );
986
authInfo->setIP( map["IP Address"] );
987
authInfo->setWorkgroupName( map["Workgroup"] );
988
authInfo->setLogin( map["Login"] );
989
authInfo->setPassword( map["Password"] );
1009
void Smb4KWalletManager::writeWalletEntries( const QList<Smb4KAuthInfo *> &entries )
1011
// Initialize the wallet manager. In case the wallet is already
1012
// set up, init() will just do nothing.
1015
if ( useWalletSystem() && m_wallet )
1017
// Clear the wallet.
1018
QStringList entry_list = m_wallet->entryList();
1020
for ( int i = 0; i < entry_list.size(); ++i )
1022
m_wallet->removeEntry( entry_list.at( i ) );
1025
// Write the new entries to the wallet.
1026
for ( int i = 0; i < entries.size(); ++i )
1028
QMap<QString,QString> map;
1030
if ( entries.at( i )->type() == Smb4KAuthInfo::Default )
1033
map["Login"] = entries.at( i )->login();
1034
map["Password"] = entries.at( i )->password();
1035
m_wallet->writeMap( "DEFAULT_LOGIN", map );
1039
map["IP Address"] = entries.at( i )->ip();
1040
map["Workgroup"] = entries.at( i )->workgroupName();
1041
map["Login"] = entries.at( i )->login();
1042
map["Password"] = entries.at( i )->password();
1043
m_wallet->writeMap( entries.at( i )->unc(), map );
603
1058
void Smb4KWalletManager::writeToConfigFile( Smb4KAuthInfo *authInfo )