-
Notifications
You must be signed in to change notification settings - Fork 582
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
gadget/install: support for no{exec,dev,suid} mount flags #14737
gadget/install: support for no{exec,dev,suid} mount flags #14737
Conversation
@@ -62,16 +62,35 @@ func makeFilesystem(params mkfsParams) error { | |||
return udevTrigger(params.Device) | |||
} | |||
|
|||
type mntfsParams struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally i'd go for Options
instead of Params
- but there is precedence for using Params
in this file, and I'd rather see consistency.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #14737 +/- ##
==========================================
+ Coverage 78.95% 79.03% +0.08%
==========================================
Files 1084 1087 +3
Lines 146638 147678 +1040
==========================================
+ Hits 115773 116718 +945
- Misses 23667 23730 +63
- Partials 7198 7230 +32
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -400,7 +400,7 @@ func Run(model gadget.Model, gadgetRoot string, kernelSnapInfo *KernelSnapInfo, | |||
if options.Mount && vs.Label != "" && vs.HasFilesystem() { | |||
// fs is taken from gadget, as on disk one might be displayed as | |||
// crypto_LUKS, which is not useful for formatting. | |||
if err := mountFilesystem(fsDevice, vs.LinuxFilesystem(), getMntPointForPart(vs)); err != nil { | |||
if err := mountFilesystem(fsDevice, vs.LinuxFilesystem(), getMntPointForPart(vs), mntfsParams{}); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how come snap-bootstrap ended up with its own version of mount?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
even weirder, why do we use systemd-mount in snap-bootstrap and not here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Prerequisite for changing mount flags during install mode for ubuntu-save