23 Star 0 Fork 0

openKylin/uptimed

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
uptimed-0001-systemd-unit-run-as-daemon-user-not-root.patch 1.08 KB
一键复制 编辑 原始数据 按行查看 历史
kylin-mayukun 提交于 2024-10-12 15:54 . first commit
From 2ba2f22b91c064851a0b824402dec200771357a8 Mon Sep 17 00:00:00 2001
From: Tomasz Torcz <tomek@pipebreaker.pl>
Date: Wed, 13 May 2015 14:09:44 +0200
Subject: [PATCH] systemd unit: run as 'daemon' user, not root
Debian has been running uptimed as 'daemon' for three years now.
Root permissions are unneccessary. Packagers should ensure that
/var/spool/uptimed is chown'ed on upgrade.
---
ChangeLog | 7 +++++++
etc/uptimed.service.in | 1 +
2 files changed, 8 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 0452ee3..278df5a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+0.4.
+-----
+
+- systemd unit: run as 'daemon' user, not root;
+ packagers should make sure to chown /var/spool/uptimed/
+ on update
+
0.4.0
-----
diff --git a/etc/uptimed.service.in b/etc/uptimed.service.in
index 780420f..8ebd032 100644
--- a/etc/uptimed.service.in
+++ b/etc/uptimed.service.in
@@ -6,6 +6,7 @@ Documentation=man:uptimed(8) man:uprecords(1)
Type=notify
ExecStart=@prefix@/sbin/uptimed -f
Restart=on-failure
+User=daemon
[Install]
WantedBy=multi-user.target
--
2.1.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openkylin/uptimed.git
git@gitee.com:openkylin/uptimed.git
openkylin
uptimed
uptimed
master

搜索帮助