LookupPrivelegeValueW(0, SE_BACKUP_NAME...) failed with error: A specified privilege does not exist.

30 views
Skip to first unread message

Dalebjörk, Tomas

unread,
Dec 3, 2020, 5:21:59 AM12/3/20
to WinFsp
Hi,
We have encountered an error from the EnableBackupRestorePrivileges() function.
The error is from the LookupPrivelegeValueW() function.
The operating system error is: "A specified privelege does not exist."
This function has been working for several months, it just started today,
We use
union {
    TOKEN_PRIVILEGES P;
    UINT8 B[sizeof(TOKEN_PRIVILEGES) + sizeof(LUID_AND_ATTRIBUTES)];
} Privileges;
Privileges.P.PrivilegeCount = 2;
Privileges.P.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
Privileges.P.Privileges[1].Attributes = SE_PRIVILEGE_ENABLED;
if(!LookupPrivilegesValueW(0, SE_BACKUP_NAME, &Privileges.P.Privileges[0].Luid) ||
!LookupPrivilegesValueW(0, SE_BACKUP_NAME, &Privileges.P.Privileges[0].Luid) ) {
    return FspNtSatusFromWin32(GetLastError());
}

Any tips how to resolve this issue?


Regards Tomas


Reply all
Reply to author
Forward
0 new messages