Ignore:
Timestamp:
Nov 27, 2012, 4:56:06 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated vendor to 3.6.9

Location:
vendor/current/source3/passdb
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/passdb/lookup_sid.c

    r740 r746  
    14381438                if (idmap_cache_find_sid2uid(&sids[i], &ids[i].id.uid,
    14391439                                             &expired)
    1440                     && !expired) {
     1440                    && !expired && ids[i].id.uid != (uid_t)-1) {
    14411441                        ids[i].type = WBC_ID_TYPE_UID;
    14421442                        continue;
     
    14441444                if (idmap_cache_find_sid2gid(&sids[i], &ids[i].id.gid,
    14451445                                             &expired)
    1446                     && !expired) {
     1446                    && !expired && ids[i].id.gid != (gid_t)-1) {
    14471447                        ids[i].type = WBC_ID_TYPE_GID;
    14481448                        continue;
     
    14911491                }
    14921492        }
     1493
    14931494done:
     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        }
    14941511        ret = true;
    14951512fail:
  • vendor/current/source3/passdb/pdb_get_set.c

    r740 r746  
    4040
    4141/*********************************************************************
     42 Test if a change time is a max value. Copes with old and new values
     43 of max.
     44 ********************************************************************/
     45
     46bool 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
     66time_t pdb_password_change_time_max(void)
     67{
     68        return 0x7FFFFFFF;
     69}
     70
     71/*********************************************************************
    4272 Collection of get...() functions for struct samu.
    4373 ********************************************************************/
     
    87117           to indicate that the user cannot change their password.  jmcd
    88118        */
    89         if (sampass->pass_can_change_time == get_time_t_max() &&
     119        if (pdb_is_password_change_time_max(sampass->pass_can_change_time) &&
    90120            IS_SAM_CHANGED(sampass, PDB_CANCHANGETIME))
    91121                return sampass->pass_can_change_time;
     
    113143
    114144        if (sampass->acct_ctrl & ACB_PWNOEXP)
    115                 return get_time_t_max();
     145                return pdb_password_change_time_max();
    116146
    117147        if (!pdb_get_account_policy(PDB_POLICY_MAX_PASSWORD_AGE, &expire)
     
    124154bool pdb_get_pass_can_change(const struct samu *sampass)
    125155{
    126         if (sampass->pass_can_change_time == get_time_t_max())
     156        if (pdb_is_password_change_time_max(sampass->pass_can_change_time))
    127157                return False;
    128158        return True;
     
    959989{
    960990        return pdb_set_pass_can_change_time(sampass,
    961                                      canchange ? 0 : get_time_t_max(),
     991                                     canchange ? 0 : pdb_password_change_time_max(),
    962992                                     PDB_CHANGED);
    963993}
  • vendor/current/source3/passdb/pdb_interface.c

    r740 r746  
    185185
    186186        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                }
    188190                if ( !NT_STATUS_IS_OK( make_pdb_method_name( &pdb, lp_passdb_backend() ) ) ) {
    189191                        char *msg = NULL;
  • vendor/current/source3/passdb/pdb_ldap.c

    r740 r746  
    30383038                DEBUG(3, ("primary group of [%s] not found\n",
    30393039                          pdb_get_username(user)));
     3040                ret = NT_STATUS_INTERNAL_DB_CORRUPTION;
    30403041                goto done;
    30413042        }
  • vendor/current/source3/passdb/proto.h

    r740 r746  
    113113/* The following definitions come from passdb/pdb_get_set.c  */
    114114
     115bool pdb_is_password_change_time_max(time_t test_time);
    115116uint32_t pdb_get_acct_ctrl(const struct samu *sampass);
    116117time_t pdb_get_logon_time(const struct samu *sampass);
Note: See TracChangeset for help on using the changeset viewer.