in reply to suidperl/sudo function-alike on Win32

A brief Google search for "suid win32 perl" led me to this site (a bit slow-loading, however) for a module named Win32::AdminMisc. Apparently there's a function for "CreateProcessAsUser" and "LogonAsUser", which sound like they do what you need. However, this module doesn't appear to be in CPAN and there's no obvious indication when it was last updated (although by the version number, possibly in 2000?) and therefore no indication of exactly what combos of Perl versions and OSes it'll work with.
  • Comment on Re: suidperl/sudo function-alike on Win32

Replies are listed 'Best First'.
Re: suidperl/sudo function-alike on Win32
by crenz (Priest) on Mar 01, 2003 at 23:16 UTC

    Some more Google shows that these are Windows API functions, so you could just write a small XS or Inline::C module that does the trick. That is, if the functions are suitable for you.

    It's not hard, really. I was scared when I did my first XS module to wrap an API function with the least overhead possible, but it was quite easy, given the loads of documentation out there.</>

Re: Re: suidperl/sudo function-alike on Win32
by traveler (Parson) on Mar 01, 2003 at 23:15 UTC
    Unfortunately, the documentation says that any process using LoginAsUser nees "act as part of the operating system" (SeTcbPrivilege). I'm not sure it is wise to grant that priv to all users.

    --traveler