I fear you will have to use CreateFile together with the appropriate SECURITY_ATTRIBUTES. Maybe you can get around this by "only" having a small race condition by using a named pipe (CreateFile('\\\\.\\pipe\\net-ssh-any-pipe', ... ). The named pipe should roughly appear to a client as a line based file, and will not be stored on disk.
Still, the proper way would be to set up the appropriate SECURITY_ATTRIBUTES in a way that only child processes of the current process are allowed to access that pipe (or a tempfile).
Unfortunately, I don't find a handy example of how to configure an appropriate security descriptor on the MSDN. I guess that creating a DACL (if possible) that only lists the child process as allowed to read would be a good approach.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|