Ignore:
Timestamp:
Jun 9, 2016, 2:23:12 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: apply latest security patches to trunk

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source3/libads/sasl.c

    r918 r920  
    261261        /* we have a reference conter on ntlmssp_state, if we are signing
    262262           then the state will be kept by the signing engine */
     263
     264        if (ads->ldap.wrap_type >= ADS_SASLWRAP_TYPE_SEAL) {
     265                bool ok;
     266
     267                ok = ntlmssp_have_feature(ntlmssp_state,
     268                                          NTLMSSP_FEATURE_SEAL);
     269                if (!ok) {
     270                        DEBUG(0,("The ntlmssp feature sealing request, but unavailable\n"));
     271                        TALLOC_FREE(ntlmssp_state);
     272                        return ADS_ERROR_NT(NT_STATUS_INVALID_NETWORK_RESPONSE);
     273                }
     274
     275                ok = ntlmssp_have_feature(ntlmssp_state,
     276                                          NTLMSSP_FEATURE_SIGN);
     277                if (!ok) {
     278                        DEBUG(0,("The ntlmssp feature signing request, but unavailable\n"));
     279                        TALLOC_FREE(ntlmssp_state);
     280                        return ADS_ERROR_NT(NT_STATUS_INVALID_NETWORK_RESPONSE);
     281                }
     282
     283        } else if (ads->ldap.wrap_type >= ADS_SASLWRAP_TYPE_SIGN) {
     284                bool ok;
     285
     286                ok = ntlmssp_have_feature(ntlmssp_state,
     287                                          NTLMSSP_FEATURE_SIGN);
     288                if (!ok) {
     289                        DEBUG(0,("The gensec feature signing request, but unavailable\n"));
     290                        TALLOC_FREE(ntlmssp_state);
     291                        return ADS_ERROR_NT(NT_STATUS_INVALID_NETWORK_RESPONSE);
     292                }
     293        }
    263294
    264295        if (ads->ldap.wrap_type > ADS_SASLWRAP_TYPE_PLAIN) {
Note: See TracChangeset for help on using the changeset viewer.