Bug 420 - patches to build under cygwin
patches to build under cygwin
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudo
1.7.3
PC Other
: low normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-20 14:23 MDT by William Bader
Modified: 2011-01-28 16:15 MST (History)
1 user (show)

See Also:


Attachments
patches to compile under cygwin (774 bytes, patch)
2010-07-20 14:23 MDT, William Bader
Details | Diff
patches to compile under cygwin (1.09 KB, patch)
2010-07-20 19:49 MDT, William Bader
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description William Bader 2010-07-20 14:23:04 MDT
Created attachment 280 [details]
patches to compile under cygwin

The patch has small changes to two modules so that they compile under cygwin.
I now have a sudo.exe and am reading http://cygwin.com/cygwin-ug-net/ntsec.html to see if it will work.
Comment 1 Todd C. Miller 2010-07-20 15:39:28 MDT
You may want to check out the current beta version of sudo 1.7.4 which includes those fixes.  ftp://ftp.sudo.ws/pub/sudo/beta/sudo-1.7.4b3.tar.gz
Comment 2 William Bader 2010-07-20 19:49:42 MDT
Created attachment 281 [details]
patches to compile under cygwin

Thanks for suggesting 1.7.4b3.  It fixed the issues with 1.7.3 but had a new issue with mkstemps.c.
I think that user ids on cygwin work like windows and not like linux, and it might be necessary to use the windows "runas" command.
Comment 3 Todd C. Miller 2010-07-21 16:14:32 MDT
Thanks, those are fixed in 1.7.4b4.  At the very least I think you'd need to modify sudo to call cygwin_logon_user(), see http://www.cygwin.com/cygwin-ug-net/ntsec.html.  It shouldn't be too difficult to create an auth/cygwin.c based on auth/passwd.c but I don't know if that would be sufficient.