|
|
6b9fda |
From 75c3b624fd9d86906363ae5a433458ce6e853a83 Mon Sep 17 00:00:00 2001
|
|
|
d0ea73 |
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
|
d0ea73 |
Date: Tue, 7 Jul 2015 09:28:03 -0400
|
|
|
d0ea73 |
Subject: [PATCH] RHEL 8: Reject use of libguestfs-winsupport features except
|
|
|
d0ea73 |
for virt-* tools (RHBZ#1240276).
|
|
|
d0ea73 |
|
|
|
d0ea73 |
---
|
|
|
d0ea73 |
generator/c.ml | 16 ++++++++++++++++
|
|
|
d0ea73 |
1 file changed, 16 insertions(+)
|
|
|
d0ea73 |
|
|
|
d0ea73 |
diff --git a/generator/c.ml b/generator/c.ml
|
|
|
d0ea73 |
index 0366866e2..ded9685dc 100644
|
|
|
d0ea73 |
--- a/generator/c.ml
|
|
|
d0ea73 |
+++ b/generator/c.ml
|
|
|
d0ea73 |
@@ -1832,6 +1832,22 @@ and generate_client_actions actions () =
|
|
|
d0ea73 |
check_args_validity c_name style;
|
|
|
d0ea73 |
trace_call name c_name style;
|
|
|
d0ea73 |
|
|
|
d0ea73 |
+ (* RHEL 8 *)
|
|
|
d0ea73 |
+ if name = "mount" || name = "mount_ro" || name = "mount_options" ||
|
|
|
d0ea73 |
+ name = "mount_vfs" then (
|
|
|
d0ea73 |
+ pr " if (g->program && !STRPREFIX (g->program, \"virt-\")) {\n";
|
|
|
d0ea73 |
+ pr " CLEANUP_FREE char *vfs_type = guestfs_vfs_type (g, mountable);\n";
|
|
|
d0ea73 |
+ pr " if (vfs_type && STREQ (vfs_type, \"ntfs\")) {\n";
|
|
|
d0ea73 |
+ pr " error (g, \"mount: unsupported filesystem type\");\n";
|
|
|
d0ea73 |
+ pr " if (trace_flag)\n";
|
|
|
d0ea73 |
+ pr " guestfs_int_trace (g, \"%%s = %%s (error)\",\n";
|
|
|
d0ea73 |
+ pr " \"%s\", \"-1\");\n" name;
|
|
|
d0ea73 |
+ pr " return %s;\n" (string_of_errcode errcode);
|
|
|
d0ea73 |
+ pr " }\n";
|
|
|
d0ea73 |
+ pr " }\n";
|
|
|
d0ea73 |
+ pr "\n";
|
|
|
d0ea73 |
+ );
|
|
|
d0ea73 |
+
|
|
|
d0ea73 |
(* Calculate the total size of all FileIn arguments to pass
|
|
|
d0ea73 |
* as a progress bar hint.
|
|
|
d0ea73 |
*)
|
|
|
d0ea73 |
--
|
|
|
6b9fda |
2.21.0
|
|
|
d0ea73 |
|