From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2201) id 26E0C3858D37; Fri, 31 Dec 2021 14:05:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 26E0C3858D37 To: cygwin-apps-cvs@sourceware.org Subject: [setup - the official Cygwin setup program] branch master, updated. release_2.912 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: b63da9d41520afe3cf380630ed41056ed4416adc X-Git-Newrev: beaffbbd8f5738b2c9f87cf9bfb1208b49763869 Message-Id: <20211231140516.26E0C3858D37@sourceware.org> Date: Fri, 31 Dec 2021 14:05:16 +0000 (GMT) From: Jon TURNEY X-BeenThere: cygwin-apps-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin-apps git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2021 14:05:16 -0000 https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=beaffbbd8f5738b2c9f87cf9bfb1208b49763869 commit beaffbbd8f5738b2c9f87cf9bfb1208b49763869 Author: Jon Turney Date: Fri Dec 31 00:25:56 2021 +0000 Fix SeCreateSymbolicLinkPrivilege detection SeCreateSymbolicLinkPrivilege is enabled automatically on use, so it only needs to be present in the token, not enabled. https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=7850e95810f57c136f57098ab91dfec307928b50 commit 7850e95810f57c136f57098ab91dfec307928b50 Author: Jon Turney Date: Thu Dec 30 23:19:06 2021 +0000 Fix inverted symlink creation right logging Diff: --- win32.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win32.cc b/win32.cc index 35a28c6b..a403d662 100644 --- a/win32.cc +++ b/win32.cc @@ -322,7 +322,7 @@ NTSecurity::setDefaultSecurity (bool isAdmin) setBackupPrivileges (); /* Log if symlink creation privilege is available. */ - if (hasSymlinkCreationRights()) + if (!hasSymlinkCreationRights()) Log (LOG_TIMESTAMP) << "User has NO symlink creation right" << endLog; else Log (LOG_TIMESTAMP) << "User has symlink creation right" << endLog; @@ -404,7 +404,7 @@ NTSecurity::hasSymlinkCreationRights () { if (memcmp(&privileges->Privileges[i].Luid, &symlink, sizeof(LUID)) == 0) { - return (privileges->Privileges[i].Attributes & SE_PRIVILEGE_ENABLED); + return TRUE; } }