including useridentity when creating clientowner
This commit is contained in:
parent
c90811be75
commit
fc6ac77f28
1 changed files with 14 additions and 0 deletions
|
|
@ -483,6 +483,14 @@ int nfs41_client_owner(
|
||||||
DWORD length;
|
DWORD length;
|
||||||
const ULONGLONG time_created = GetTickCount64();
|
const ULONGLONG time_created = GetTickCount64();
|
||||||
int status;
|
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" */
|
/* owner.verifier = "time created" */
|
||||||
memcpy(owner->co_verifier, &time_created, sizeof(time_created));
|
memcpy(owner->co_verifier, &time_created, sizeof(time_created));
|
||||||
|
|
@ -506,6 +514,12 @@ int nfs41_client_owner(
|
||||||
goto out_hash;
|
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)) {
|
if (!CryptHashData(hash, (const BYTE*)name, (DWORD)strlen(name), 0)) {
|
||||||
status = GetLastError();
|
status = GetLastError();
|
||||||
eprintf("CryptHashData() failed with %d\n", status);
|
eprintf("CryptHashData() failed with %d\n", status);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue