[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cygwin
Subject:    RE: NT 4.0 exception trap for elvis.exe
From:       Anthony Tuininga <atuining () compusmart ! ab ! ca>
Date:       1997-09-29 21:18:55
[Download RAW message or body]

Thanks to a few people who responded to me privately I moved forward on this problem \
a little. I did a little more checking into my problem and found a bug in Sergeys \
patches. So I downloaded the latest version and that problem went away. :-) However, \
another problem appeared instead. :-( Apparently user privileges are not set \
properly? The following code is the source of the problem:

			if (stat(dir, &st) != 0
			 || !S_ISDIR(st.st_mode)
			 || !(st.st_uid == geteuid()
			 	? (st.st_mode & S_IRWXU) == S_IRWXU
			 	: st.st_gid == getegid()
			 		? (st.st_mode & S_IRWXG) == S_IRWXG
			 		: (st.st_mode & S_IRWXO) == S_IRWXO))
			{
				*dir = '\0';
			}
The "stat" call passes; the file is a directory check passes; st_uid is set to 544 \
(on my system as administrator) but the geteuid call returns 500. The check for user \
privileges passes but because the UID and EUID do not match it goes to the group \
level and then to the other level, both of which return 0 to indicate that the \
privilege is not there. Any idea on what is going on? At the moment I have commented \
out the above code -- all directories are writable on my system so its not a big \
problem but I would like to fix this more permanently. :-)

Anthony
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic