* [PATCH 0/1] docs: Clarify formatting for 'fmode' and 'dmode'
@ 2020-10-06 20:25 Brian Turek
2020-10-06 20:25 ` [PATCH 1/1] " Brian Turek
0 siblings, 1 reply; 2+ messages in thread
From: Brian Turek @ 2020-10-06 20:25 UTC (permalink / raw)
To: qemu-devel; +Cc: Brian Turek
The current documentation for the 'fmode' and 'dmode' options for
fsdev/virtfs is ambiguous for the expected format of the values. The
code itself parses the value using a call to strtoull with base=0 which
causes values like "644" and "755" to be parsed as base-10 rather than
base-8. This can cause unexpected behavior.
This patch changes the docmentation to be explicit on the expected
format and mentions the fact that the setuid, setgid, and sticky bit are
dropped.
Brian Turek (1):
docs: Clarify formatting for 'fmode' and 'dmode'
qemu-options.hx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] docs: Clarify formatting for 'fmode' and 'dmode'
2020-10-06 20:25 [PATCH 0/1] docs: Clarify formatting for 'fmode' and 'dmode' Brian Turek
@ 2020-10-06 20:25 ` Brian Turek
0 siblings, 0 replies; 2+ messages in thread
From: Brian Turek @ 2020-10-06 20:25 UTC (permalink / raw)
To: qemu-devel; +Cc: Brian Turek
Explictly state that the 'fmode' and 'dmode' values for a fsdev/virtfs
must be formatted with a preceeding 0 to be interpreted as base-8.
Currently the code will parse a value like "644" as base-10 which leads
to unexpected behavior.
Signed-off-by: Brian Turek <brian.turek@gmail.com>
---
qemu-options.hx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/qemu-options.hx b/qemu-options.hx
index 1da52a269c..b92f32005a 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1492,12 +1492,16 @@ SRST
``fmode=fmode``
Specifies the default mode for newly created files on the host.
Works only with security models "mapped-xattr" and
- "mapped-file".
+ "mapped-file". Must be formatted with a preceeding 0 to be
+ interpreted as a octal value (e.g. 0644). The setuid, setgid,
+ and sticky bit are all ignored.
``dmode=dmode``
Specifies the default mode for newly created directories on the
host. Works only with security models "mapped-xattr" and
- "mapped-file".
+ "mapped-file". Must be formatted with a preceeding 0 to be
+ interpreted as a octal value (e.g. 0755). The setuid, setgid,
+ and sticky bit are all ignored.
``throttling.bps-total=b,throttling.bps-read=r,throttling.bps-write=w``
Specify bandwidth throttling limits in bytes per second, either
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-06 20:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-06 20:25 [PATCH 0/1] docs: Clarify formatting for 'fmode' and 'dmode' Brian Turek
2020-10-06 20:25 ` [PATCH 1/1] " Brian Turek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).