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

interfaces/time*_control: explicitly deny noisy read on /proc/1/environ #4216

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions interfaces/builtin/time_control.go
Expand Up @@ -74,6 +74,13 @@ dbus (receive)
# set-local-rtc commands.
/usr/bin/timedatectl{,.real} ixr,

# Silence this noisy denial. systemd utilities look at /proc/1/environ to see
# if running in a container, but they will fallback gracefully. No other
# interfaces allow this denial, so no problems with silencing it for now. Note
# that allowing this triggers a 'ptrace trace peer=unconfined' denial, which we
# want to avoid.
deny @{PROC}/1/environ r,

# Allow write access to system real-time clock
# See 'man 4 rtc' for details.

Expand Down
7 changes: 7 additions & 0 deletions interfaces/builtin/timeserver_control.go
Expand Up @@ -78,6 +78,13 @@ dbus (receive)
# D-Bus method for controlling network time synchronization via
# timedatectl's set-ntp command.
/usr/bin/timedatectl{,.real} ixr,

# Silence this noisy denial. systemd utilities look at /proc/1/environ to see
# if running in a container, but they will fallback gracefully. No other
# interfaces allow this denial, so no problems with silencing it for now. Note
# that allowing this triggers a 'ptrace trace peer=unconfined' denial, which we
# want to avoid.
deny @{PROC}/1/environ r,
`

func init() {
Expand Down
7 changes: 7 additions & 0 deletions interfaces/builtin/timezone_control.go
Expand Up @@ -80,6 +80,13 @@ dbus (receive)
# D-Bus method for setting the timezone via timedatectl's set-timezone
# command.
/usr/bin/timedatectl{,.real} ixr,

# Silence this noisy denial. systemd utilities look at /proc/1/environ to see
# if running in a container, but they will fallback gracefully. No other
# interfaces allow this denial, so no problems with silencing it for now. Note
# that allowing this triggers a 'ptrace trace peer=unconfined' denial, which we
# want to avoid.
deny @{PROC}/1/environ r,
`

func init() {
Expand Down