From: Jin, G. <gor...@in...> - 2005-08-17 02:10:31
|
I'm requesting to turn back Mike's setregid02 patch because 1. Linux kernel returns EPERM. So setregid02 with Mike's patch in = ltp-20050804 fails on Linux mainline kernel now. 2. From SuSv3=20 [EINVAL]=20 The value of the rgid or egid argument is invalid or out-of-range.=20 [EPERM]=20 The process does not have appropriate privileges and a change other than = changing the real group ID to the saved set-group-ID, or changing the = effective group ID to the real group ID or the saved set-group-ID, was = requested.=20 To my understanding, the test case fits the condition of EPERM. Whether = it fits EINVAL is open to interpretation, but I don't think 65535 is = out-of-range.=20 I don't think it easy to change kernel to return EINVAL without strong = proof. So better we change back the test case or with a better solution = for uClibc. Thanks, Gordon -----Original Message----- From: ltp...@li... = [mailto:ltp...@li...] On Behalf Of Mike = Frysinger Sent: 2005=C4=EA8=D4=C23=C8=D5 9:43 To: ltp...@li... Subject: [LTP] setregid02 issues currently the setregid02 test fails partially on uClibc: setregid02 7 FAIL : setregid(65535, -1) failed (22) but did not = set the=20 expected errno (1). setregid02 8 FAIL : setregid(-1, 65535) failed (22) but did not = set the=20 expected errno (1). the reason is that the test expects to get back a failure with errno set = to EPERM but uClibc checks the arguments and if they are invalid, sets = errno to EINVAL glibc does not check the value, passing it along happily to the kernel = where errno is set to EPERM SuSv3 gives some indication here that perhaps EINVAL is the correct = behavior, but it's certainly open to interpretation :) = http://www.opengroup.org/onlinepubs/009695399/functions/setregid.html [EINVAL] The value of the rgid or egid argument is invalid or out-of-range. in this case, 65535 is out of range for rgid and egid since the kernel = size for these two values is 2 bytes, thus the test should expect errno = set to EINVAL and not EPERM ? -mike |