summaryrefslogtreecommitdiffstats
path: root/src/core/unit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-01-21 11:51:45 +0100
committerLennart Poettering <lennart@poettering.net>2020-01-21 11:51:45 +0100
commitb90cf10245bc1252d75e42aff91c9894cb49b002 (patch)
tree11c0209c9882f030bf5706ae5add7839359de483 /src/core/unit.c
parentcore: show the UID we cannot parse (diff)
downloadsystemd-b90cf10245bc1252d75e42aff91c9894cb49b002.tar.xz
systemd-b90cf10245bc1252d75e42aff91c9894cb49b002.zip
core: make a number of functions not used externally static
Diffstat (limited to 'src/core/unit.c')
-rw-r--r--src/core/unit.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index 0c03b363db..c629a1a9ce 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -5066,14 +5066,21 @@ static void unit_unref_uid_internal(
*ref_uid = UID_INVALID;
}
-void unit_unref_uid(Unit *u, bool destroy_now) {
+static void unit_unref_uid(Unit *u, bool destroy_now) {
unit_unref_uid_internal(u, &u->ref_uid, destroy_now, manager_unref_uid);
}
-void unit_unref_gid(Unit *u, bool destroy_now) {
+static void unit_unref_gid(Unit *u, bool destroy_now) {
unit_unref_uid_internal(u, (uid_t*) &u->ref_gid, destroy_now, manager_unref_gid);
}
+void unit_unref_uid_gid(Unit *u, bool destroy_now) {
+ assert(u);
+
+ unit_unref_uid(u, destroy_now);
+ unit_unref_gid(u, destroy_now);
+}
+
static int unit_ref_uid_internal(
Unit *u,
uid_t *ref_uid,
@@ -5112,11 +5119,11 @@ static int unit_ref_uid_internal(
return 1;
}
-int unit_ref_uid(Unit *u, uid_t uid, bool clean_ipc) {
+static int unit_ref_uid(Unit *u, uid_t uid, bool clean_ipc) {
return unit_ref_uid_internal(u, &u->ref_uid, uid, clean_ipc, manager_ref_uid);
}
-int unit_ref_gid(Unit *u, gid_t gid, bool clean_ipc) {
+static int unit_ref_gid(Unit *u, gid_t gid, bool clean_ipc) {
return unit_ref_uid_internal(u, (uid_t*) &u->ref_gid, (uid_t) gid, clean_ipc, manager_ref_gid);
}
@@ -5161,13 +5168,6 @@ int unit_ref_uid_gid(Unit *u, uid_t uid, gid_t gid) {
return r;
}
-void unit_unref_uid_gid(Unit *u, bool destroy_now) {
- assert(u);
-
- unit_unref_uid(u, destroy_now);
- unit_unref_gid(u, destroy_now);
-}
-
void unit_notify_user_lookup(Unit *u, uid_t uid, gid_t gid) {
int r;