diff --git a/daemon/nfs41_client.c b/daemon/nfs41_client.c index 4294a38..1a30c39 100644 --- a/daemon/nfs41_client.c +++ b/daemon/nfs41_client.c @@ -483,6 +483,14 @@ int nfs41_client_owner( DWORD length; const ULONGLONG time_created = GetTickCount64(); int status; + char username[UNLEN + 1]; + DWORD len = UNLEN + 1; + + if (!GetUserNameA(username, &len)) { + status = GetLastError(); + eprintf("GetUserName() failed with %d\n", status); + goto out; + } /* owner.verifier = "time created" */ memcpy(owner->co_verifier, &time_created, sizeof(time_created)); @@ -506,6 +514,12 @@ int nfs41_client_owner( goto out_hash; } + if (!CryptHashData(hash, (const BYTE*)username, (DWORD)strlen(username), 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);