]> asedeno.scripts.mit.edu Git - PuTTY_svn.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)
commitc097e177aee4d113d7a227de9aec70021e8751ea
tree464570271ef0b7fa6272d7adb85318ba8e92e86a
parent1687c8a7fce8274a6eb35cdb7dff88184337e283
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.)

git-svn-id: http://svn.tartarus.org/sgt/putty@10096 cda61777-01e9-0310-a592-d414129be87e
windows/winnps.c
windows/winsecur.c
windows/winsecur.h
windows/winshare.c