creating nfs client per security flavor

This commit is contained in:
Olga Kornievskaia 2010-12-02 12:28:49 -05:00 committed by unknown
parent 3b9f37d5a1
commit f7a9932cb3
5 changed files with 50 additions and 23 deletions

View file

@ -365,6 +365,7 @@ out:
int nfs41_client_owner(
IN const char *name,
IN uint32_t sec_flavor,
OUT client_owner4 *owner)
{
HCRYPTPROV context;
@ -391,6 +392,12 @@ int nfs41_client_owner(
goto out_context;
}
if (!CryptHashData(hash, (const BYTE*)&sec_flavor, (DWORD)sizeof(sec_flavor), 0)) {
status = GetLastError();
eprintf("CryptHashData() failed with %d\n", status);
goto out_hash;
}
if (!CryptHashData(hash, (const BYTE*)name, (DWORD)strlen(name), 0)) {
status = GetLastError();
eprintf("CryptHashData() failed with %d\n", status);