Changeset 4481:0a8cc5415d9b in roaraudio
- Timestamp:
- 10/11/10 16:15:20 (14 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- roard
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/auth.c
r4478 r4481 36 36 g_auth_keyring[i].type = _NONE; 37 37 } 38 39 // enable guest access.40 if ( auth_addkey_anonymous(ACCLEV_ALL) == -1 )41 return -1;42 38 43 39 #if 0 -
roard/roard.c
r4469 r4481 1395 1395 } 1396 1396 1397 static int auth_setup (enum roard_client_acclev none_acclev, 1398 enum roard_client_acclev trust_acclev, int trust_root, uid_t trust_uid, gid_t trust_gid) { 1399 union auth_typeunion * key; 1400 size_t i; 1401 1402 if ( auth_addkey_anonymous(none_acclev) == -1 ) 1403 return -1; 1404 1405 if ( (key = auth_regkey_simple(ROAR_AUTH_T_TRUST, trust_acclev)) == NULL ) 1406 return -1; 1407 1408 // zerosize all counters. 1409 memset(key, 0, sizeof(union auth_typeunion)); 1410 1411 i = 0; 1412 1413 if ( trust_uid != -1 ) 1414 key->trust.uids[i++] = trust_uid; 1415 1416 #ifdef ROAR_ROOT_UID 1417 if ( trust_root ) 1418 key->trust.uids[i++] = ROAR_ROOT_UID; 1419 #endif 1420 1421 key->trust.uids_len = i; 1422 1423 i = 0; 1424 1425 if ( trust_gid != -1 ) 1426 key->trust.gids[i++] = trust_gid; 1427 1428 key->trust.gids_len = i; 1429 1430 return 0; 1431 } 1432 1397 1433 1398 1434 // MAIN: … … 1455 1491 int m_count = 0; 1456 1492 #endif 1493 enum roard_client_acclev none_acclev = ACCLEV_ALL; 1494 enum roard_client_acclev trust_acclev = ACCLEV_ALL; 1495 int trust_root = 1; 1457 1496 #ifndef ROAR_WITHOUT_DCOMP_LIGHT 1458 1497 int light_channels = LIGHT_CHANNELS_DEFAULT; … … 2503 2542 #endif 2504 2543 2544 // setup auth: 2545 if ( auth_setup(none_acclev, trust_acclev, trust_root, getuid(), getgid()) == -1 ) { 2546 ROAR_ERR("Can not set up auth. Bad."); 2547 alive = 0; 2548 } 2549 2505 2550 // Register with OpenSLP: 2506 2551 #ifdef ROAR_HAVE_LIBSLP
Note: See TracChangeset
for help on using the changeset viewer.