Skip to content

Commit

Permalink
Merge pull request #3468 from kolyshkin/no-tun
Browse files Browse the repository at this point in the history
Remove tun/tap from the default device rules
  • Loading branch information
thaJeztah committed May 10, 2022
2 parents 3394670 + 2ce40b6 commit 94105ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 23 deletions.
19 changes: 6 additions & 13 deletions libcontainer/cgroups/ebpf/devicefilter/devicefilter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,21 +120,14 @@ block-8:
51: Mov32Imm dst: r0 imm: 1
52: Exit
block-9:
// tuntap (c, 10, 200, rwm, allow)
// /dev/pts (c, 136, wildcard, rwm, true)
53: JNEImm dst: r2 off: -1 imm: 2 <block-10>
54: JNEImm dst: r4 off: -1 imm: 10 <block-10>
55: JNEImm dst: r5 off: -1 imm: 200 <block-10>
56: Mov32Imm dst: r0 imm: 1
57: Exit
54: JNEImm dst: r4 off: -1 imm: 136 <block-10>
55: Mov32Imm dst: r0 imm: 1
56: Exit
block-10:
// /dev/pts (c, 136, wildcard, rwm, true)
58: JNEImm dst: r2 off: -1 imm: 2 <block-11>
59: JNEImm dst: r4 off: -1 imm: 136 <block-11>
60: Mov32Imm dst: r0 imm: 1
61: Exit
block-11:
62: Mov32Imm dst: r0 imm: 0
63: Exit
57: Mov32Imm dst: r0 imm: 0
58: Exit
`
var devices []*devices.Rule
for _, device := range specconv.AllowedDevices {
Expand Down
10 changes: 0 additions & 10 deletions libcontainer/specconv/spec_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,16 +302,6 @@ var AllowedDevices = []*devices.Device{
Allow: true,
},
},
// tuntap
{
Rule: devices.Rule{
Type: devices.CharDevice,
Major: 10,
Minor: 200,
Permissions: "rwm",
Allow: true,
},
},
}

type CreateOpts struct {
Expand Down

0 comments on commit 94105ca

Please sign in to comment.