Skip to content

feat: add ability to mount generated /etc/passwd file to containers#197

Merged
matthewpi merged 1 commit into
developfrom
passwd
Jul 24, 2024
Merged

feat: add ability to mount generated /etc/passwd file to containers#197
matthewpi merged 1 commit into
developfrom
passwd

Conversation

@matthewpi
Copy link
Copy Markdown
Member

Supersedes #172

Comment thread config/config.go Fixed
Comment thread config/config.go Fixed
@matthewpi matthewpi force-pushed the passwd branch 2 times, most recently from 5a4b29f to 8d3163a Compare July 24, 2024 19:57
Comment thread config/config.go
nogroup:x:65534:`,
_config.System.User.Gid,
))
if err := os.WriteFile(filepath.Join(passwd.Directory, "group"), v, 0o644); err != nil {

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression

This path depends on a [user-provided value](1).
Comment thread config/config.go
_config.System.User.Uid,
_config.System.User.Gid,
))
if err := os.WriteFile(filepath.Join(passwd.Directory, "passwd"), v, 0o644); err != nil {

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression

This path depends on a [user-provided value](1).
Comment thread config/config.go

if _config.System.Passwd.Enable {
log.WithField("path", _config.System.Passwd.Directory).Debug("ensuring passwd directory exists")
if err := os.MkdirAll(_config.System.Passwd.Directory, 0o755); err != nil {

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression

This path depends on a [user-provided value](1).
This PR will add an option to mount:
- `/etc/group`
- `/etc/passwd`

Signed-off-by: Matthew Penner <me@matthewp.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants