Changeset 4476:f5d7c266e5de in roaraudio


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

implemented auth time NONE and PASSWORD

Location:
roard
Files:
2 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 
  • roard/include/auth.h

    r4474 r4476  
    4949 
    5050struct at_password { 
    51  char * password; 
     51 const char * password; 
    5252}; 
    5353 
     
    7474int auth_client_ckeck(struct roar_client_server * cs, struct roar_auth_message * authmes); 
    7575 
     76 
     77int auth_addkey_anonymous(enum roard_client_acclev acclev); 
     78int auth_addkey_password(enum roard_client_acclev acclev, const char * password); 
     79 
    7680#endif 
    7781 
Note: See TracChangeset for help on using the changeset viewer.