Changeset 4809
- Timestamp:
- 05/31/07 00:04:20 (1 year ago)
- Files:
-
- wired/trunk/wired/accounts.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
wired/trunk/wired/accounts.c
r4786 r4809 51 51 static void wd_accounts_reload_account_with_user(wi_string_t *); 52 52 static void wd_accounts_reload_account_with_group(wi_string_t *); 53 static void wd_accounts_reload_account_for_user(wd_ user_t *);53 static void wd_accounts_reload_account_for_user(wd_account_t *, wd_user_t *); 54 54 static void wd_accounts_sreply_privileges(wd_user_t *); 55 55 static void wd_accounts_copy_privileges(wd_account_t *, wd_account_t *); … … 506 506 wi_enumerator_t *enumerator; 507 507 wd_user_t *user; 508 wd_account_t *account; 508 509 509 510 wi_hash_rdlock(wd_users); … … 511 512 enumerator = wi_hash_data_enumerator(wd_users); 512 513 513 while((user = wi_enumerator_next_data(enumerator))) 514 wd_accounts_reload_account_for_user(user); 514 while((user = wi_enumerator_next_data(enumerator))) { 515 account = wd_user_account(user); 516 517 if(account) 518 wd_accounts_reload_account_for_user(account, user); 519 } 515 520 516 521 wi_hash_unlock(wd_users); … … 571 576 account = wd_user_account(user); 572 577 573 if( wi_is_equal(account->name, name))574 wd_accounts_reload_account_for_user( user);578 if(account && wi_is_equal(account->name, name)) 579 wd_accounts_reload_account_for_user(account, user); 575 580 } 576 581 … … 592 597 account = wd_user_account(user); 593 598 594 if( wi_is_equal(account->group, name))595 wd_accounts_reload_account_for_user( user);599 if(account && wi_is_equal(account->group, name)) 600 wd_accounts_reload_account_for_user(account, user); 596 601 } 597 602 … … 601 606 602 607 603 static void wd_accounts_reload_account_for_user(wd_ user_t *user) {604 wd_account_t * account, *new_account;608 static void wd_accounts_reload_account_for_user(wd_account_t *account, wd_user_t *user) { 609 wd_account_t *new_account; 605 610 wi_boolean_t admin, new_admin; 606 611 607 account = wd_user_account(user);608 612 new_account = wd_accounts_read_user_and_group(account->name); 609 613 610 if(! account)614 if(!new_account) 611 615 return; 612 616
