cve/cve-2017-2618: Check for file fscreate existence
PATCH 1/1 cve/cve-2017-2618: Check for file fscreate existence
Signed-off-by Guangwen Feng <[email protected]>
--- testcases/cve/cve-2017-2618.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
testcases/cve/cve-2017-2618.c +8 -1
@@ -1,5 +1,5 @@/* -* Copyright (c) 2017 Fujitsu Ltd. +* Copyright (c) 2017 FUJITSU LIMITED * Author: Guangwen Feng <[email protected]> * * This program is free software: you can redistribute it and/or modify
@@ -35,6 +35,12 @@#define LOOPS 100#define PATH_ATTRFS "/proc/self/attr/fscreate" +static void setup (void ) +{ +if (access (PATH_ATTRFS ,F_OK )) +tst_brk (TCONF ,"%s does not exist" ,PATH_ATTRFS ); +} +static void do_test (void ) {int i, fd;
@@ -55,5 +61,6 @@ static void do_test(void)static struct tst_test test = { .forks_child =1 , + .setup = setup, .test_all = do_test, };
Signature · 1 line
2.9.5
PATCH 1/1 cve/cve-2017-2618: Check for file fscreate existence
Hi!
Pushed, thanks.
Signature · 2 lines
Cyril Hrubis [email protected]