Fixed permissions check in open_registry().
authorIain Patterson <me@iain.cx>
Fri, 2 Jan 2015 11:31:19 +0000 (11:31 +0000)
committerIain Patterson <me@iain.cx>
Fri, 2 Jan 2015 13:45:15 +0000 (13:45 +0000)
commit2dbaf62e06018a7d0a934c79bd9f39b81dc43694
tree373363aa29d332fc187efdf75cd191fab4946989
parent6628c2a573a6e94ead76d5454d0438dc396a70c6
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.
registry.cpp