This is the mail archive of the cygwin@sourceware.cygnus.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]

RE: NT 4.0 exception trap for elvis.exe


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".


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