#include <AccessList.h>
Public Member Functions | |
| Authentication () | |
| void | set (const std::string &AuthString) |
| const std::string & | getType (void) |
| const std::string & | getField (int nr) |
| int | getNrOfFields (void) |
| void | modifyField (unsigned int nr, const char *v) |
| void | modify (unsigned int start, Authentication &source) |
| void | appendField (const char *v) |
| void | printParameters (std::ostream *pOut) const |
| int | typeEqual (const std::string &v) |
Private Attributes | |
| std::vector< std::string > | fields |
| string | defAuth |
|
|
Definition at line 42 of file AccessList.h. References defAuth.
00042 : defAuth("none"){}; |
|
|
Definition at line 230 of file AccessList.h. References fields. Referenced by check_auth_file().
00231 {
00232 fields.push_back (v);
00233 }
|
|
|
Definition at line 199 of file AccessList.h. References fields. Referenced by check_auth_file(), and check_auth_unix().
00200 {
00201 return fields[nr];
00202 }
|
|
|
Definition at line 203 of file AccessList.h. References fields. Referenced by nnrpd().
00204 {
00205 return fields.size();
00206 }
|
|
|
Definition at line 190 of file AccessList.h. References defAuth, and fields. Referenced by check_authentication(), and nnrpd().
|
|
||||||||||||
|
Definition at line 321 of file AccessList.cc. References fields.
00322 {
00323 unsigned int i;
00324 vector<string>::iterator sp, se;
00325 vector<string>::iterator dp, de;
00326
00327 sp = source.fields.begin();
00328 se = source.fields.end();
00329 dp = fields.begin();
00330 de = fields.end();
00331
00332 for (i=0; sp != se && dp != de; i++) {
00333 if (dp == de) {
00334 if (i>=start)
00335 fields.push_back (*sp);
00336 sp++;
00337 } else if (sp == se) {
00338 if (i>=start)
00339 fields.push_back (string(""));
00340 dp++;
00341 } else {
00342 if (i>=start)
00343 (*dp) += (*sp);
00344 sp++; dp++;
00345 }
00346 }
00347 }
|
|
||||||||||||
|
Definition at line 222 of file AccessList.h. References fields.
|
|
|
Definition at line 302 of file AccessList.cc. References fields. Referenced by operator<<(), and AccessEntry::printParameters().
|
|
|
Definition at line 274 of file AccessList.cc. References fields. Referenced by check_auth_file(), and AccessList::readClient().
00275 {
00276 string::size_type beg=0, end=0;
00277
00278 fields.clear();
00279
00280 if (AuthString.length() == 0) {
00281 return;
00282 }
00283
00284 do {
00285 if ((end=AuthString.find(":",beg)) == string::npos) {
00286 end=AuthString.length();
00287 }
00288 if (end>beg) {
00289 fields.push_back (AuthString.substr(beg, end-beg));
00290 } else {
00291 fields.push_back (string(""));
00292 }
00293 beg=++end;
00294 } while (end<AuthString.length());
00295
00296 // empty field at the end of AuthString?
00297 if (AuthString[AuthString.length()-1] == ':') {
00298 fields.push_back (string(""));
00299 }
00300 }
|
|
|
Definition at line 349 of file AccessList.cc. References fields. Referenced by check_auth_file(), and check_auth_unix().
00350 {
00351 const char *s = fields[0].c_str();
00352 const char *p = v.c_str();
00353
00354 while (*s!='\0') {
00355 if (*p=='\0')
00356 return -1;
00357 if (*s!=*p)
00358 return -1;
00359 s++; p++;
00360 }
00361 if (*p=='\0' || *p==':')
00362 return 0;
00363 else
00364 return -1;
00365
00366 }
|
|
|
Definition at line 102 of file AccessList.h. Referenced by Authentication(), and getType(). |
|
|
Definition at line 101 of file AccessList.h. Referenced by appendField(), getField(), getNrOfFields(), getType(), modify(), modifyField(), printParameters(), set(), and typeEqual(). |
1.3.6-20040222