public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] setregid02: invalid user value fix
@ 2013-11-08  8:37 Stanislav Kholmanskikh
  2013-11-13 12:46 ` chrubis
  2014-01-08 16:56 ` chrubis
  0 siblings, 2 replies; 4+ messages in thread
From: Stanislav Kholmanskikh @ 2013-11-08  8:37 UTC (permalink / raw)
  To: ltp-list; +Cc: vasily.isaenko

Commit 705926d096f7a64c9d53efeb789288e25457d68f
introduced a bug that the value for inval_user was treated
as '-1' when passed to 16-bit version of setregid().

Fixed it the same way as it's done for setreuid test cases.

Reported-by: Honggyu Kim <hong.gyu.kim@lge.com>
Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
---
 testcases/kernel/syscalls/setregid/setregid02.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/testcases/kernel/syscalls/setregid/setregid02.c b/testcases/kernel/syscalls/setregid/setregid02.c
index e67a7df..2b84b26 100644
--- a/testcases/kernel/syscalls/setregid/setregid02.c
+++ b/testcases/kernel/syscalls/setregid/setregid02.c
@@ -39,7 +39,7 @@ TCID_DEFINE(setregid02);
 
 static gid_t neg_one = -1;
 
-static gid_t inval_user = (USHRT_MAX);
+static gid_t inval_user = USHRT_MAX - 2;
 static struct passwd *ltpuser;
 
 static struct group nobody, root, bin;
-- 
1.7.1


------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-01-09 16:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-08  8:37 [LTP] [PATCH] setregid02: invalid user value fix Stanislav Kholmanskikh
2013-11-13 12:46 ` chrubis
2014-01-08 16:56 ` chrubis
     [not found]   ` <52CE3D43.7010204@oracle.com>
2014-01-09 16:40     ` chrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox