Changeset 4792:a9cb74d9acb5 in roaraudio for roard
- Timestamp:
- 03/14/11 14:17:01 (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/roard.c
r4790 r4792 196 196 " --no-trust-root - Don't trust root user\n" 197 197 " --authfile-gen FILE - Generate an new authfile\n" 198 //" --authfile-load FILE - Load an authfile\n"198 " --authfile-load FILE - Load an authfile\n" 199 199 " --authfile-type TYPE - Type of authfile\n" 200 200 " --authfile-acclev ACCLEV\n" … … 1375 1375 int af_type = ROAR_AUTHFILE_TYPE_AUTO; 1376 1376 void * keydata; 1377 int i; 1377 1378 1378 1379 if ( type == NULL ) { … … 1442 1443 return 0; 1443 1444 break; 1445 case AF_MODE_LOAD: 1446 if ( (authfile = roar_authfile_open(af_type, file, 0, ROAR_AUTHFILE_VERSION_AUTO)) == NULL ) { 1447 return -1; 1448 } 1449 1450 for (i = 0; ; i++) { 1451 key = roar_authfile_lookup_key(authfile, ROAR_AUTH_T_AUTO, i, NULL); 1452 if ( key == NULL ) 1453 break; 1454 1455 if ( key->type == ROAR_AUTH_T_COOKIE ) { 1456 keydata = roar_mm_memdup(key->data, key->len); 1457 1458 if ( keydata == NULL ) { 1459 ROAR_WARN("add_authfile(*): Can not allocate memory for key."); 1460 } else if ( auth_addkey_cookie(acclev, keydata, key->len) == -1 ) { 1461 ROAR_WARN("add_authfile(*): Can not add key to internal key storage."); 1462 } 1463 } else { 1464 ROAR_WARN("add_authfile(*): Unknown key type: %i", key->type); 1465 } 1466 1467 roar_authfile_key_unref(key); 1468 } 1469 1470 if ( roar_authfile_close(authfile) != 0 ) 1471 return -1; 1472 return 0; 1473 break; 1444 1474 } 1445 1475
Note: See TracChangeset
for help on using the changeset viewer.