Skip to content

Commit e54a999

Browse files
committed
fix: permissions sync
It turns out permissions are hardcoded to "rwm" so they are synced (because not specifying anything ends up as setting rwm in the generated oci spec) but if someone ever changes rwm to sth else in the call to DeviceFromPath, it won't be effective Signed-off-by: Raphael Glon <[email protected]>
1 parent 786aa3b commit e54a999

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

internal/edits/device.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,11 @@ func (d device) fromPathOrDefault() *specs.DeviceNode {
7272
}
7373

7474
return &specs.DeviceNode{
75-
HostPath: d.HostPath,
76-
Path: d.Path,
77-
Major: dn.Major,
78-
Minor: dn.Minor,
79-
FileMode: &dn.FileMode,
75+
HostPath: d.HostPath,
76+
Path: d.Path,
77+
Major: dn.Major,
78+
Minor: dn.Minor,
79+
FileMode: &dn.FileMode,
80+
Permissions: string(*&dn.Permissions),
8081
}
8182
}

0 commit comments

Comments
 (0)