X-Git-Url: https://cygwin.com/git/?a=blobdiff_plain;f=main.cc;h=cb6a8c7146d3bd74ec7019416be118116648eafa;hb=f37b36a368e8534c216e5f0096b02a15eaee3dbe;hp=5be956cab25c18521b50f452cd1fcad568949aa6;hpb=adaa168a9ac2b9882cc502636b0898fedd970b4d;p=cygwin-apps%2Fsetup.git diff --git a/main.cc b/main.cc index 5be956ca..cb6a8c71 100644 --- a/main.cc +++ b/main.cc @@ -234,9 +234,15 @@ set_default_sec () /* Set the default group to one of the above computed SID. */ PSID nsid = NULL; if (isusers) + { nsid = usid; + log(LOG_TIMESTAMP) << "Changing gid to Users" << endLog; + } else if (isadmins) + { nsid = asid; + log(LOG_TIMESTAMP) << "Changing gid to Administrators" << endLog; + } if (nsid && !SetTokenInformation (token, TokenPrimaryGroup, &nsid, sizeof nsid)) log (LOG_TIMESTAMP) << "SetTokenInformation() failed: " << GetLastError () << endLog;