diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-07-24 12:06:16 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-07-24 13:59:52 +0000 |
commit | e971bdbd51404cbaa79d23c9053e06223f3185b1 (patch) | |
tree | e5dfaebe24cd1398f7835f6ced85083b94c29901 /main/open-vm-tools-grsec/0004-Use-new-link-helpers.patch | |
parent | 06f984daee0981ccfce8ae0a8b8b663a1c6667f1 (diff) | |
download | aports-e971bdbd51404cbaa79d23c9053e06223f3185b1.tar.bz2 aports-e971bdbd51404cbaa79d23c9053e06223f3185b1.tar.xz |
main/open-vm-tools-grsec: fix buildling with newer kernels
patches found on arch linux AUR:
https://aur.archlinux.org/packages/open-vm-tools-dkms/
Diffstat (limited to 'main/open-vm-tools-grsec/0004-Use-new-link-helpers.patch')
-rwxr-xr-x | main/open-vm-tools-grsec/0004-Use-new-link-helpers.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/main/open-vm-tools-grsec/0004-Use-new-link-helpers.patch b/main/open-vm-tools-grsec/0004-Use-new-link-helpers.patch new file mode 100755 index 0000000000..a60fa6faed --- /dev/null +++ b/main/open-vm-tools-grsec/0004-Use-new-link-helpers.patch @@ -0,0 +1,53 @@ +From 20437d731289126ee5363a6f73e4171d39f2e3d9 Mon Sep 17 00:00:00 2001 +From: "Scott M. Kroll" <skroll@gmail.com> +Date: Mon, 14 Jul 2014 11:32:35 -0400 +Subject: [PATCH 4/5] Use new link helpers + +* vfs_follow_link was removed in 3.12. +* vfs_readlink was removed in 3.15. +--- + open-vm-tools/modules/linux/vmhgfs/link.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/open-vm-tools/modules/linux/vmhgfs/link.c b/open-vm-tools/modules/linux/vmhgfs/link.c +index 9fb95a5..06ea953 100644 +--- a/modules/linux/vmhgfs/link.c ++++ b/modules/linux/vmhgfs/link.c +@@ -110,9 +110,15 @@ HgfsFollowlink(struct dentry *dentry, // IN: Dentry containing link + "on something that wasn't a symlink\n")); + error = -EINVAL; + } else { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0) ++ LOG(6, (KERN_DEBUG "VMware hgfs: HgfsFollowlink: calling " ++ "nd_set_link\n")); ++ nd_set_link(nd, fileName); ++#else + LOG(6, (KERN_DEBUG "VMware hgfs: HgfsFollowlink: calling " + "vfs_follow_link\n")); + error = vfs_follow_link(nd, fileName); ++#endif + } + kfree(fileName); + } +@@ -172,9 +178,18 @@ HgfsReadlink(struct dentry *dentry, // IN: Dentry containing link + "on something that wasn't a symlink\n")); + error = -EINVAL; + } else { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0) ++ LOG(6, (KERN_DEBUG "VMware hgfs: HgfsReadlink: calling " ++ "readlink_copy\n")); ++ LOG(6, (KERN_DEBUG "VMware hgfs: %s: calling " ++ "readlink_copy\n", ++ __func__)); ++ error = readlink_copy(buffer, buflen, fileName); ++#else + LOG(6, (KERN_DEBUG "VMware hgfs: HgfsReadlink: calling " + "vfs_readlink\n")); + error = vfs_readlink(dentry, buffer, buflen, fileName); ++#endif + } + kfree(fileName); + } +-- +2.0.1 + |