blob: 0a4c5f0b3c4e4643ba4a0cc50488e7d6ed1be218 [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001From 721e94985b9cff3e2724af7ea5be7d005bc12dec Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 8 Jan 2016 06:55:27 +0000
4Subject: [PATCH 19/32] tomoyo: Replace canonicalize_file_name() with
5 realpath()
6
7canonicalize_file_name() API is specific to glibc
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c | 4 ++--
12 1 file changed, 2 insertions(+), 2 deletions(-)
13
14diff --git a/testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c b/testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c
15index da4af0f..5c1a3ca 100644
16--- a/testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c
17+++ b/testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c
18@@ -274,9 +274,9 @@ int main(int argc, char *argv[])
19 /* Test mount(). */
20 {
21 static char buf[4096];
22- char *dev_ram_path = canonicalize_file_name("/dev/ram0");
23+ char *dev_ram_path = realpath("/dev/ram0", NULL);
24 if (!dev_ram_path)
25- dev_ram_path = canonicalize_file_name("/dev/ram");
26+ dev_ram_path = realpath("/dev/ram", NULL);
27 if (!dev_ram_path) {
28 dev_ram_path = "/dev/ram0";
29 mknod(dev_ram_path, S_IFBLK, MKDEV(1, 0));
30--
312.7.0
32