Changeset 4476:f5d7c266e5de in roaraudio for roard/auth.c


Ignore:
Timestamp:
10/11/10 00:39:08 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

implemented auth time NONE and PASSWORD

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/auth.c

    r4474 r4476  
    3838 
    3939 // enable guest access. 
    40  if ( auth_regkey_simple(ROAR_AUTH_T_NONE, ACCLEV_ALL) == NULL ) 
     40 if ( auth_addkey_anonymous(ACCLEV_ALL) == -1 ) 
    4141  return -1; 
     42 
     43#if 0 
     44 // test password for API tests... 
     45 auth_addkey_password(ACCLEV_ALL, "test"); 
     46#endif 
    4247 
    4348 return 0; 
     
    128133} 
    129134 
     135int auth_addkey_anonymous(enum roard_client_acclev acclev) { 
     136 if ( auth_regkey_simple(ROAR_AUTH_T_NONE, acclev) == NULL ) 
     137  return -1; 
     138 return 0; 
     139} 
     140 
     141int auth_addkey_password(enum roard_client_acclev acclev, const char * password) { 
     142 union auth_typeunion * pw; 
     143 
     144 if ( (pw = auth_regkey_simple(ROAR_AUTH_T_PASSWORD, acclev)) == NULL ) 
     145  return -1; 
     146 
     147 pw->password.password = password; 
     148 
     149 return 0; 
     150} 
     151 
    130152//ll 
Note: See TracChangeset for help on using the changeset viewer.