Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f5bbbd74c |
@@ -217,8 +217,8 @@ impl Server {
|
|||||||
|
|
||||||
// Initial scan (delayed to let crash recovery finish first)
|
// Initial scan (delayed to let crash recovery finish first)
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
// Wait for crash recovery to start containers before scanning
|
// Brief delay for containers to stabilize after boot
|
||||||
tokio::time::sleep(Duration::from_secs(15)).await;
|
tokio::time::sleep(Duration::from_secs(3)).await;
|
||||||
info!("🐳 Scanning containers...");
|
info!("🐳 Scanning containers...");
|
||||||
if let Err(e) = scan_and_update_packages(&scanner, &state, identity_clone.as_ref()).await {
|
if let Err(e) = scan_and_update_packages(&scanner, &state, identity_clone.as_ref()).await {
|
||||||
error!("Failed to scan containers: {}", e);
|
error!("Failed to scan containers: {}", e);
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ Type=notify
|
|||||||
User=archipelago
|
User=archipelago
|
||||||
Environment="ARCHIPELAGO_BIND=0.0.0.0:5678"
|
Environment="ARCHIPELAGO_BIND=0.0.0.0:5678"
|
||||||
Environment="ARCHIPELAGO_DEV_MODE=true"
|
Environment="ARCHIPELAGO_DEV_MODE=true"
|
||||||
|
Environment="XDG_RUNTIME_DIR=/run/user/1000"
|
||||||
ExecStartPre=/bin/bash -c 'mkdir -p /var/lib/archipelago && echo "ARCHIPELAGO_HOST_IP=$(hostname -I 2>/dev/null | awk "{print $$1}")" > /var/lib/archipelago/host-ip.env'
|
ExecStartPre=/bin/bash -c 'mkdir -p /var/lib/archipelago && echo "ARCHIPELAGO_HOST_IP=$(hostname -I 2>/dev/null | awk "{print $$1}")" > /var/lib/archipelago/host-ip.env'
|
||||||
ExecStart=/usr/local/bin/archipelago
|
ExecStart=/usr/local/bin/archipelago
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
@@ -17,8 +18,10 @@ TimeoutStartSec=300
|
|||||||
|
|
||||||
# Filesystem protection
|
# Filesystem protection
|
||||||
ProtectSystem=strict
|
ProtectSystem=strict
|
||||||
ProtectHome=yes
|
# ProtectHome=no: rootless podman needs writable ~/.local/share/containers
|
||||||
PrivateTmp=yes
|
ProtectHome=no
|
||||||
|
# PrivateTmp disabled: rootless podman runtime lives in /tmp/podman-run-UID/
|
||||||
|
# and must be shared between the service and SSH-created containers
|
||||||
ReadWritePaths=/var/lib/archipelago /etc/containers /var/lib/containers /run/containers /run/user /tmp
|
ReadWritePaths=/var/lib/archipelago /etc/containers /var/lib/containers /run/containers /run/user /tmp
|
||||||
|
|
||||||
# Privilege restriction — restored with rootless podman (no sudo needed)
|
# Privilege restriction — restored with rootless podman (no sudo needed)
|
||||||
@@ -30,14 +33,11 @@ SupplementaryGroups=dialout
|
|||||||
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
|
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
|
||||||
|
|
||||||
# Restrict what the process can do
|
# Restrict what the process can do
|
||||||
RestrictNamespaces=yes
|
# RestrictNamespaces disabled: rootless podman creates user namespaces
|
||||||
RestrictRealtime=yes
|
RestrictRealtime=yes
|
||||||
RestrictSUIDSGID=yes
|
|
||||||
|
|
||||||
# Only allow needed syscalls
|
# SystemCallFilter disabled: rootless podman needs clone/unshare for user namespaces
|
||||||
SystemCallArchitectures=native
|
SystemCallArchitectures=native
|
||||||
SystemCallFilter=@system-service
|
|
||||||
SystemCallFilter=~@privileged @resources
|
|
||||||
|
|
||||||
# Memory protection
|
# Memory protection
|
||||||
MemoryDenyWriteExecute=yes
|
MemoryDenyWriteExecute=yes
|
||||||
|
|||||||
Reference in New Issue
Block a user