-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mounting regular files without passing them as untrusted args #35
Comments
What does it mean to "just mount" a file? How is this different from using |
It's exactly the same as |
I thought |
Okay... I'm still not sure I understand exactly what you mean :-) You want
to result in the tar file |
I asked Lars what you mean and he suggested that the issue could be reformulated to this: Today,
will result in a command line like this inside the sandbox:
The paths are translated from the host OS into the corresponding paths inside the sandbox. It would be handy to somehow specify where the files should be mounted. Like this:
This should result in
@rampage644 Does this make sense? |
When we do tar mount for FS instead of channels all of that will be irrelevant. |
see #36 |
@mgeisler Almost. All i want is to be able to run See? no |
In that case, I wouldn't recommend using the @ syntax for this. Instead, I would add a new command line flag, similar in function to --zvm-image, something like --mount-file file,mount-point.
|
@rampage644 why do you need to add files to session that were not explicitly stated in the command line? What is the use case? |
@pkit which command line are you talking about?
@larsbutler, totally agree. I would prefer adding new option like |
Personally, I don't think the
You would have this:
What do you think about that? |
I think this option would simplify source code a little (or not a little?). I see no real difference in using |
The code (in my proposed branch #31 ) which processes all of these args is here: https://github.com/zerovm/zerovm-cli/pull/31/files#diff-223caf4ea7215230ce53fe9e09425fa8R874 Assuming the change is based on my branch, it might not really make a difference how you implement it (in terms of complexity of the code change), but I think that overloading the With your suggestion, an argument prefixed with
In my opinion that's too many orthogonal concepts for a single symbol |
As for me, i totally agree that syntax should be as much cleaner as possible. For example, I didn't even know about |
@rampage644 Same here; I only learned about it last week when I re-writing that part of the code. =P |
@rampage644 Regarding |
Lars Butler [email protected] writes:
I think we should take care not to let branches be based on each other. Second, if Sergei bases code on your branch, you're suddenly restricted
Yes, I agree. I think it's useful to use
That's a common usecase and the solution is fairly elegant (except that I like the idea of giving
could be seen as the same as
if the Martin Geisler |
We shouldn't assume how programs are written.
That will work, but what if my program uses argv? Parses it? Please, don't ask to list projects that will need this feature. We're discussing it longer than it will take to implement it. What's your point? Implement same logic through exporting tar via #36? |
@rampage644 |
Actually, it's a pretty safe assumption based on this: #34 (comment) And as far I can tell, my branch will be accepted once @pkit has written some functional tests and checked that all functions are implemented correctly. Of course he can correct me if I'm wrong. =) |
Lars Butler [email protected] writes:
I saw that comment -- and I don't agree completely with it :) It is a normal and workflow to let the small branches go in and then Martin Geisler |
I'd like to propose a feature to pass files from host filesystem (just as with
@somefile
) but without passing its untrusted filename as untrusted argument.For example:
zvsh some.nexe @file1 @file2 @file3
. Right nowzvsh
will create three channels (/dev/1.file1, /dev/2.file2, /dev/3.file3
) and pass their untrusted paths as command line arguments.It would be handy to somehow mark files just to mount. Like this:
zvsh some.nexe @file1,<flag-for-only-mount>
.I faced with need of this feature already :) What do you think?
The text was updated successfully, but these errors were encountered: