aboutsummaryrefslogtreecommitdiff
path: root/fsdev
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2012-02-08 07:23:55 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2012-02-08 07:23:55 -0600
commitdc717bfd057ac3d6b75c633d57e501d5e6d5ef50 (patch)
treefb693fceacd28b9ccc47fe64b925e32bc52298cc /fsdev
parenta283b1b8eb121dcc086c4850c91b35fed13d2023 (diff)
parenteed968607d656a218712df47a5e0432c21fd6994 (diff)
Merge remote-tracking branch 'aneesh/for-upstream' into staging
* aneesh/for-upstream: hw/9pfs: Remove O_NOATIME flag from 9pfs open() calls in readonly mode hw/9pfs: Update MAINTAINERS file fsdev: Fix parameter parsing for proxy helper hw/9pfs: Fix crash when mounting with synthfs hw/9pfs: Preserve S_ISGID hw/9pfs: Add new security model mapped-file.
Diffstat (limited to 'fsdev')
-rw-r--r--fsdev/file-op-9p.h12
-rw-r--r--fsdev/virtfs-proxy-helper.c10
2 files changed, 16 insertions, 6 deletions
diff --git a/fsdev/file-op-9p.h b/fsdev/file-op-9p.h
index 1e96c8bed9..956fda0919 100644
--- a/fsdev/file-op-9p.h
+++ b/fsdev/file-op-9p.h
@@ -56,11 +56,15 @@ typedef struct extended_ops {
* On failure ignore the error.
*/
#define V9FS_SM_NONE 0x00000010
-#define V9FS_RDONLY 0x00000020
-#define V9FS_PROXY_SOCK_FD 0x00000040
-#define V9FS_PROXY_SOCK_NAME 0x00000080
+/*
+ * uid/gid part of .virtfs_meatadata namespace
+ */
+#define V9FS_SM_MAPPED_FILE 0x00000020
+#define V9FS_RDONLY 0x00000040
+#define V9FS_PROXY_SOCK_FD 0x00000080
+#define V9FS_PROXY_SOCK_NAME 0x00000100
-#define V9FS_SEC_MASK 0x0000001C
+#define V9FS_SEC_MASK 0x0000003C
typedef struct FileOperations FileOperations;
diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
index 4a507d860e..f9a8270ee9 100644
--- a/fsdev/virtfs-proxy-helper.c
+++ b/fsdev/virtfs-proxy-helper.c
@@ -1036,7 +1036,13 @@ int main(int argc, char **argv)
return -1;
}
- if (*sock_name && (own_u == -1 || own_g == -1)) {
+ if (sock_name && sock != -1) {
+ fprintf(stderr, "both named socket and socket descriptor specified\n");
+ usage(argv[0]);
+ exit(EXIT_FAILURE);
+ }
+
+ if (sock_name && (own_u == -1 || own_g == -1)) {
fprintf(stderr, "owner uid:gid not specified, ");
fprintf(stderr,
"owner uid:gid specifies who can access the socket file\n");
@@ -1064,7 +1070,7 @@ int main(int argc, char **argv)
}
do_log(LOG_INFO, "Started\n");
- if (*sock_name) {
+ if (sock_name) {
sock = proxy_socket(sock_name, own_u, own_g);
if (sock < 0) {
goto error;