-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci_runner,executor: remove os-specific syscall (#4642)
- Loading branch information
Showing
5 changed files
with
30 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
//go:build unix | ||
|
||
package main | ||
|
||
import "syscall" | ||
|
||
func setUmask() { | ||
// The default umask (0022) has the effect of clearing the group-write and | ||
// others-write bits when setting up workspace directories, regardless of the | ||
// permissions bits passed to mkdir. We want to create these directories with | ||
// 0777 permissions in some cases, because we need those to be writable by the | ||
// container user, and it is too costly to enable those permissions via | ||
// explicit chown or chmod calls on those directories. So, we clear the umask | ||
// here to allow group-write and others-write permissions. | ||
syscall.Umask(0) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package main | ||
|
||
func setUmask() { | ||
} |