From: Daniel G. <dg...@su...> - 2008-11-18 09:55:24
|
Hi, Change "Buffer size is not positive" testcase readlink03 to use 0 as non-positive buffer size, instead of -1. To avoid a fortify-check-fail when using glibc and _FORTIFY_SOURCE=2. See discussion: http://lkml.org/lkml/2008/10/23/229 Signed-off-by: Daniel Gollub <dg...@su...> --- testcases/kernel/syscalls/readlink/readlink03.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) Index: ltp-full-20081031/testcases/kernel/syscalls/readlink/readlink03.c =================================================================== --- ltp-full-20081031.orig/testcases/kernel/syscalls/readlink/readlink03.c +++ ltp-full-20081031/testcases/kernel/syscalls/readlink/readlink03.c @@ -119,8 +119,16 @@ struct test_case_t { /* test case struc int (*setupfunc)(); } Test_cases[] = { { SYM_FILE1, "No Search permissions to process", EACCES, 1, setup1 }, + /* Don't test with bufsize -1, since this cause a fortify-check-fail when + using glibc and -D_FORITY_SOURCE=2 + + Discussion: http://lkml.org/lkml/2008/10/23/229 + Conclusion: Only test with 0 as non-positive bufsize. + { SYM_FILE2, "Buffer size is not positive", EINVAL, -1, setup2 }, - { TEST_FILE2, "File is not symbolic link", EINVAL, 1, no_setup }, + */ + { SYM_FILE2, "Buffer size is not positive", EINVAL, 0, setup2 }, + { TEST_FILE2, "File is not symbolic link", EINVAL, 1, no_setup } { Longpathname, "Symlink path too long", ENAMETOOLONG, 1, lpath_setup }, { "", "Symlink Pathname is empty", ENOENT, 1, no_setup }, { NULL, NULL, 0, 0, no_setup } |