Ignore:
Timestamp:
Nov 25, 2016, 8:04:54 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to version 4.4.7

Location:
vendor/current/source3/auth
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/auth/auth_generic.c

    r988 r989  
    2929#ifdef HAVE_KRB5
    3030#include "auth/kerberos/pac_utils.h"
     31#include "nsswitch/libwbclient/wbclient.h"
    3132#endif
    3233#include "librpc/crypto/gse.h"
     
    6465        if (pac_blob) {
    6566#ifdef HAVE_KRB5
     67                struct wbcAuthUserParams params = {};
     68                struct wbcAuthUserInfo *info = NULL;
     69                struct wbcAuthErrorInfo *err = NULL;
     70                wbcErr wbc_err;
     71
     72                /*
     73                 * Let winbind decode the PAC.
     74                 * This will also store the user
     75                 * data in the netsamlogon cache.
     76                 *
     77                 * We need to do this *before* we
     78                 * call get_user_from_kerberos_info()
     79                 * as that does a user lookup that
     80                 * expects info in the netsamlogon cache.
     81                 *
     82                 * See BUG: https://bugzilla.samba.org/show_bug.cgi?id=11259
     83                 */
     84                params.level = WBC_AUTH_USER_LEVEL_PAC;
     85                params.password.pac.data = pac_blob->data;
     86                params.password.pac.length = pac_blob->length;
     87
     88                become_root();
     89                wbc_err = wbcAuthenticateUserEx(&params, &info, &err);
     90                unbecome_root();
     91
     92                /*
     93                 * As this is merely a cache prime
     94                 * WBC_ERR_WINBIND_NOT_AVAILABLE
     95                 * is not a fatal error, treat it
     96                 * as success.
     97                 */
     98
     99                switch (wbc_err) {
     100                        case WBC_ERR_WINBIND_NOT_AVAILABLE:
     101                        case WBC_ERR_SUCCESS:
     102                                break;
     103                        case WBC_ERR_AUTH_ERROR:
     104                                status = NT_STATUS(err->nt_status);
     105                                wbcFreeMemory(err);
     106                                goto done;
     107                        default:
     108                                status = NT_STATUS_LOGON_FAILURE;
     109                                goto done;
     110                }
     111
    66112                status = kerberos_pac_logon_info(tmp_ctx, *pac_blob, NULL, NULL,
    67113                                                 NULL, NULL, 0, &logon_info);
     
    102148        }
    103149
    104         /* save the PAC data if we have it */
     150        /* Get the info3 from the PAC data if we have it */
    105151        if (logon_info) {
    106152                status = create_info3_from_pac_logon_info(tmp_ctx,
     
    110156                        goto done;
    111157                }
    112                 netsamlogon_cache_store(ntuser, info3_copy);
    113158        }
    114159
  • vendor/current/source3/auth/token_util.c

    r988 r989  
    673673        gid_t *gids;
    674674        struct dom_sid *group_sids;
     675        struct dom_sid tmp_sid;
    675676        uint32_t num_group_sids;
    676677        uint32_t num_gids;
     
    754755
    755756        } else  if (sid_check_is_in_unix_users(user_sid)) {
    756                 struct dom_sid tmp_sid;
    757757                uint32_t getgroups_num_group_sids;
    758758                /* This is a unix user not in passdb. We need to ask nss
Note: See TracChangeset for help on using the changeset viewer.