Quantcast
Channel: sshnet Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1729

New Post: Pageant integration?

$
0
0
I took a look in the WINPGNTC.C PuTTY source file and noticed:
    /*
     * Make the file mapping we create for communication with
     * Pageant owned by the user SID rather than the default. This
     * should make communication between processes with slightly
     * different contexts more reliable: in particular, command
     * prompts launched as administrator should still be able to
     * run PSFTPs which refer back to the owning user's
     * unprivileged Pageant.
     */
    usersid = get_user_sid();
So I went back to the PageantProtocol.cs file and added:
            ...
            using (var accessor = mmFile.CreateViewAccessor())
            {
                var security = mmFile.GetAccessControl();
                security.SetOwner(System.Security.Principal.WindowsIdentity.GetCurrent().User);
                mmFile.SetAccessControl(security);
            ...
to both the GetIdentities and SignData methods. Now it works like a charm on both Windows 7 and Server 2008. I don't know when PuTTY added the use of the SID, but it seems server 2008 is more strict about this than Windows 7.

Thanks for the clues!

Robert

Viewing all articles
Browse latest Browse all 1729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>