]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Switch to using SIDs in make_private_security_descriptor().
authorSimon Tatham <anakin@pobox.com>
Mon, 25 Nov 2013 18:35:14 +0000 (18:35 +0000)
committerSimon Tatham <anakin@pobox.com>
Mon, 25 Nov 2013 18:35:14 +0000 (18:35 +0000)
commit163b899df22d530e8fae7ee3344263a47f19ff43
tree464570271ef0b7fa6272d7adb85318ba8e92e86a
parentb7a703d38c939202f59682dfa41ed24a16f80da5
Switch to using SIDs in make_private_security_descriptor().

Daniel Meidlinger reports that at least one Windows machine which is
not obviously otherwise misconfigured will respond to our
SetEntriesInAcl call with odd errors like ERROR_NONE_MAPPED or
ERROR_TRUSTED_RELATIONSHIP_FAILURE. This is apparently to do with
failure to convert the names "EVERYONE" and "CURRENT_USER" used in the
ACL specification to SIDs. (Or perhaps only one of them is the problem
- I didn't investigate in that direction.)

If we instead construct a fully SID-based ACL, using the well-known
world SID in place of EVERYONE and calling our existing get_user_sid
routine in place of CURRENT_USER, he reports that the problem goes
away, so let's do that instead.

While I'm here, I've slightly simplified the function prototype of
make_private_security_descriptor(), by turning 'networksid' into an
internal static that we can reuse in subsequent calls once we've set
it up. (Mostly because I didn't fancy adding another two pointless
parameters at every call site for the two new SIDs.)

[originally from svn r10096]
windows/winnps.c
windows/winsecur.c
windows/winsecur.h
windows/winshare.c