Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(iris): enforce sandbox child process belongs to nobody-user(65534… #2257

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apps/iris/src/common/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,6 @@ const (
EXCHANGE = "judger-exchange"
RESULT_KEY = "result"
)

const DEFAULT_UID = 65534 // nobody user
const DEFAULT_GID = 65534 // nobody group
2 changes: 2 additions & 0 deletions apps/iris/src/service/sandbox/langConfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ func (l *langConfig) ToRunExecArgs(dir string, language Language, order int, lim
ErrorPath: errorPath, // byte buffer로
LogPath: constants.RUN_LOG_PATH,
SeccompRuleName: c.SeccompRule,
Uid: constants.DEFAULT_UID,
Gid: constants.DEFAULT_GID,
Args: argSlice,
}, nil
}
Expand Down
Loading