[feature]: add daemon flag to set no_new_priv as default for unprivileged containers#29984
[feature]: add daemon flag to set no_new_priv as default for unprivileged containers#29984anusha-ragunathan merged 1 commit intomoby:masterfrom
Conversation
|
As commented previously, we need to also support the old syntax without |
|
Actually old usage is still supported. I don't remove here. |
|
Ok, if you could add the tests then with the old and new forms, and a test of the daemon flag that would be great |
|
Sure, have done, please let me know if there is any problem. |
There was a problem hiding this comment.
this match is not very precise
There was a problem hiding this comment.
opt case: no-new-privileges|no-new-privileges=true|no-new-privileges=false
wrong input? no-new-privileges=abc?
There was a problem hiding this comment.
should not match : really-no-new-privileges, no-new-privileges-please=true etc
|
The test failure is which needs fixing (maybe changed at the time you rebased?) |
|
Have updated, please review again. |
There was a problem hiding this comment.
The way I read the linked issue this would be true by default. Is that not the case?
There was a problem hiding this comment.
I think it is false by default. @justincormack , what do you think?
There was a problem hiding this comment.
No, false by default, to be compatible with the current state, otherwise things will break.
There was a problem hiding this comment.
Maybe default-no-new-privileges otherwise it looks like it's doing something to do the daemon.
|
This one: #29951
Cleared up now, thanks.
…On 01/09/2017 06:29 PM, Daniel Zhang wrote:
jmzwcn commented on this pull request.
> @@ -89,6 +90,7 @@ func (config *Config) InstallFlags(flags *pflag.FlagSet) {
flags.Int64Var(&config.CPURealtimePeriod, "cpu-rt-period", 0, "Limit the CPU real-time period in microseconds")
flags.Int64Var(&config.CPURealtimeRuntime, "cpu-rt-runtime", 0, "Limit the CPU real-time runtime in microseconds")
flags.StringVar(&config.SeccompProfile, "seccomp-profile", "", "Path to seccomp profile")
+ flags.BoolVar(&config.NoNewPrivileges, "no-new-privileges", false, "Disable container processes from gaining new privileges")
which link? I think It is false by default.
|
13d259f to
22faa88
Compare
|
Sorry, its a bit hectic with getting 1.13 released, I will take a look
again soon...
…On 12 Jan 2017 2:50 p.m., "Daniel Zhang" ***@***.***> wrote:
Any review?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#29984 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAdcPH-3l4KTVb44FFr-nykK6mTRRxaLks5rRj2xgaJpZM4Ld3rr>
.
|
There was a problem hiding this comment.
Don't make this unrelated change (MTU is normal anyway)
There was a problem hiding this comment.
lower in this file there is also a section "This is a full example of the allowed configuration options on Linux:" which should also have this added as "no-new-privileges":false
There was a problem hiding this comment.
Seems not get what you said:
--no-new-privileges Disable container processes from gaining new privileges
how to modify?
There was a problem hiding this comment.
sorry I just mean in this section https://github.com/docker/docker/blob/master/docs/reference/commandline/dockerd.md#linux-configuration-file it needs to be added in the example config file.
|
Two minor comments but otherwise this looks fine, tested it thoroughly and it is working fine. Thanks very much for doing this. |
|
@jmzwcn It can go in a platform file, just that it will need to be defined on each platform. |
ec2aa4b to
dc6832a
Compare
cpuguy83
left a comment
There was a problem hiding this comment.
Nice, looks much cleaner. Thanks!
LGTM
|
The conflict happen again. If no problem, please merge ASAP. Thanks! |
…ners. Signed-off-by: Daniel Zhang <[email protected]>
|
ping @justincormack |
| } | ||
|
|
||
| // TestLegacyRunNoNewPrivSetuid checks that --security-opt=no-new-privileges prevents | ||
| // effective uid transtions on executing setuid binaries. |
|
The actual flag to set this got lost in a rebase, and was added again in #32944 |
[feature]: add daemon flag to set no_new_priv as default for unprivileged containers #29951
Signed-off-by: Daniel Zhang [email protected]