This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Windows 2003



Corinna Vinschen wrote:
> 
> On Thu, Jul 10, 2003 at 03:07:04PM -0400, Pierre A. Humblet wrote:
> > I assume you have run your token printing routine on the thread token,
> > after the setuid (fishing expedition, just to see..)
> 
> Sure.

I meant printing the token after the setuid.
That would require writing a special program (instead of using sshd)
and running it from the shell of the privileged user.

Something like

main()
{
   ret = setuid(some_uid);
   if  (ret) { .. }
   
   ret = OpenThreadToken(....   , & handle);

   your_print_routine(handle);

   ret = execve("/bin/id", argv, environ);

   if (ret) {   } 
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]