From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from munnari.oz.au ([128.250.1.21]) by hawkwind.utcs.toronto.edu with SMTP id <2688>; Sun, 21 Mar 1993 22:58:32 -0500 Received: from sw.oz.au (via basser.cs.su.oz.au) by munnari.oz.au with MHSnet (5.83--+1.3.1+0.50) id AA15220; Mon, 22 Mar 1993 13:58:11 +1000 (from jeremy@sw.oz.au) Received: from chao.sw.oz.au by swift.sw.oz.au with SMTP id AA09092; Mon, 22 Mar 93 13:43:30 AES (5.59) (from jeremy@sw.oz.au for rc%hawkwind.utcs.toronto.edu@munnari.oz.au) Received: by chao.sw.oz.au (4.1/SMI-4.1) id AA11618; Mon, 22 Mar 93 13:43:19 EST From: jeremy@sw.oz.au (Jeremy Fitzhardinge) Message-Id: <9303220343.AA11618@chao.sw.oz.au> Subject: Porting rc to Linux To: rc@hawkwind.utcs.toronto.edu Date: Sun, 21 Mar 1993 22:43:18 -0500 Organization: Softway Pty Ltd X-Face: '6U=%Tv\k1l-:?\$C[D@G 7(vl~w8&y}!f\bh#wL#n,TGKh>T.c7eT5-y)Hl'i;A1z$9?*lD.k}yqshddFb l[EC}c=;uc%x'}uh3E91p&oE (in the kernel source tree). linux/signal.h doesn't have comments after each #define describing the signal. I just made mksignal look at a fake signal.h when running under Linux. A better solution might be to use the sys_siglist array which has the name to number mapping of the signal names, if not a text description. They were the easy problems, that prevented compilation. The subtle one was in which.c. Under linux gid_t is defined as an unsigned short, and getgroups() takes a pointer to gid_t as its second argument. rc uses an array of ints for the group list, so it got a list of bad groups. This meant that rc wouldn't exec a file that was group executable only and the group was in the user's supplimentary list. When searching the path, why does rc try to double guess the kernel by testing the permissions itself rather than just trying to exec it? And if it has to (whatis), why doesn't it just use the access system call rather than doing it for itself in rc_access? The comment says "does the right thing for group-executable files" - does access() not work correctly on other Unicies in this case? J