summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2014-08-27 18:03:29 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2014-08-27 18:42:28 +0200
commitf1566e63da92cee5cbc0074df9cd9a8dc078a62e (patch)
treeb22be9c41866a5ea82b0f59843db0e3cbf80320e
parent92e63a51052e9ba2fbe6e47a173b6264ae292a58 (diff)
util: make lookup_uid() global
This is a useful helper, make it global. It will be required for libsystemd-terminal, at minimum.
-rw-r--r--src/shared/util.c2
-rw-r--r--src/shared/util.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/shared/util.c b/src/shared/util.c
index fdcf5719f..9e4ff85ff 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -2604,7 +2604,7 @@ bool hostname_is_set(void) {
return !isempty(u.nodename) && !streq(u.nodename, "(none)");
}
-static char *lookup_uid(uid_t uid) {
+char *lookup_uid(uid_t uid) {
long bufsize;
char *name;
_cleanup_free_ char *buf = NULL;
diff --git a/src/shared/util.h b/src/shared/util.h
index ea87c9695..3401280d0 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -432,6 +432,7 @@ int sigprocmask_many(int how, ...);
bool hostname_is_set(void);
+char* lookup_uid(uid_t uid);
char* gethostname_malloc(void);
char* getlogname_malloc(void);
char* getusername_malloc(void);