qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/1] tools/virtiofsd: don't create temporary directory in /
@ 2020-10-01  6:15 Jens Freimann
  2020-10-01  6:15 ` [RFC 1/1] tools/virtiofsd: create temporary directory in /tmp Jens Freimann
  2020-10-05 13:58 ` [RFC 0/1] tools/virtiofsd: don't create temporary directory in / Jens Freimann
  0 siblings, 2 replies; 4+ messages in thread
From: Jens Freimann @ 2020-10-01  6:15 UTC (permalink / raw)
  To: dgilbert, stefanha, qemu-devel; +Cc: fidencio

When running a Kata container with virtiofs in OpenShift/k8s I get a
"Operation not permitted" error from a mkdtemp() call in virtiofsd
because it is trying to create a directory like /virtiofsd.11RAND

To avoid this change in virtiofsd, I've tried to set the TMPDIR
environment variable for the virtiofsd process, hoping that mkdtemp()
would use it, but it does not. Looking at glibc code it seems to be used
by tmpfile() etc. only. 

I'm sending this as an RFC because:
Maybe just prepending "/tmp" is not generic enough and we should make it
somehow configurable or use $TMPDIR. Also there might be security
implications I'm not aware of.
The process is running with container_kvm_t context which also needs
a change to be allowed to create files in tmpfs to make it work.



Jens Freimann (1):
  tools/virtiofsd: create tmpdir in /tmp

 tools/virtiofsd/passthrough_ll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.26.2



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-06 10:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-01  6:15 [RFC 0/1] tools/virtiofsd: don't create temporary directory in / Jens Freimann
2020-10-01  6:15 ` [RFC 1/1] tools/virtiofsd: create temporary directory in /tmp Jens Freimann
2020-10-06 10:00   ` Stefan Hajnoczi
2020-10-05 13:58 ` [RFC 0/1] tools/virtiofsd: don't create temporary directory in / Jens Freimann

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).