Remove No New Privs from DB as it's already in the spec

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #383
Approved by: rhatdan
This commit is contained in:
Matthew Heon
2018-02-22 12:55:39 -05:00
committed by Atomic Bot
parent 6a4fcb168a
commit 8eadc208e1
5 changed files with 7 additions and 68 deletions

View File

@ -106,11 +106,6 @@ func (j *ContainerConfig) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
} else {
buf.WriteString(`"privileged":false`)
}
if j.NoNewPrivs {
buf.WriteString(`,"noNewPrivs":true`)
} else {
buf.WriteString(`,"noNewPrivs":false`)
}
buf.WriteByte(',')
if len(j.ProcessLabel) != 0 {
buf.WriteString(`"ProcessLabel":`)
@ -343,8 +338,6 @@ const (
ffjtContainerConfigPrivileged
ffjtContainerConfigNoNewPrivs
ffjtContainerConfigProcessLabel
ffjtContainerConfigMountLabel
@ -416,8 +409,6 @@ var ffjKeyContainerConfigMounts = []byte("mounts")
var ffjKeyContainerConfigPrivileged = []byte("privileged")
var ffjKeyContainerConfigNoNewPrivs = []byte("noNewPrivs")
var ffjKeyContainerConfigProcessLabel = []byte("ProcessLabel")
var ffjKeyContainerConfigMountLabel = []byte("MountLabel")
@ -649,11 +640,6 @@ mainparse:
state = fflib.FFParse_want_colon
goto mainparse
} else if bytes.Equal(ffjKeyContainerConfigNoNewPrivs, kn) {
currentKey = ffjtContainerConfigNoNewPrivs
state = fflib.FFParse_want_colon
goto mainparse
} else if bytes.Equal(ffjKeyContainerConfigNetNsCtr, kn) {
currentKey = ffjtContainerConfigNetNsCtr
state = fflib.FFParse_want_colon
@ -887,12 +873,6 @@ mainparse:
goto mainparse
}
if fflib.EqualFoldRight(ffjKeyContainerConfigNoNewPrivs, kn) {
currentKey = ffjtContainerConfigNoNewPrivs
state = fflib.FFParse_want_colon
goto mainparse
}
if fflib.SimpleLetterEqualFold(ffjKeyContainerConfigPrivileged, kn) {
currentKey = ffjtContainerConfigPrivileged
state = fflib.FFParse_want_colon
@ -1018,9 +998,6 @@ mainparse:
case ffjtContainerConfigPrivileged:
goto handle_Privileged
case ffjtContainerConfigNoNewPrivs:
goto handle_NoNewPrivs
case ffjtContainerConfigProcessLabel:
goto handle_ProcessLabel
@ -1480,41 +1457,6 @@ handle_Privileged:
state = fflib.FFParse_after_value
goto mainparse
handle_NoNewPrivs:
/* handler: j.NoNewPrivs type=bool kind=bool quoted=false*/
{
if tok != fflib.FFTok_bool && tok != fflib.FFTok_null {
return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok))
}
}
{
if tok == fflib.FFTok_null {
} else {
tmpb := fs.Output.Bytes()
if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 {
j.NoNewPrivs = true
} else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 {
j.NoNewPrivs = false
} else {
err = errors.New("unexpected bytes for true/false value")
return fs.WrapErr(err)
}
}
}
state = fflib.FFParse_after_value
goto mainparse
handle_ProcessLabel:
/* handler: j.ProcessLabel type=string kind=string quoted=false*/