Skip to content

Commit 700c74c

Browse files
author
Harshal Patil
committed
Issue #1429 : Removing check for id string length
Signed-off-by: Harshal Patil <[email protected]>
1 parent 992a5be commit 700c74c

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

libcontainer/factory_linux.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@ const (
2727
execFifoFilename = "exec.fifo"
2828
)
2929

30-
var (
31-
idRegex = regexp.MustCompile(`^[\w+-\.]+$`)
32-
maxIdLen = 1024
33-
)
30+
var idRegex = regexp.MustCompile(`^[\w+-\.]+$`)
3431

3532
// InitArgs returns an options func to configure a LinuxFactory with the
3633
// provided init binary path and arguments.
@@ -330,8 +327,6 @@ func (l *LinuxFactory) validateID(id string) error {
330327
if !idRegex.MatchString(id) {
331328
return newGenericError(fmt.Errorf("invalid id format: %v", id), InvalidIdFormat)
332329
}
333-
if len(id) > maxIdLen {
334-
return newGenericError(fmt.Errorf("invalid id format: %v", id), InvalidIdFormat)
335-
}
330+
336331
return nil
337332
}

0 commit comments

Comments
 (0)