Skip to content

Commit 9b42509

Browse files
committed
Changee open mode to only O_RDONLY
1 parent 3f9d1b8 commit 9b42509

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/ws-daemon/pkg/cgroup/plugin_fuse_v2.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func (c *FuseDeviceEnablerV2) Type() Version { return Version2 }
2323

2424
func (c *FuseDeviceEnablerV2) Apply(ctx context.Context, basePath, cgroupPath string) error {
2525
fullCgroupPath := filepath.Join(basePath, cgroupPath)
26-
cgroupFD, err := unix.Open(fullCgroupPath, unix.O_DIRECTORY|unix.O_RDONLY, 0o600)
26+
cgroupFD, err := unix.Open(fullCgroupPath, unix.O_RDONLY, 0o600)
2727
if err != nil {
2828
return xerrors.Errorf("cannot get directory fd for %s: %w", fullCgroupPath, err)
2929
}

0 commit comments

Comments
 (0)