X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=windows%2Fwinsecur.c;h=8d0b223aa67b6a892f359ee4a3859071478814a4;hb=21101c7397e460933635a7bfed813864fc4f88fe;hp=9cdac26c3ba36bf11a09c5d40d6ecf6257714e88;hpb=48db456801cf90369330248075b7e480252696ff;p=PuTTY.git diff --git a/windows/winsecur.c b/windows/winsecur.c index 9cdac26c..8d0b223a 100644 --- a/windows/winsecur.c +++ b/windows/winsecur.c @@ -27,6 +27,7 @@ int got_advapi(void) advapi = load_system32_dll("advapi32.dll"); successful = advapi && GET_WINDOWS_FUNCTION(advapi, GetSecurityInfo) && + GET_WINDOWS_FUNCTION(advapi, SetSecurityInfo) && GET_WINDOWS_FUNCTION(advapi, OpenProcessToken) && GET_WINDOWS_FUNCTION(advapi, GetTokenInformation) && GET_WINDOWS_FUNCTION(advapi, InitializeSecurityDescriptor) && @@ -265,16 +266,10 @@ int setprocessacl(char *error) goto cleanup; } - if (ERROR_SUCCESS != - SetSecurityInfo( - GetCurrentProcess(), - SE_KERNEL_OBJECT, - OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, - usersid, - NULL, - acl, - NULL - )) { + if (ERROR_SUCCESS != p_SetSecurityInfo + (GetCurrentProcess(), SE_KERNEL_OBJECT, + OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, + usersid, NULL, acl, NULL)) { error=dupprintf("Unable to set process ACL: %s", win_strerror(GetLastError())); goto cleanup;