Compare commits
2 Commits
97c9305669
...
32a3bad93e
Author | SHA1 | Date | |
---|---|---|---|
32a3bad93e | |||
1e534950d8 |
@ -153,14 +153,14 @@ func (s *SandboxConfig) Bwrap(os linux.System) (*bwrap.Config, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if s.AutoEtc {
|
if s.AutoEtc {
|
||||||
etc := s.Etc
|
if s.Etc == "" {
|
||||||
if etc == "" {
|
conf.Bind("/etc", Tmp+"/etc")
|
||||||
etc = "/etc"
|
} else {
|
||||||
|
conf.Bind(s.Etc, Tmp+"/etc")
|
||||||
}
|
}
|
||||||
conf.Bind(etc, Tmp+"/etc")
|
|
||||||
|
|
||||||
// link host /etc contents to prevent passwd/group from being overwritten
|
// link host /etc contents to prevent passwd/group from being overwritten
|
||||||
if d, err := os.ReadDir(etc); err != nil {
|
if d, err := os.ReadDir("/etc"); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
} else {
|
} else {
|
||||||
for _, ent := range d {
|
for _, ent := range d {
|
||||||
|
Loading…
Reference in New Issue
Block a user