Return-Path: linux-nfs-owner@vger.kernel.org Received: from mx11.netapp.com ([216.240.18.76]:45619 "EHLO mx11.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757225Ab3IDQYM (ORCPT ); Wed, 4 Sep 2013 12:24:12 -0400 From: "Myklebust, Trond" To: "Adamson, Dros" CC: "linux-nfs@vger.kernel.org" Subject: Re: [PATCH] NFSv4: use mach cred for SECINFO_NO_NAME w/ integrity Date: Wed, 4 Sep 2013 16:24:11 +0000 Message-ID: <1378311850.3527.16.camel@leira.trondhjem.org> References: <1378311199-1695-1-git-send-email-dros@netapp.com> In-Reply-To: <1378311199-1695-1-git-send-email-dros@netapp.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org List-ID: T24gV2VkLCAyMDEzLTA5LTA0IGF0IDEyOjEzIC0wNDAwLCBXZXN0b24gQW5kcm9zIEFkYW1zb24g d3JvdGU6DQo+IENvbW1pdCA5NzQzMTIwNGVhMDA1ZWM4MDcwYWM5NGJjMzI1MWU4MzZkYWE3Y2E3 IGludHJvZHVjZWQgYSByZWdyZXNzaW9uDQo+IHRoYXQgY2F1c2VzIFNFQ0lORk9fTk9fTkFNRSB0 byBmYWlsIHdpdGhvdXQgc2VuZGluZyBhbiBSUEMgaWY6DQo+IA0KPiAgMSkgdGhlIG5mc19jbGll bnQncyBycGNfY2xpZW50IGlzIHVzaW5nIGtyYjVpL3AgKG5vdyB0cmllZCBieSBkZWZhdWx0KQ0K PiAgMikgdGhlIGN1cnJlbnQgdXNlciBkb2Vzbid0IGhhdmUgdmFsaWQga2VyYmVyb3MgY3JlZGVu dGlhbHMNCj4gDQo+IFRoaXMgc2l0dWF0aW9uIGlzIHF1aXRlIGNvbW1vbiAtIGFzIG9mIG5vdyBh IHNlYz1zeXMgbW91bnQgd291bGQgdXNlDQo+IGtyYjVpIGZvciB0aGUgbmZzX2NsaWVudCdzIHJw Y19jbGllbnQgYW5kIGEgdXNl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