Browse Source

Check the return value of CheckTokenMembership()

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

3
misc.c

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

Loading…
Cancel
Save