aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/ltp/ltp/0019-tomoyo-Replace-canonicalize_file_name-with-realpath.patch
blob: 0a4c5f0b3c4e4643ba4a0cc50488e7d6ed1be218 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From 721e94985b9cff3e2724af7ea5be7d005bc12dec Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 8 Jan 2016 06:55:27 +0000
Subject: [PATCH 19/32] tomoyo: Replace canonicalize_file_name() with
 realpath()

canonicalize_file_name() API is specific to glibc

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c b/testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c
index da4af0f..5c1a3ca 100644
--- a/testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c
+++ b/testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c
@@ -274,9 +274,9 @@ int main(int argc, char *argv[])
 	/* Test mount(). */
 	{
 		static char buf[4096];
-		char *dev_ram_path = canonicalize_file_name("/dev/ram0");
+		char *dev_ram_path = realpath("/dev/ram0", NULL);
 		if (!dev_ram_path)
-			dev_ram_path = canonicalize_file_name("/dev/ram");
+			dev_ram_path = realpath("/dev/ram", NULL);
 		if (!dev_ram_path) {
 			dev_ram_path = "/dev/ram0";
 			mknod(dev_ram_path, S_IFBLK, MKDEV(1, 0));
-- 
2.7.0