Changeset 4985

Show
Ignore:
Timestamp:
10/20/07 21:18:52 (1 year ago)
Author:
morris
Message:

Fix setting of account password

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wired/trunk/wired/accounts.c

    r4809 r4985  
    5353static void                                                     wd_accounts_reload_account_for_user(wd_account_t *, wd_user_t *); 
    5454static void                                                     wd_accounts_sreply_privileges(wd_user_t *); 
    55 static void                                                     wd_accounts_copy_privileges(wd_account_t *, wd_account_t *); 
     55static void                                                     wd_accounts_copy_attributes(wd_account_t *, wd_account_t *); 
    5656 
    5757static void                                                     wd_account_dealloc(wi_runtime_instance_t *); 
     
    9595                 
    9696                if(group) 
    97                         wd_accounts_copy_privileges(group, user); 
     97                        wd_accounts_copy_attributes(group, user); 
    9898        } 
    9999         
     
    288288                return false; 
    289289         
    290         wd_accounts_copy_privileges(account, existing_account); 
     290        wd_accounts_copy_attributes(account, existing_account); 
    291291 
    292292        if(!wd_accounts_create_user(existing_account)) 
     
    313313                return false; 
    314314         
    315         wd_accounts_copy_privileges(account, existing_account); 
     315        wd_accounts_copy_attributes(account, existing_account); 
    316316 
    317317        if(!wd_accounts_create_group(existing_account)) 
     
    664664 
    665665 
    666 static void wd_accounts_copy_privileges(wd_account_t *src_account, wd_account_t *dst_account) { 
     666static void wd_accounts_copy_attributes(wd_account_t *src_account, wd_account_t *dst_account) { 
     667        if(src_account->password) { 
     668                wi_release(dst_account->password); 
     669                dst_account->password           = wi_retain(src_account->password); 
     670        } 
     671         
    667672        if(src_account->group) { 
    668673                wi_release(dst_account->group);