Whamcloud - gitweb
LU-14462 gss: fix support for namespace in lgss_keyring
[fs/lustre-release.git] / lustre / utils / gss / lgss_sk_utils.c
index 4f9ca53..bbef525 100644 (file)
@@ -76,7 +76,6 @@ static void lgss_sk_release_cred(struct lgss_cred *cred)
        sk_free_cred(skc);
        cred->lc_mech_cred = NULL;
        free(cred->lc_mech_token.value);
-       return;
 }
 
 /**
@@ -93,7 +92,7 @@ static int lgss_sk_using_cred(struct lgss_cred *cred)
        uint32_t flags;
        int rc;
 
-       rc = sk_gen_params(skc, true);
+       rc = sk_gen_params(skc, 0);
        if (rc)
                return rc;
 
@@ -107,7 +106,7 @@ static int lgss_sk_using_cred(struct lgss_cred *cred)
        bufs[SK_INIT_P] = skc->sc_p;
        bufs[SK_INIT_TARGET] = skc->sc_tgt;
        bufs[SK_INIT_NODEMAP] = skc->sc_nodemap_hash;
-       flags = htobe64(skc->sc_flags);
+       flags = htobe32(skc->sc_flags);
        bufs[SK_INIT_FLAGS].value = &flags;
        bufs[SK_INIT_FLAGS].length = sizeof(flags);
 
@@ -177,7 +176,7 @@ static int lgss_sk_validate_cred(struct lgss_cred *cred, gss_buffer_desc *token,
        }
 
        rc = sk_compute_dh_key(skc, &bufs[SK_RESP_PUB_KEY]);
-       if (rc == GSS_S_DEFECTIVE_TOKEN) {
+       if (rc == GSS_S_BAD_QOP) {
                /* Defective token for short key means we need to retry
                 * because there is a chance that the parameters generated
                 * resulted in a key that is 1 byte short */