Bug 1230910 Horrible hack because ERROR_INVALID_TOKEN is not defined draft
authorTom Ritter <tom@mozilla.com>
Wed, 30 Aug 2017 09:40:17 -0500
changeset 656098 8629955dbef6634d51f21f71900e5277fba9cb0d
parent 656097 0027d78823dfc56b435330886de3c84f63bdb314
child 656099 0d1523f9a2a3bf125075117810d4c55eeca28d3a
push id77058
push userbmo:tom@mozilla.com
push dateWed, 30 Aug 2017 18:21:00 +0000
bugs1230910
milestone57.0a1
Bug 1230910 Horrible hack because ERROR_INVALID_TOKEN is not defined MozReview-Commit-ID: L2sxlZ79EdS
security/sandbox/chromium/sandbox/win/src/acl.cc
--- a/security/sandbox/chromium/sandbox/win/src/acl.cc
+++ b/security/sandbox/chromium/sandbox/win/src/acl.cc
@@ -90,17 +90,17 @@ bool RevokeLogonSidFromDefaultDacl(HANDL
 
   if (!::GetTokenInformation(token, TokenLogonSid, logon_sid, size, &size)) {
     // If no logon sid, there's nothing to revoke.
     if (::GetLastError() == ERROR_NOT_FOUND)
       return true;
     return false;
   }
   if (logon_sid->GroupCount < 1) {
-    ::SetLastError(ERROR_INVALID_TOKEN);
+    ::SetLastError(1);//ERROR_INVALID_TOKEN);
     return false;
   }
   return AddSidToDefaultDacl(token,
                              reinterpret_cast<SID*>(logon_sid->Groups[0].Sid),
                              REVOKE_ACCESS, 0);
 }
 
 bool AddUserSidToDefaultDacl(HANDLE token, ACCESS_MASK access) {