Signed-off-by: Zeng Linggang <zenglg...@cn.fujitsu.com>
---
 testcases/kernel/security/smack/.gitignore         |  2 +-
 testcases/kernel/security/smack/notroot.c          | 29 ----------------------
 .../kernel/security/smack/smack_file_access.sh     |  2 +-
 testcases/kernel/security/smack/smack_notroot.c    | 29 ++++++++++++++++++++++
 4 files changed, 31 insertions(+), 31 deletions(-)
 delete mode 100644 testcases/kernel/security/smack/notroot.c
 create mode 100644 testcases/kernel/security/smack/smack_notroot.c

diff --git a/testcases/kernel/security/smack/.gitignore 
b/testcases/kernel/security/smack/.gitignore
index 5e9e819..16d5663 100644
--- a/testcases/kernel/security/smack/.gitignore
+++ b/testcases/kernel/security/smack/.gitignore
@@ -1,2 +1,2 @@
-/notroot
+/smack_notroot
 /smack_set_socket_labels
diff --git a/testcases/kernel/security/smack/notroot.c 
b/testcases/kernel/security/smack/notroot.c
deleted file mode 100644
index 05858d3..0000000
--- a/testcases/kernel/security/smack/notroot.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2007 Casey Schaufler <ca...@schaufler-ca.com>
- *
- *     This program is free software; you can redistribute it and/or modify
- *     it under the terms of the GNU General Public License as published by
- *     the Free Software Foundation, version 2.
- *
- * Author:
- *     Casey Schaufler <ca...@schaufler-ca.com>
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-int main(int argc, char *argv[])
-{
-       setuid(1);
-
-       execv(argv[1], &argv[1]);
-
-       perror(argv[0]);
-       exit(1);
-}
diff --git a/testcases/kernel/security/smack/smack_file_access.sh 
b/testcases/kernel/security/smack/smack_file_access.sh
index e6109fa..266ac9c 100755
--- a/testcases/kernel/security/smack/smack_file_access.sh
+++ b/testcases/kernel/security/smack/smack_file_access.sh
@@ -35,7 +35,7 @@ testfile="testfile"
 tst_tmpdir
 TST_CLEANUP=cleanup
 
-notroot /bin/sh -c "echo InitialData 2>/tmp/smack_fail.log > $testfile"
+smack_notroot /bin/sh -c "echo InitialData 2>/tmp/smack_fail.log > $testfile"
 if [ ! -f "$testfile" ]; then
        tst_brkm TFAIL "Test file \"$testfile\" can not be created."
 fi
diff --git a/testcases/kernel/security/smack/smack_notroot.c 
b/testcases/kernel/security/smack/smack_notroot.c
new file mode 100644
index 0000000..05858d3
--- /dev/null
+++ b/testcases/kernel/security/smack/smack_notroot.c
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2007 Casey Schaufler <ca...@schaufler-ca.com>
+ *
+ *     This program is free software; you can redistribute it and/or modify
+ *     it under the terms of the GNU General Public License as published by
+ *     the Free Software Foundation, version 2.
+ *
+ * Author:
+ *     Casey Schaufler <ca...@schaufler-ca.com>
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+int main(int argc, char *argv[])
+{
+       setuid(1);
+
+       execv(argv[1], &argv[1]);
+
+       perror(argv[0]);
+       exit(1);
+}
-- 
1.9.3


------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to