config: fix /var/log and /var/run permissions; remove invalid rtcd uid field
- /var/log and /var/run: override base.toml's 0o755 (root-only write) to 0o1777 (sticky-bit world-writable) so log/run daemons running under non-root users (messagebus, etc.) can create files in them. - 00_rtcd.service: remove invalid uid=0 field. The init service parser uses serde(deny_unknown_fields) and only accepts cmd, args, envs, inherit_envs, type — uid caused 'unknown field uid' parse error.
This commit is contained in:
@@ -308,6 +308,21 @@ class = 0x04
|
||||
subclass = 0x01
|
||||
"""
|
||||
|
||||
# Real-time clock daemon — reads CMOS/RTC and sets system time offset.
|
||||
# Must run as uid=0 (CAP_SYS_TIME) to write /scheme/sys/update_time_offset.
|
||||
# Included in initfs via base-initfs/recipe.toml.
|
||||
[[files]]
|
||||
path = "/etc/init.d/00_rtcd.service"
|
||||
data = """
|
||||
[unit]
|
||||
description = "Real-time clock daemon (sets system time from hardware RTC)"
|
||||
default_dependencies = false
|
||||
|
||||
[service]
|
||||
cmd = "/bin/rtcd"
|
||||
type = "oneshot"
|
||||
"""
|
||||
|
||||
[[files]]
|
||||
path = "/etc/init.d/00_acpid.service"
|
||||
data = """
|
||||
|
||||
@@ -32,4 +32,19 @@ default_dependencies = false
|
||||
[service]
|
||||
cmd = "audiod"
|
||||
type = "oneshot_async"
|
||||
"""
|
||||
"""
|
||||
|
||||
# Override base.toml's /var/log and /var/run from 0o755 to 0o1777 so
|
||||
# log/run daemons running under non-root users (messagebus, etc.) can
|
||||
# write to them. Sticky bit is standard for /var/log and /var/run.
|
||||
[[files]]
|
||||
path = "/var/log"
|
||||
data = ""
|
||||
directory = true
|
||||
mode = 0o1777
|
||||
|
||||
[[files]]
|
||||
path = "/var/run"
|
||||
data = ""
|
||||
directory = true
|
||||
mode = 0o1777
|
||||
Reference in New Issue
Block a user