From 50e78e3f7f0e1751a594214d1e25f06ca371035d Mon Sep 17 00:00:00 2001
From: Yu Watanabe <watanabe.yu+github@gmail.com>
Date: Wed, 11 Oct 2017 12:46:27 +0900
Subject: [PATCH] dynamic-user: label functions not necessary to export as
static
(cherry picked from commit 9da440b1b3d8476394e6ffcaf687e0f89932e6ac)
---
src/core/dynamic-user.c | 12 ++++++------
src/core/dynamic-user.h | 9 ---------
2 files changed, 6 insertions(+), 15 deletions(-)
diff --git a/src/core/dynamic-user.c b/src/core/dynamic-user.c
index f1b5ee7ecb..a191341186 100644
--- a/src/core/dynamic-user.c
+++ b/src/core/dynamic-user.c
@@ -82,7 +82,7 @@ static int dynamic_user_add(Manager *m, const char *name, int storage_socket[2],
return 0;
}
-int dynamic_user_acquire(Manager *m, const char *name, DynamicUser** ret) {
+static int dynamic_user_acquire(Manager *m, const char *name, DynamicUser** ret) {
_cleanup_close_pair_ int storage_socket[2] = { -1, -1 };
DynamicUser *d;
int r;
@@ -421,7 +421,7 @@ static void unlink_uid_lock(int lock_fd, uid_t uid, const char *name) {
(void) make_uid_symlinks(uid, name, false); /* remove direct lookup symlinks */
}
-int dynamic_user_realize(DynamicUser *d, char **suggested_dirs, uid_t *ret) {
+static int dynamic_user_realize(DynamicUser *d, char **suggested_dirs, uid_t *ret) {
_cleanup_close_ int etc_passwd_lock_fd = -1, uid_lock_fd = -1;
uid_t uid = UID_INVALID;
@@ -526,7 +526,7 @@ finish:
return r;
}
-int dynamic_user_current(DynamicUser *d, uid_t *ret) {
+static int dynamic_user_current(DynamicUser *d, uid_t *ret) {
_cleanup_close_ int lock_fd = -1;
uid_t uid;
int r;
@@ -555,7 +555,7 @@ finish:
return r;
}
-DynamicUser* dynamic_user_ref(DynamicUser *d) {
+static DynamicUser* dynamic_user_ref(DynamicUser *d) {
if (!d)
return NULL;
@@ -565,7 +565,7 @@ DynamicUser* dynamic_user_ref(DynamicUser *d) {
return d;
}
-DynamicUser* dynamic_user_unref(DynamicUser *d) {
+static DynamicUser* dynamic_user_unref(DynamicUser *d) {
if (!d)
return NULL;
@@ -608,7 +608,7 @@ finish:
return r;
}
-DynamicUser* dynamic_user_destroy(DynamicUser *d) {
+static DynamicUser* dynamic_user_destroy(DynamicUser *d) {
if (!d)
return NULL;
diff --git a/src/core/dynamic-user.h b/src/core/dynamic-user.h
index e7de4f46ae..a0cb378115 100644
--- a/src/core/dynamic-user.h
+++ b/src/core/dynamic-user.h
@@ -43,15 +43,6 @@ struct DynamicUser {
char name[];
};
-int dynamic_user_acquire(Manager *m, const char *name, DynamicUser **ret);
-
-int dynamic_user_realize(DynamicUser *d, char **suggested_paths, uid_t *ret);
-int dynamic_user_current(DynamicUser *d, uid_t *ret);
-
-DynamicUser* dynamic_user_ref(DynamicUser *d);
-DynamicUser* dynamic_user_unref(DynamicUser *d);
-DynamicUser* dynamic_user_destroy(DynamicUser *d);
-
int dynamic_user_serialize(Manager *m, FILE *f, FDSet *fds);
void dynamic_user_deserialize_one(Manager *m, const char *value, FDSet *fds);
void dynamic_user_vacuum(Manager *m, bool close_user);