From: Iain Patterson Date: Fri, 2 Jan 2015 11:31:19 +0000 (+0000) Subject: Fixed permissions check in open_registry(). X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=2dbaf62e06018a7d0a934c79bd9f39b81dc43694;hp=2dbaf62e06018a7d0a934c79bd9f39b81dc43694;p=nssm.git Fixed permissions check in open_registry(). We were checking for the presence of KEY_WRITE in the SAM to decide whether to call RegCreateKeyEx() or RegOpenKeyEx(). KEY_WRITE is an alias for STANDARD_RIGHTS_WRITE | KEY_SET_VALUE | KEY_CREATE_SUB_KEY so the function was incorrectly calling RegCreateKeyEx() even when RegOpenKeyEx() would be more appropriate. ---