Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <4C37CF2D8DF07E4CA6357BAD5EB9A5D705B05A27@oh0012itsa1.cb.lucent.com> From: "Snively, John P (John)" To: "'cygwin AT cygwin DOT com'" Subject: 1.3.22: child real uid gets parent's effective uid Date: Fri, 6 Jun 2003 16:20:43 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" I changed the effective uid of my app's process using seteuid, and printed out the real and effective uid's obtained via getuid and geteuid. No surprises, until I tested running a child process via system() and printing ITS real and effective uid's. The effective AND real uid of the child are set to the effective uid of the parent -- ouch: before changing euid: child: euid: 25313 ruid: 25313 parent: euid: 25313 ruid: 25313 setting euid to 500 child: euid: 500 ruid: 500 parent: euid: 500 ruid: 25313 Any way around this? John Snively Lucent / Bell Labs cygcheck output: Cygwin Win95/NT Configuration Diagnostics Current System Time: Fri Jun 06 15:48:51 2003 Windows 2000 Professional Ver 5.0 Build 2195 Service Pack 3 Path: C:\cygwin\home\eeyore\bin C:\cygwin\home\eeyore\v6.1\bin C:\cygwin\usr\local\CSSC\libexec\cssc C:\cygwin\usr\local\bin C:\cygwin\bin C:\cygwin\bin c:\Perl\bin\ c:\texmf\miktex\bin c:\WINNT\system32 c:\WINNT c:\WINNT\System32\Wbem c:\AMTAGENT c:\Program Files\Rational\Rose RealTime\bin\win32 "C C:\cygwin\Program Files\Hummingbird\Connectivity\7.00\Accessories\" c:\Program Files\Microsoft SQL Server\80\Tools\BINN C:\cygwin\bin C:\cygwin\usr\X11R6\bin C:\cygwin\bin\id.exe output (nontsec) UID: 25313(eeyore) GID: 10513(mkgroup_l_d) 544(Administrators) 545(Users) 10513(mkgroup_l_d) C:\cygwin\bin\id.exe output (ntsec) UID: 25313(eeyore) GID: 10513(mkgroup_l_d) 544(Administrators) 545(Users) 10513(mkgroup_l_d) SysDir: C:\WINNT\System32 WinDir: C:\WINNT CYGWIN = `tty ntsec' HOME = `C:\cygwin\home\eeyore' MAKEFLAGS = `-I /home/eeyore/v6.1/src/makehead' MAKE_MODE = `unix' USER = `eeyore' ALLUSERSPROFILE = `C:\Documents and Settings\All Users' APPDATA = `C:\Documents and Settings\eeyore\Application Data' CATALINA_HOME = `c:\jakarta-tomcat-4.1.24-LE-jdk14' COMMONPROGRAMFILES = `C:\Program Files\Common Files' COMPUTERNAME = `EEYORE-1' COMSPEC = `C:\WINNT\system32\cmd.exe' CVS_RSH = `/bin/ssh' HOMEDRIVE = `C:' HOMEPATH = `\' HOSTNAME = `eeyore-1' JAVA_HOME = `c:\j2sdk1.4.1_02' LOGONSERVER = `\\NA05NJ7460DC02' LS_COLORS = `no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:ex= 01;33:*~=05;31:*.mtxt=05;31:*.ndx=05;31:*.cmd=01;32:*.exe=01;32:*.com=01;32: *.btm=01;32:*.bat=01;32:*.c=01;36:*.h=01;36:*.pl=01;36:*.pm=01;36:*.cgi=01;3 6:*.java=01;36:*.html=01;36:*.tar=01;31:*.tgz=01;31:*.gz=01;31:*.tgz=01;31:* .bz2=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01; 31:*.gz=01;31:*.jpg=01;35:*.jpeg=01;35:*.JPG=01;35:*.gif=01;35:*.GIF=01;35:* .bmp=01;35:*.BMP=01;35:*.xbm=01;35:*.ppm=01;35:*.xpm=01;35:*.tif=01;35:' MANPATH = `:/usr/ssl/man' NUMBER_OF_PROCESSORS = `1' OS2LIBPATH = `C:\WINNT\system32\os2\dll;' OS = `Windows_NT' PATHEXT = `.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH' PROCESSOR_ARCHITECTURE = `x86' PROCESSOR_IDENTIFIER = `x86 Family 6 Model 11 Stepping 1, GenuineIntel' PROCESSOR_LEVEL = `6' PROCESSOR_REVISION = `0b01' PROGRAMFILES = `C:\Program Files' PROMPT = `$P$G' PS1 = `eeyore-1> ' SMS_LOCAL_DIR = `C:\WINNT' SRCROOT = `/home/eeyore/v6.1' SYSTEMDRIVE = `C:' SYSTEMROOT = `C:\WINNT' TEMP = `c:\DOCUME~1\eeyore\LOCALS~1\Temp' TERM = `cygwin' TMP = `c:\DOCUME~1\eeyore\LOCALS~1\Temp' USERDOMAIN = `NA05' USERNAME = `eeyore' USERPROFILE = `C:\Documents and Settings\eeyore' WINDIR = `C:\WINNT' _ = `/usr/bin/cygcheck' HKEY_CURRENT_USER\Software\Cygnus Solutions HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2 HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2 (default) = `/cygdrive' cygdrive flags = 0x00000022 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/ (default) = `C:\cygwin' flags = 0x0000000a HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/rdocs (default) = `\\richb-1\pub' flags = 0x0000010a HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin (default) = `C:\cygwin/bin' flags = 0x0000000a HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib (default) = `C:\cygwin/lib' flags = 0x0000000a HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/X11R6/lib/X11/fonts (default) = `C:\cygwin\usr\X11R6\lib\X11\fonts' flags = 0x0000000a HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options c: hd NTFS 22886Mb 44% CP CS UN PA FC d: hd N/A N/A e: cd CDFS 0Mb -2147483548% CS Audio CD C:\cygwin / system binmode \\richb-1\pub /rdocs system binmode C:\cygwin/bin /usr/bin system binmode C:\cygwin/lib /usr/lib system binmode C:\cygwin\usr\X11R6\lib\X11\fonts /usr/X11R6/lib/X11/fonts system binmode . /cygdrive system binmode,cygdrive Found: C:\cygwin\bin\awk.exe Found: C:\cygwin\bin\bash.exe Found: C:\cygwin\bin\cat.exe Found: C:\cygwin\bin\cp.exe Found: C:\cygwin\bin\cpp.exe Found: C:\cygwin\bin\find.exe Found: C:\cygwin\bin\gcc.exe Found: C:\cygwin\bin\gdb.exe Found: C:\cygwin\bin\grep.exe Found: C:\cygwin\bin\ld.exe Found: C:\cygwin\bin\ls.exe Found: C:\cygwin\bin\make.exe Found: C:\cygwin\bin\mv.exe Found: C:\cygwin\bin\rm.exe Found: C:\cygwin\bin\sed.exe Found: C:\cygwin\bin\sh.exe Found: C:\cygwin\bin\tar.exe 58k 2002/05/07 C:\cygwin\bin\cygbz2-1.dll - os=4.0 img=1.0 sys=4.0 "cygbz2-1.dll" v0.0 ts=2002/5/7 2:33 848k 2003/04/11 C:\cygwin\bin\cygcrypto-0.9.7.dll - os=4.0 img=1.0 sys=4.0 "cygcrypto-0.9.7.dll" v0.0 ts=2003/4/11 6:33 645k 2003/04/11 C:\cygwin\bin\cygcrypto.dll - os=4.0 img=1.0 sys=4.0 "cygcrypto.dll" v0.0 ts=2003/4/11 6:37 380k 2002/07/24 C:\cygwin\bin\cygdb-3.1.dll - os=4.0 img=1.0 sys=4.0 "cygdb-3.1.dll" v0.0 ts=2002/7/24 12:24 487k 2002/07/24 C:\cygwin\bin\cygdb_cxx-3.1.dll - os=4.0 img=1.0 sys=4.0 "cygdb_cxx-3.1.dll" v0.0 ts=2002/7/24 12:25 45k 2001/04/25 C:\cygwin\bin\cygform5.dll - os=4.0 img=1.0 sys=4.0 "cygform5.dll" v0.0 ts=2001/4/25 1:28 35k 2002/01/09 C:\cygwin\bin\cygform6.dll - os=4.0 img=1.0 sys=4.0 "cygform6.dll" v0.0 ts=2002/1/9 1:03 76k 2003/03/09 C:\cygwin\bin\cygform7.dll - os=4.0 img=1.0 sys=4.0 "cygform7.dll" v0.0 ts=2003/3/9 15:51 28k 2003/03/22 C:\cygwin\bin\cyggdbm-3.dll - os=4.0 img=1.0 sys=4.0 "cyggdbm-3.dll" v0.0 ts=2003/3/22 17:19 19k 2003/03/22 C:\cygwin\bin\cyggdbm.dll - os=4.0 img=1.0 sys=4.0 "cyggdbm.dll" v0.0 ts=2002/2/19 22:05 15k 2003/03/22 C:\cygwin\bin\cyggdbm_compat-3.dll - os=4.0 img=1.0 sys=4.0 "cyggdbm_compat-3.dll" v0.0 ts=2003/3/22 17:22 17k 2001/06/28 C:\cygwin\bin\cyghistory4.dll - os=4.0 img=1.0 sys=4.0 "cyghistory4.dll" v0.0 ts=2001/1/6 23:34 20k 2002/10/10 C:\cygwin\bin\cyghistory5.dll - os=4.0 img=1.0 sys=4.0 "cyghistory5.dll" v0.0 ts=2002/10/10 13:28 929k 2002/06/24 C:\cygwin\bin\cygiconv-2.dll - os=4.0 img=1.0 sys=4.0 "cygiconv-2.dll" v0.0 ts=2002/6/24 14:24 22k 2001/12/13 C:\cygwin\bin\cygintl-1.dll - os=4.0 img=1.0 sys=4.0 "cygintl-1.dll" v0.0 ts=2001/12/13 4:28 28k 2002/09/20 C:\cygwin\bin\cygintl-2.dll - os=4.0 img=1.0 sys=4.0 "cygintl-2.dll" v0.0 ts=2002/9/19 23:13 21k 2001/06/20 C:\cygwin\bin\cygintl.dll - os=4.0 img=1.0 sys=4.0 "cygintl.dll" v0.0 ts=2001/6/20 13:09 119k 2002/02/09 C:\cygwin\bin\cygjpeg6b.dll - os=4.0 img=1.0 sys=4.0 "cygjpeg6b.dll" v0.0 ts=2002/2/9 0:19 26k 2001/04/25 C:\cygwin\bin\cygmenu5.dll - os=4.0 img=1.0 sys=4.0 "cygmenu5.dll" v0.0 ts=2001/4/25 1:27 20k 2002/01/09 C:\cygwin\bin\cygmenu6.dll - os=4.0 img=1.0 sys=4.0 "cygmenu6.dll" v0.0 ts=2002/1/9 1:03 48k 2003/03/09 C:\cygwin\bin\cygmenu7.dll - os=4.0 img=1.0 sys=4.0 "cygmenu7.dll" v0.0 ts=2003/3/9 15:51 156k 2001/04/25 C:\cygwin\bin\cygncurses++5.dll - os=4.0 img=1.0 sys=4.0 "cygncurses++5.dll" v0.0 ts=2001/4/25 1:29 175k 2002/01/09 C:\cygwin\bin\cygncurses++6.dll - os=4.0 img=1.0 sys=4.0 "cygncurses++6.dll" v0.0 ts=2002/1/9 1:03 226k 2001/04/25 C:\cygwin\bin\cygncurses5.dll - os=4.0 img=1.0 sys=4.0 "cygncurses5.dll" v0.0 ts=2001/4/25 1:17 202k 2002/01/09 C:\cygwin\bin\cygncurses6.dll - os=4.0 img=1.0 sys=4.0 "cygncurses6.dll" v0.0 ts=2002/1/9 1:03 284k 2003/03/09 C:\cygwin\bin\cygncurses7.dll - os=4.0 img=1.0 sys=4.0 "cygncurses7.dll" v0.0 ts=2003/3/9 15:50 15k 2001/04/25 C:\cygwin\bin\cygpanel5.dll - os=4.0 img=1.0 sys=4.0 "cygpanel5.dll" v0.0 ts=2001/4/25 1:27 12k 2002/01/09 C:\cygwin\bin\cygpanel6.dll - os=4.0 img=1.0 sys=4.0 "cygpanel6.dll" v0.0 ts=2002/1/9 1:03 31k 2003/03/09 C:\cygwin\bin\cygpanel7.dll - os=4.0 img=1.0 sys=4.0 "cygpanel7.dll" v0.0 ts=2003/3/9 15:50 63k 2003/04/11 C:\cygwin\bin\cygpcre.dll - os=4.0 img=1.0 sys=4.0 "cygpcre.dll" v0.0 ts=2003/4/11 4:31 61k 2003/04/11 C:\cygwin\bin\cygpcreposix.dll - os=4.0 img=1.0 sys=4.0 "cygpcreposix.dll" v0.0 ts=2003/4/11 4:31 1005k 2003/03/30 C:\cygwin\bin\cygperl5_8_0.dll - os=4.0 img=1.0 sys=4.0 "cygperl5_8_0.dll" v0.0 ts=2003/3/30 10:39 173k 2003/02/23 C:\cygwin\bin\cygpng12.dll - os=4.0 img=1.0 sys=4.0 "cygpng12.dll" v0.0 ts=2003/2/23 17:02 22k 2002/06/09 C:\cygwin\bin\cygpopt-0.dll - os=4.0 img=1.0 sys=4.0 "cygpopt-0.dll" v0.0 ts=2002/6/9 1:45 108k 2001/06/28 C:\cygwin\bin\cygreadline4.dll - os=4.0 img=1.0 sys=4.0 "cygreadline4.dll" v0.0 ts=2001/1/6 23:34 127k 2002/10/10 C:\cygwin\bin\cygreadline5.dll - os=4.0 img=1.0 sys=4.0 "cygreadline5.dll" v0.0 ts=2002/10/10 13:28 176k 2003/04/11 C:\cygwin\bin\cygssl-0.9.7.dll - os=4.0 img=1.0 sys=4.0 "cygssl-0.9.7.dll" v0.0 ts=2003/4/11 6:33 165k 2003/04/11 C:\cygwin\bin\cygssl.dll - os=4.0 img=1.0 sys=4.0 "cygssl.dll" v0.0 ts=2003/4/11 6:37 281k 2003/02/24 C:\cygwin\bin\cygtiff3.dll - os=4.0 img=1.0 sys=4.0 "cygtiff3.dll" v0.0 ts=2003/2/23 23:58 50k 2002/03/12 C:\cygwin\bin\cygz.dll - os=4.0 img=1.0 sys=4.0 "cygz.dll" v0.0 ts=2002/3/11 23:38 948k 2003/03/18 C:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0 "cygwin1.dll" v0.0 ts=2003/3/18 9:20 Cygwin DLL version info: DLL version: 1.3.22 DLL epoch: 19 DLL bad signal mask: 19005 DLL old termios: 5 DLL malloc env: 28 API major: 0 API minor: 78 Shared data: 3 DLL identifier: cygwin1 Mount registry: 2 Cygnus registry name: Cygnus Solutions Cygwin registry name: Cygwin Program options name: Program Options Cygwin mount registry name: mounts v2 Cygdrive flags: cygdrive flags Cygdrive prefix: cygdrive prefix Cygdrive default prefix: Build date: Tue Mar 18 09:20:11 EST 2003 CVS tag: dontuse-21 Shared id: cygwin1S3 Cygwin Package Information Last downloaded files to: C:\Documents and Settings\eeyore\My Documents\Src\Cygwin Last downloaded files from: http://mirror.mcs.anl.gov/cygwin Package Version _update-info-dir 00164-1 ash 20020731-1 base-files 1.3-1 base-passwd 1.1-1 bash 2.05b-9 binutils 20030307-1 bison 20030307-1 bzip2 1.0.2-2 chkconfig 1.2.24h-1 ctags 5.5-3 cygrunsrv 0.96-1 cygutils 1.1.3-1 cygwin 1.3.22-1 cygwin-doc 1.3-4 diffutils 2.8.1-1 emacs 21.2-12 emacs-X11 21.2-12 fileutils 4.1-1 findutils 4.1.7-4 flex 2.5.4-2 gawk 3.1.2-2 gcc 3.2-3 gcc-mingw 20020817-5 gdb 20030303-1 gdbm 1.8.0-5 gettext 0.11.5-1 grep 2.5-1 groff 1.18.1-2 gzip 1.3.3-4 inetutils 1.3.2-22 initscripts 0.9-1 jpeg 6b-7 less 378-1 libbz2_1 1.0.2-2 libdb3.1 3.1.17-2 libgdbm 1.8.0-5 libgdbm-devel 1.8.0-5 libgdbm3 1.8.3-1 libiconv2 1.8-2 libintl 0.10.38-3 libintl1 0.10.40-1 libintl2 0.11.5-1 libncurses-devel 5.3-1 libncurses5 5.2-1 libncurses6 5.2-8 libncurses7 5.3-1 libpng12 1.2.5-1 libpopt0 1.6.4-4 libreadline4 4.1-2 libreadline5 4.3-2 login 1.8-1 m4 1.4-1 make 3.79.1-7 man 1.5j-2 mingw-runtime 3.0-1 mktemp 1.4-1 mutt 1.4-1 ncurses 5.3-1 newlib-man 20020801 openssl 0.9.7b-1 openssl096 0.9.6j-1 pcre 4.1-1 pdksh 5.2.14-2 perl 5.8.0-2 readline 4.3-2 sed 4.0.7-1 sh-utils 2.0.15-3 sharutils 4.2.1-2 ssmtp 2.38.7-3 sysvinit 2.84-3 tar 1.13.25-1 tcltk 20030214-1 termcap 20020930-1 terminfo 5.3-2 texinfo 4.2-4 textutils 2.0.21-1 tiff 3.6.0-1 vim 6.1.300-1 w32api 2.3-1 which 1.5-1 XFree86-base 4.2.0-1 XFree86-bin 4.2.0-3 XFree86-etc 4.2.0-1 XFree86-fenc 4.2.0-2 XFree86-fnts 4.2.0-2 XFree86-lib 4.2.0-5 XFree86-startup-scripts 4.2.0-4 XFree86-xserv 4.2.0-37 xinetd 2.3.9-1 zlib 1.1.4-1 Use -h to see help about each section -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/