Compare commits
2 Commits
8dca6c7d5d
...
10ef06a3b2
Author | SHA1 | Date | |
---|---|---|---|
10ef06a3b2 | |||
93e48a1590 |
@ -81,7 +81,6 @@ type SandboxConfig struct {
|
||||
}
|
||||
|
||||
type ExtraPermConfig struct {
|
||||
Ensure bool `json:"ensure,omitempty"`
|
||||
Path string `json:"path"`
|
||||
Read bool `json:"r,omitempty"`
|
||||
Write bool `json:"w,omitempty"`
|
||||
@ -89,12 +88,8 @@ type ExtraPermConfig struct {
|
||||
}
|
||||
|
||||
func (e *ExtraPermConfig) String() string {
|
||||
buf := make([]byte, 0, 5+len(e.Path))
|
||||
buf = append(buf, '-', '-', '-')
|
||||
if e.Ensure {
|
||||
buf = append(buf, '+')
|
||||
}
|
||||
buf = append(buf, ':')
|
||||
buf := make([]byte, 0, 4+len(e.Path))
|
||||
buf = append(buf, '-', '-', '-', ':')
|
||||
buf = append(buf, []byte(e.Path)...)
|
||||
if e.Read {
|
||||
buf[0] = 'r'
|
||||
|
@ -63,9 +63,8 @@ type appSeal struct {
|
||||
}
|
||||
|
||||
type sealedExtraPerm struct {
|
||||
name string
|
||||
perms acl.Perms
|
||||
ensure bool
|
||||
name string
|
||||
perms acl.Perms
|
||||
}
|
||||
|
||||
// Seal seals the app launch context
|
||||
@ -170,7 +169,6 @@ func (a *app) Seal(config *fst.Config) error {
|
||||
if p.Execute {
|
||||
seal.extraPerms[i].perms = append(seal.extraPerms[i].perms, acl.Execute)
|
||||
}
|
||||
seal.extraPerms[i].ensure = p.Ensure
|
||||
}
|
||||
|
||||
// map sandbox config to bwrap
|
||||
|
@ -297,9 +297,6 @@ func (seal *appSeal) setupShares(bus [2]*dbus.Config, os linux.System) error {
|
||||
if p == nil {
|
||||
continue
|
||||
}
|
||||
if p.ensure {
|
||||
seal.sys.Ensure(p.name, 0700)
|
||||
}
|
||||
seal.sys.UpdatePermType(system.User, p.name, p.perms...)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user