libzypp: zypp-media/auth/credentialmanager.cc Source File

libzypp 17.38.8

credentialmanager.cc
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12
13#include "credentialmanager.h"
14
15#include <iostream>
16#include <fstream>
17
18#include <utility>
19#include <zypp-media/MediaConfig>
20#include <zypp-core/base/Function.h>
21#include <zypp-core/base/LogTools.h>
22#include <zypp-core/base/Easy.h>
23#include <zypp-core/fs/PathInfo.h>
24
25#include <zypp-media/auth/CredentialFileReader>
26#include <zypp-media/MediaException>
27
28#include <boost/interprocess/sync/file_lock.hpp>
29#include <boost/interprocess/sync/scoped_lock.hpp>
30#include <boost/interprocess/sync/sharable_lock.hpp>
31
32namespace bpci = boost::interprocess;
33
34
35using std::endl;
36
37#define USER_CREDENTIALS_FILE ".zypp/credentials.cat"
38
40namespace zypp
41{
43 namespace media
44 {
45
47 //
48 // CLASS NAME : AuthDataComparator
49 //
51
52 bool AuthDataComparator::operator()( const AuthData_Ptr & lhs, const AuthData_Ptr & rhs ) const
53 {
54 static const url::ViewOption vopt = url::ViewOption::DEFAULTS
55 - url::ViewOption::WITH_USERNAME
56 - url::ViewOption::WITH_PASSWORD
57 - url::ViewOption::WITH_QUERY_STR;
58 // std::less semantic!
59 int cmp = lhs->url().asString(vopt).compare( rhs->url().asString(vopt) );
60 if ( ! cmp )
61 cmp = lhs->username().compare( rhs->username() );
62 return( cmp < 0 );
63 }
64
66 //
67 // CLASS NAME : CredManagerOptions
68 //
70
71 CredManagerOptions::CredManagerOptions(const Pathname & rootdir)
72 : globalCredFilePath(rootdir / MediaConfig::instance().credentialsGlobalFile())
73 , customCredFileDir(rootdir / MediaConfig::instance().credentialsGlobalDir())
74 {
75 char * homedir = getenv("HOME");
76 if (homedir)
77 userCredFilePath = rootdir / homedir / USER_CREDENTIALS_FILE;
78 }
79
80
82 //
83 // CLASS NAME : CredentialManager::Impl
84 //
85 struct CredentialManager::Impl
86 {
87 Impl(CredManagerOptions &&options);
88
89 Impl(const Impl &) = delete;
90 Impl(Impl &&) = delete;
91 Impl &operator=(const Impl &) = delete;
92 Impl &operator=(Impl &&) = delete;
93
94 ~Impl()
95 {}
96
97 void init_globalCredentials();
98 void init_userCredentials();
99
100 bool processCredentials(AuthData_Ptr & cred);
101
102 AuthData_Ptr getCred(const Url & url) const;
103 AuthData_Ptr getCredFromFile(const Pathname & file);
104 void saveGlobalCredentials();
105 void saveUserCredentials();
106
107
108 CredManagerOptions _options;
109
110 CredentialSet _credsGlobal;
111 CredentialSet _credsUser;
112 CredentialSet _credsTmp;
113
114 bool _globalDirty;
115 bool _userDirty;
116 };
117
118
119
121 //
122 // CLASS NAME : CredentialManager::Impl
123 //
125
126 CredentialManager::Impl::Impl(CredManagerOptions &&options)
127 : _options(std::move(options))
128 , _globalDirty(false)
129 , _userDirty(false)
130 {
131 init_globalCredentials();
132 init_userCredentials();
133 }
134
135
136 void CredentialManager::Impl::init_globalCredentials()
137 {
138 if (_options.globalCredFilePath.empty())
139 DBG << "global cred file not known" << endl;
140 else if (PathInfo(_options.globalCredFilePath).isExist())
141 {
142 /* list<Pathname> entries;
143 if (filesystem::readdir(entries, _options.globalCredFilePath, false) != 0)
144 ZYPP_THROW(Exception("failed to read directory"));
145
146 for_(it, entries.begin(), entries.end())*/
147
148 CredentialFileReader(_options.globalCredFilePath,
149 bind(&Impl::processCredentials, this, _1));
150 }
151 else
152 DBG << "global cred file does not exist (" << _options.globalCredFilePath << ")" << endl;
153
154 _credsGlobal = _credsTmp; _credsTmp.clear();
155 DBG << "Got " << _credsGlobal.size() << " global records." << endl;
156 }
157
158
159 void CredentialManager::Impl::init_userCredentials()
160 {
161 if (_options.userCredFilePath.empty())
162 DBG << "user cred file not known" << endl;
163 else if (PathInfo(_options.userCredFilePath).isExist())
164 {
165 /* list<Pathname> entries;
166 if (filesystem::readdir(entries, _options.userCredFilePath, false ) != 0)
167 ZYPP_THROW(Exception("failed to read directory"));
168
169 for_(it, entries.begin(), entries.end())*/
170 CredentialFileReader(_options.userCredFilePath,
171 bind(&Impl::processCredentials, this, _1));
172 }
173 else
174 DBG << "user cred file does not exist (" << _options.userCredFilePath << ")" << endl;
175
176 _credsUser = _credsTmp; _credsTmp.clear();
177 DBG << "Got " << _credsUser.size() << " user records." << endl;
178 }
179
180
181 bool CredentialManager::Impl::processCredentials(AuthData_Ptr & cred)
182 {
183 _credsTmp.insert(cred);
184 return true;
185 }
186
187
188 AuthData_Ptr CredentialManager::findIn(const CredentialManager::CredentialSet & set,
189 const Url & url,
190 url::ViewOption vopt)
191 {
192 const std::string & username = url.getUsername();
193 for( CredentialManager::CredentialIterator it = set.begin(); it != set.end(); ++it )
194 {
195 if ( !(*it)->url().isValid() )
196 continue;
197
198 // this ignores url params - not sure if it is good or bad...
199 if ( url.asString(vopt).find((*it)->url().asString(vopt)) == 0 )
200 {
201 if ( username.empty() || username == (*it)->username() )
202 return *it;
203 }
204 }
205
206 return AuthData_Ptr();
207 }
208
209 AuthData_Ptr CredentialManager::Impl::getCred(const Url & url) const
210 {
211 AuthData_Ptr result;
212
213 // compare the urls via asString(), but ignore password
214 // default url::ViewOption will take care of that.
215 // operator==(Url,Url) compares the whole Url
216
217 url::ViewOption vopt;
218 vopt = vopt
219 - url::ViewOption::WITH_USERNAME
220 - url::ViewOption::WITH_PASSWORD
221 - url::ViewOption::WITH_QUERY_STR;
222
223 // search in global credentials
224 result = findIn(_credsGlobal, url, vopt);
225
226 // search in home credentials
227 if (!result)
228 result = findIn(_credsUser, url, vopt);
229
230 if (result)
231 DBG << "Found credentials for '" << url << "':" << endl << *result << endl;
232 else
233 DBG << "No credentials for '" << url << "'" << endl;
234
235 return result;
236 }
237
238
239 AuthData_Ptr CredentialManager::Impl::getCredFromFile(const Pathname & file)
240 {
241 AuthData_Ptr result;
242
243 Pathname credfile;
244 if (file.absolute())
245 // get from that file
246 credfile = file;
247 else
248 // get from /etc/zypp/credentials.d, delete the leading path
249 credfile = _options.customCredFileDir / file.basename();
250
251 PathInfo pi { credfile };
252 if ( pi.userMayR() ) try {
253 // make sure only our thread accesses the file
254 bpci::file_lock lockFile ( credfile.c_str() );
255 bpci::scoped_lock lock( lockFile );
256
257 CredentialFileReader(credfile, bind(&Impl::processCredentials, this, _1));
258 }
259 catch ( ... ) {
260 WAR << pi << " failed to lock file for reading." << endl;
261 }
262
263 if (_credsTmp.empty())
264 WAR << pi << " does not contain valid credentials or is not readable." << endl;
265 else
266 {
267 result = *_credsTmp.begin();
268 _credsTmp.clear();
269 }
270
271 return result;
272 }
273
274 static int save_creds_in_file(
275 CredentialManager::CredentialSet &creds,
276 const Pathname & file,
277 const mode_t mode)
278 {
279 int ret = 0;
280 filesystem::assert_file_mode( file, mode );
281
282 const auto now = time( nullptr );
283
284 PathInfo pi { file };
285 if ( pi.userMayRW() ) try {
286 // make sure only our thread accesses the file
287 bpci::file_lock lockFile ( file.c_str() );
288 bpci::scoped_lock lock( lockFile );
289
290 std::ofstream fs(file.c_str());
291 for ( auto& credentials : creds )
292 {
293 credentials->dumpAsIniOn( fs );
294 credentials->setLastDatabaseUpdate( now );
295 fs << endl;
296 }
297 if ( !fs ) {
298 WAR << pi << " failed to write credentials to file." << endl;
299 ret = 1;
300 }
301 fs.close();
302 }
303 catch ( ... ) {
304 WAR << pi << " failed to lock file for writing." << endl;
305 ret = 1;
306 }
307
308 return ret;
309 }
310
311 void CredentialManager::Impl::saveGlobalCredentials()
312 {
313 save_creds_in_file(_credsGlobal, _options.globalCredFilePath, 0640);
314 pDBG( "Saved", _credsGlobal.size(), "global records." );
315 }
316
317 void CredentialManager::Impl::saveUserCredentials()
318 {
319 save_creds_in_file(_credsUser, _options.userCredFilePath, 0600);
320 pDBG( "Saved", _credsUser.size(), "user records." );
321 }
322
323
325 //
326 // CLASS NAME : CredentialManager
327 //
329
330 CredentialManager::CredentialManager(CredManagerOptions opts)
331 : _pimpl(new Impl(std::move(opts)))
332 {}
333
334
335 AuthData_Ptr CredentialManager::getCred(const Url & url)
336 {
337 std::string credfile = url.getQueryParam("credentials");
338 if (credfile.empty())
339 return _pimpl->getCred(url);
340 return _pimpl->getCredFromFile(credfile);
341 }
342
343
344 AuthData_Ptr CredentialManager::getCredFromFile(const Pathname & file)
345 { return _pimpl->getCredFromFile(file); }
346
347
348 void CredentialManager::addCred(const AuthData & cred)
349 {
350 if ( !cred.url().isValid() )
351 ZYPP_THROW( MediaInvalidCredentialsException( "URL must be valid in order to save AuthData." ) );
352
353 Pathname credfile = cred.url().getQueryParam("credentials");
354 if (credfile.empty())
356 addUserCred(cred);
357 else
358 saveInFile(cred, credfile);
359 }
360
361 time_t CredentialManager::timestampForCredDatabase ( const zypp::Url &url )
362 {
363 Pathname credfile;
364 if ( url.isValid() ) {
365 credfile = url.getQueryParam("credentials");
366 }
367
368 if (credfile.empty())
369 credfile = _pimpl->_options.userCredFilePath;
370
371 zypp::PathInfo pi(credfile);
372 if ( pi.isExist() && pi.isFile() )
373 return pi.mtime();
374
375 return 0;
376 }
377
378 void CredentialManager::addGlobalCred(const AuthData & cred)
379 {
380 if ( !cred.url().isValid() )
381 ZYPP_THROW( MediaInvalidCredentialsException( "URL must be valid in order to save AuthData." ) );
382
383 AuthData_Ptr c_ptr;
384 c_ptr.reset(new AuthData(cred)); // FIX for child classes if needed
385 std::pair<CredentialIterator, bool> ret = _pimpl->_credsGlobal.insert(c_ptr);
386 if (ret.second)
387 _pimpl->_globalDirty = true;
388 else if ((*ret.first)->password() != cred.password())
389 {
390 _pimpl->_credsGlobal.erase(ret.first);
391 _pimpl->_credsGlobal.insert(c_ptr);
392 _pimpl->_globalDirty = true;
393 }
394 }
395
396
397 void CredentialManager::addUserCred(const AuthData & cred)
398 {
399 if ( !cred.url().isValid() )
400 ZYPP_THROW( MediaInvalidCredentialsException( "URL must be valid in order to save AuthData." ) );
401
402 AuthData_Ptr c_ptr;
403 c_ptr.reset(new AuthData(cred)); // FIX for child classes if needed
404 std::pair<CredentialIterator, bool> ret = _pimpl->_credsUser.insert(c_ptr);
405 if (ret.second)
406 _pimpl->_userDirty = true;
407 else if ((*ret.first)->password() != cred.password())
408 {
409 _pimpl->_credsUser.erase(ret.first);
410 _pimpl->_credsUser.insert(c_ptr);
411 _pimpl->_userDirty = true;
412 }
413 }
414
415
416 void CredentialManager::save()
417 {
418 if (_pimpl->_globalDirty)
419 _pimpl->saveGlobalCredentials();
420 if (_pimpl->_userDirty)
421 _pimpl->saveUserCredentials();
422 _pimpl->_globalDirty = false;
423 _pimpl->_userDirty = false;
424 }
425
426
427 void CredentialManager::saveInGlobal(const AuthData & cred)
428 {
429 addGlobalCred(cred);
430 save();
431 }
432
433
434 void CredentialManager::saveInUser(const AuthData & cred)
435 {
436 addUserCred(cred);
437 save();
438 }
439
440
441 void CredentialManager::saveInFile(const AuthData & cred, const Pathname & credFile)
442 {
443 AuthData_Ptr c_ptr;
444 c_ptr.reset(new AuthData(cred)); // FIX for child classes if needed
445 c_ptr->setUrl(Url()); // don't save url in custom creds file
446 CredentialManager::CredentialSet creds;
447 creds.insert(c_ptr);
448
449 int ret = 0;
450 if (credFile.absolute())
451 ret = save_creds_in_file(creds, credFile, 0640);
452 else
453 ret = save_creds_in_file(
454 creds, _pimpl->_options.customCredFileDir / credFile, 0600);
455
456 if (!ret)
457 {
459 ERR << "error saving the credentials" << endl;
460 }
461 }
462
463
464 void CredentialManager::clearAll(bool global)
465 {
466 if (global)
467 {
468 if (!filesystem::unlink(_pimpl->_options.globalCredFilePath))
469 ERR << "could not delete user credentials file "
470 << _pimpl->_options.globalCredFilePath << endl;
471 _pimpl->_credsUser.clear();
472 }
473 else
474 {
475 if (!filesystem::unlink(_pimpl->_options.userCredFilePath))
476 ERR << "could not delete global credentials file"
477 << _pimpl->_options.userCredFilePath << endl;
478 _pimpl->_credsGlobal.clear();
479 }
480 }
481
482
483 CredentialManager::CredentialIterator CredentialManager::credsGlobalBegin() const
484 { return _pimpl->_credsGlobal.begin(); }
485
486 CredentialManager::CredentialIterator CredentialManager::credsGlobalEnd() const
487 { return _pimpl->_credsGlobal.end(); }
488
489 CredentialManager::CredentialSize CredentialManager::credsGlobalSize() const
490 { return _pimpl->_credsGlobal.size(); }
491
492 bool CredentialManager::credsGlobalEmpty() const
493 { return _pimpl->_credsGlobal.empty(); }
494
495
496 CredentialManager::CredentialIterator CredentialManager::credsUserBegin() const
497 { return _pimpl->_credsUser.begin(); }
498
499 CredentialManager::CredentialIterator CredentialManager::credsUserEnd() const
500 { return _pimpl->_credsUser.end(); }
501
502 CredentialManager::CredentialSize CredentialManager::credsUserSize() const
503 { return _pimpl->_credsUser.size(); }
504
505 bool CredentialManager::credsUserEmpty() const
506 { return _pimpl->_credsUser.empty(); }
507
508
510 } // media
513} // zypp
Easy.h
ZYPP_THROW
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.
Definition Exception.h:459
Function.h
LogTools.h
pDBG
#define pDBG
Definition LogTools.h:304
DBG
#define DBG
Definition Logger.h:102
ERR
#define ERR
Definition Logger.h:105
WAR
#define WAR
Definition Logger.h:104
zypp::MediaConfig
Definition mediaconfig.h:43
zypp::Url
Url manipulation class.
Definition Url.h:93
zypp::Url::getQueryParam
std::string getQueryParam(const std::string &param, EEncoding eflag=zypp::url::E_DECODED) const
Return the value for the specified query parameter.
Definition Url.cc:687
zypp::Url::isValid
bool isValid() const
Verifies the Url.
Definition Url.cc:516
zypp::filesystem::PathInfo
Wrapper class for stat/lstat.
Definition PathInfo.h:226
zypp::filesystem::PathInfo::userMayR
bool userMayR() const
Definition PathInfo.h:353
zypp::filesystem::PathInfo::userMayRW
bool userMayRW() const
Definition PathInfo.h:357
zypp::filesystem::PathInfo::mtime
time_t mtime() const
Definition PathInfo.h:384
zypp::filesystem::PathInfo::isFile
bool isFile() const
Definition PathInfo.h:295
zypp::filesystem::PathInfo::isExist
bool isExist() const
Return whether valid stat info exists.
Definition PathInfo.h:286
zypp::filesystem::Pathname
Pathname.
Definition Pathname.h:48
zypp::filesystem::Pathname::absolute
bool absolute() const
Test for an absolute path.
Definition Pathname.h:119
zypp::filesystem::Pathname::c_str
const char * c_str() const
String representation.
Definition Pathname.h:113
zypp::filesystem::Pathname::basename
std::string basename() const
Return the last component of this path.
Definition Pathname.h:137
zypp::filesystem::Pathname::empty
bool empty() const
Test for an empty path.
Definition Pathname.h:117
zypp::media::AuthData
Class for handling media authentication data.
Definition authdata.h:31
zypp::media::AuthData::password
std::string password() const
Definition authdata.h:57
zypp::media::AuthData::url
Url url() const
Definition authdata.h:55
zypp::media::CredentialFileReader
Parse credentials files and catalogs.
Definition credentialfilereader.h:31
zypp::media::CredentialManager::credsUserSize
CredentialSize credsUserSize() const
Definition credentialmanager.cc:502
zypp::media::CredentialManager::save
void save()
Saves any unsaved credentials added via addUserCred() or addGlobalCred() methods.
Definition credentialmanager.cc:416
zypp::media::CredentialManager::getCredFromFile
AuthData_Ptr getCredFromFile(const Pathname &file)
Read credentials from a file.
Definition credentialmanager.cc:344
zypp::media::CredentialManager::credsGlobalBegin
CredentialIterator credsGlobalBegin() const
Definition credentialmanager.cc:483
zypp::media::CredentialManager::credsUserBegin
CredentialIterator credsUserBegin() const
Definition credentialmanager.cc:496
zypp::media::CredentialManager::timestampForCredDatabase
time_t timestampForCredDatabase(const zypp::Url &url)
Definition credentialmanager.cc:361
zypp::media::CredentialManager::saveInUser
void saveInUser(const AuthData &cred)
Saves given cred to user's credentials file.
Definition credentialmanager.cc:434
zypp::media::CredentialManager::getCred
AuthData_Ptr getCred(const Url &url)
Get credentials for the specified url.
Definition credentialmanager.cc:335
zypp::media::CredentialManager::addUserCred
void addUserCred(const AuthData &cred)
Add new user credentials.
Definition credentialmanager.cc:397
zypp::media::CredentialManager::credsGlobalEmpty
bool credsGlobalEmpty() const
Definition credentialmanager.cc:492
zypp::media::CredentialManager::findIn
static AuthData_Ptr findIn(const CredentialManager::CredentialSet &set, const Url &url, url::ViewOption vopt)
Definition credentialmanager.cc:188
zypp::media::CredentialManager::CredentialManager
CredentialManager(CredManagerOptions opts=CredManagerOptions())
Definition credentialmanager.cc:330
zypp::media::CredentialManager::CredentialSet
std::set< AuthData_Ptr, AuthDataComparator > CredentialSet
Definition credentialmanager.h:66
zypp::media::CredentialManager::credsUserEmpty
bool credsUserEmpty() const
Definition credentialmanager.cc:505
zypp::media::CredentialManager::saveInFile
void saveInFile(const AuthData &, const Pathname &credFile)
Saves given cred to user specified credentials file.
Definition credentialmanager.cc:441
zypp::media::CredentialManager::credsGlobalEnd
CredentialIterator credsGlobalEnd() const
Definition credentialmanager.cc:486
zypp::media::CredentialManager::_pimpl
RW_pointer< Impl > _pimpl
Definition credentialmanager.h:184
zypp::media::CredentialManager::credsUserEnd
CredentialIterator credsUserEnd() const
Definition credentialmanager.cc:499
zypp::media::CredentialManager::credsGlobalSize
CredentialSize credsGlobalSize() const
Definition credentialmanager.cc:489
zypp::media::CredentialManager::addCred
void addCred(const AuthData &cred)
Add new credentials with user callbacks.
Definition credentialmanager.cc:348
zypp::media::CredentialManager::addGlobalCred
void addGlobalCred(const AuthData &cred)
Add new global credentials.
Definition credentialmanager.cc:378
zypp::media::CredentialManager::CredentialSize
CredentialSet::size_type CredentialSize
Definition credentialmanager.h:67
zypp::media::CredentialManager::CredentialIterator
CredentialSet::const_iterator CredentialIterator
Definition credentialmanager.h:68
zypp::media::CredentialManager::saveInGlobal
void saveInGlobal(const AuthData &cred)
Saves given cred to global credentials file.
Definition credentialmanager.cc:427
zypp::media::CredentialManager::clearAll
void clearAll(bool global=false)
Remove all global or user credentials from memory and disk.
Definition credentialmanager.cc:464
zypp::media::MediaInvalidCredentialsException
Definition mediaexception.h:559
USER_CREDENTIALS_FILE
#define USER_CREDENTIALS_FILE
Definition credentialmanager.cc:37
credentialmanager.h
std
Definition ansi.h:855
zypp::filesystem::assert_file_mode
int assert_file_mode(const Pathname &path, unsigned mode)
Like assert_file but enforce mode even if the file already exists.
Definition PathInfo.cc:1224
zypp::filesystem::unlink
int unlink(const Pathname &path)
Like 'unlink'.
Definition PathInfo.cc:719
zypp::media::AuthData_Ptr
shared_ptr< AuthData > AuthData_Ptr
Definition authdata.h:81
zypp::media::save_creds_in_file
static int save_creds_in_file(CredentialManager::CredentialSet &creds, const Pathname &file, const mode_t mode)
Definition credentialmanager.cc:274
zypp::url
Url details namespace.
Definition UrlBase.cc:58
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition CodePitfalls.doc:2
zypp::media::AuthDataComparator::operator()
bool operator()(const AuthData_Ptr &lhs, const AuthData_Ptr &rhs) const
Definition credentialmanager.cc:52
zypp::media::CredManagerOptions
Definition credentialmanager.h:40
zypp::media::CredManagerOptions::globalCredFilePath
Pathname globalCredFilePath
Definition credentialmanager.h:43
zypp::media::CredManagerOptions::customCredFileDir
Pathname customCredFileDir
Definition credentialmanager.h:45
zypp::media::CredManagerOptions::CredManagerOptions
CredManagerOptions(const Pathname &rootdir="")
Definition credentialmanager.cc:71
zypp::media::CredManagerOptions::userCredFilePath
Pathname userCredFilePath
Definition credentialmanager.h:44
zypp::media::CredentialManager::Impl
Definition credentialmanager.cc:86
zypp::media::CredentialManager::Impl::_options
CredManagerOptions _options
Definition credentialmanager.cc:108
zypp::media::CredentialManager::Impl::~Impl
~Impl()
Definition credentialmanager.cc:94
zypp::media::CredentialManager::Impl::init_userCredentials
void init_userCredentials()
Definition credentialmanager.cc:159
zypp::media::CredentialManager::Impl::getCred
AuthData_Ptr getCred(const Url &url) const
Definition credentialmanager.cc:209
zypp::media::CredentialManager::Impl::_credsUser
CredentialSet _credsUser
Definition credentialmanager.cc:111
zypp::media::CredentialManager::Impl::operator=
Impl & operator=(const Impl &)=delete
zypp::media::CredentialManager::Impl::_credsGlobal
CredentialSet _credsGlobal
Definition credentialmanager.cc:110
zypp::media::CredentialManager::Impl::_userDirty
bool _userDirty
Definition credentialmanager.cc:115
zypp::media::CredentialManager::Impl::Impl
Impl(CredManagerOptions &&options)
Definition credentialmanager.cc:126
zypp::media::CredentialManager::Impl::_globalDirty
bool _globalDirty
Definition credentialmanager.cc:114
zypp::media::CredentialManager::Impl::saveUserCredentials
void saveUserCredentials()
Definition credentialmanager.cc:317
zypp::media::CredentialManager::Impl::processCredentials
bool processCredentials(AuthData_Ptr &cred)
Definition credentialmanager.cc:181
zypp::media::CredentialManager::Impl::saveGlobalCredentials
void saveGlobalCredentials()
Definition credentialmanager.cc:311
zypp::media::CredentialManager::Impl::init_globalCredentials
void init_globalCredentials()
Definition credentialmanager.cc:136
zypp::media::CredentialManager::Impl::Impl
Impl(Impl &&)=delete
zypp::media::CredentialManager::Impl::getCredFromFile
AuthData_Ptr getCredFromFile(const Pathname &file)
Definition credentialmanager.cc:239
zypp::media::CredentialManager::Impl::operator=
Impl & operator=(Impl &&)=delete
zypp::media::CredentialManager::Impl::_credsTmp
CredentialSet _credsTmp
Definition credentialmanager.cc:112
zypp::media::CredentialManager::Impl::Impl
Impl(const Impl &)=delete
zypp::url::ViewOption
Url::asString() view options.
Definition UrlBase.h:41
PathInfo.h