OK sorry, my bad for not reading your original post closely enough.

One 'round the houses' approach would be to use IIS. Start by configuring IIS to disable anonymous access and enable 'Basic Authentication'. Then have your script access a CGI script using LWP and supplying a username/password, eg:

my $ua = LWP::UserAgent->new() my $request = HTTP::Request->new(GET => $cgi_url); $request->authorization_basic($username, $password); my $response = $ua->request($request);

When the script pointed to by $cgi_url is run, IIS will have arranged for it to be running under the security context of user $username. Furthermore, the security token which results from this type of authentication would allow the CGI process to access files on remote shares - handy if you don't have IIS on the box where the high socre file lives. The URL you requested would presumably include a querystring containing any new data to be written to the file.

Of course the major drawback of this approach is that the username and password must be available in clear text to your script which means that one of your users could subvert the system if they had access to the source and were determined enough.


In reply to Re: Re: Re: suidperl/sudo function-alike on Win32 by grantm
in thread suidperl/sudo function-alike on Win32 by traveler

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.