Check the return value of CheckTokenMembership()

Signed-off-by: Selva Nair <selva.nair@gmail.com>
pull/33/head
Selva Nair 9 years ago
parent 875d9f9457
commit bd2d80c1cc

@ -343,7 +343,8 @@ BOOL IsUserAdmin(VOID)
&AdministratorsGroup); &AdministratorsGroup);
if(b) if(b)
{ {
CheckTokenMembership(NULL, AdministratorsGroup, &b); if (!CheckTokenMembership(NULL, AdministratorsGroup, &b))
b = FALSE;
FreeSid(AdministratorsGroup); FreeSid(AdministratorsGroup);
} }

Loading…
Cancel
Save