Skip to content

Commit

Permalink
Add AccessFSTruncate to access rights that apply to files
Browse files Browse the repository at this point in the history
AccessFSTruncate works also on a per file basis and can be used to e.g. overwrite an existing target file
like in this gist: https://gist.github.com/ngergs/b2ace345fbf8d682da33b5a4d869bb04
  • Loading branch information
ngergs committed Jul 30, 2024
1 parent db0c8d6 commit db159e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion landlock/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
// Access permission sets for filesystem access.
const (
// The set of access rights that only apply to files.
accessFile AccessFSSet = ll.AccessFSExecute | ll.AccessFSWriteFile | ll.AccessFSReadFile
accessFile AccessFSSet = ll.AccessFSExecute | ll.AccessFSWriteFile | ll.AccessFSTruncate | ll.AccessFSReadFile

// The set of access rights associated with read access to files and directories.
accessFSRead AccessFSSet = ll.AccessFSExecute | ll.AccessFSReadFile | ll.AccessFSReadDir
Expand Down

0 comments on commit db159e8

Please sign in to comment.