Bug 420

Summary: patches to build under cygwin
Product: Sudo Reporter: William Bader <williambader>
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED FIXED    
Severity: normal CC: williambader
Priority: low    
Version: 1.7.3   
Hardware: PC   
OS: Other   
Attachments: patches to compile under cygwin
patches to compile under cygwin

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.