Changeset 746 for vendor/current/source3/passdb
- Timestamp:
- Nov 27, 2012, 4:56:06 PM (13 years ago)
- Location:
- vendor/current/source3/passdb
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/passdb/lookup_sid.c
r740 r746 1438 1438 if (idmap_cache_find_sid2uid(&sids[i], &ids[i].id.uid, 1439 1439 &expired) 1440 && !expired ) {1440 && !expired && ids[i].id.uid != (uid_t)-1) { 1441 1441 ids[i].type = WBC_ID_TYPE_UID; 1442 1442 continue; … … 1444 1444 if (idmap_cache_find_sid2gid(&sids[i], &ids[i].id.gid, 1445 1445 &expired) 1446 && !expired ) {1446 && !expired && ids[i].id.gid != (gid_t)-1) { 1447 1447 ids[i].type = WBC_ID_TYPE_GID; 1448 1448 continue; … … 1491 1491 } 1492 1492 } 1493 1493 1494 done: 1495 for (i=0; i<num_sids; i++) { 1496 switch(ids[i].type) { 1497 case WBC_ID_TYPE_GID: 1498 if (ids[i].id.gid == (gid_t)-1) { 1499 ids[i].type = WBC_ID_TYPE_NOT_SPECIFIED; 1500 } 1501 break; 1502 case WBC_ID_TYPE_UID: 1503 if (ids[i].id.uid == (uid_t)-1) { 1504 ids[i].type = WBC_ID_TYPE_NOT_SPECIFIED; 1505 } 1506 break; 1507 case WBC_ID_TYPE_NOT_SPECIFIED: 1508 break; 1509 } 1510 } 1494 1511 ret = true; 1495 1512 fail: -
vendor/current/source3/passdb/pdb_get_set.c
r740 r746 40 40 41 41 /********************************************************************* 42 Test if a change time is a max value. Copes with old and new values 43 of max. 44 ********************************************************************/ 45 46 bool pdb_is_password_change_time_max(time_t test_time) 47 { 48 if (test_time == get_time_t_max()) { 49 return true; 50 } 51 #if (defined(SIZEOF_TIME_T) && (SIZEOF_TIME_T == 8)) 52 if (test_time == 0x7FFFFFFFFFFFFFFFLL) { 53 return true; 54 } 55 #endif 56 if (test_time == 0x7FFFFFFF) { 57 return true; 58 } 59 return false; 60 } 61 62 /********************************************************************* 63 Return an unchanging version of max password change time - 0x7FFFFFFF. 64 ********************************************************************/ 65 66 time_t pdb_password_change_time_max(void) 67 { 68 return 0x7FFFFFFF; 69 } 70 71 /********************************************************************* 42 72 Collection of get...() functions for struct samu. 43 73 ********************************************************************/ … … 87 117 to indicate that the user cannot change their password. jmcd 88 118 */ 89 if ( sampass->pass_can_change_time == get_time_t_max() &&119 if (pdb_is_password_change_time_max(sampass->pass_can_change_time) && 90 120 IS_SAM_CHANGED(sampass, PDB_CANCHANGETIME)) 91 121 return sampass->pass_can_change_time; … … 113 143 114 144 if (sampass->acct_ctrl & ACB_PWNOEXP) 115 return get_time_t_max();145 return pdb_password_change_time_max(); 116 146 117 147 if (!pdb_get_account_policy(PDB_POLICY_MAX_PASSWORD_AGE, &expire) … … 124 154 bool pdb_get_pass_can_change(const struct samu *sampass) 125 155 { 126 if ( sampass->pass_can_change_time == get_time_t_max())156 if (pdb_is_password_change_time_max(sampass->pass_can_change_time)) 127 157 return False; 128 158 return True; … … 959 989 { 960 990 return pdb_set_pass_can_change_time(sampass, 961 canchange ? 0 : get_time_t_max(),991 canchange ? 0 : pdb_password_change_time_max(), 962 992 PDB_CHANGED); 963 993 } -
vendor/current/source3/passdb/pdb_interface.c
r740 r746 185 185 186 186 if ( pdb && reload ) { 187 pdb->free_private_data( &(pdb->private_data) ); 187 if (pdb->free_private_data != NULL) { 188 pdb->free_private_data( &(pdb->private_data) ); 189 } 188 190 if ( !NT_STATUS_IS_OK( make_pdb_method_name( &pdb, lp_passdb_backend() ) ) ) { 189 191 char *msg = NULL; -
vendor/current/source3/passdb/pdb_ldap.c
r740 r746 3038 3038 DEBUG(3, ("primary group of [%s] not found\n", 3039 3039 pdb_get_username(user))); 3040 ret = NT_STATUS_INTERNAL_DB_CORRUPTION; 3040 3041 goto done; 3041 3042 } -
vendor/current/source3/passdb/proto.h
r740 r746 113 113 /* The following definitions come from passdb/pdb_get_set.c */ 114 114 115 bool pdb_is_password_change_time_max(time_t test_time); 115 116 uint32_t pdb_get_acct_ctrl(const struct samu *sampass); 116 117 time_t pdb_get_logon_time(const struct samu *sampass);
Note:
See TracChangeset
for help on using the changeset viewer.