summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2014-07-20 15:15:45 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-08-06 10:29:32 +0200
commit16cd3d5599d7bfe6ef4918142b9233ae2354f200 (patch)
treefce029e8d5a4c87db31d2a5bb2e4180a233cdf4f
parente14cad512af789c78ab56c6f205f77a20a151316 (diff)
downloadsssd-16cd3d5599d7bfe6ef4918142b9233ae2354f200.tar.gz
sssd-16cd3d5599d7bfe6ef4918142b9233ae2354f200.tar.xz
sssd-16cd3d5599d7bfe6ef4918142b9233ae2354f200.zip
UTIL: remove get_username_from_uid
The function was unused since 2009 and moreover it was synchronous. Reviewed-by: Pavel Reichl <preichl@redhat.com>
-rw-r--r--src/util/usertools.c12
-rw-r--r--src/util/util.h2
2 files changed, 0 insertions, 14 deletions
diff --git a/src/util/usertools.c b/src/util/usertools.c
index 06384b849..0ee167b8e 100644
--- a/src/util/usertools.c
+++ b/src/util/usertools.c
@@ -35,18 +35,6 @@
#define NAME_DOMAIN_PATTERN_OPTIONS (PCRE_DUPNAMES | PCRE_EXTENDED)
#endif
-char *get_username_from_uid(TALLOC_CTX *mem_ctx, uid_t uid)
-{
- char *username;
- struct passwd *pwd;
-
- pwd = getpwuid(uid);
- if (!pwd) return NULL;
-
- username = talloc_strdup(mem_ctx, pwd->pw_name);
- return username;
-}
-
/* Function returns given realm name as new uppercase string */
char *get_uppercase_realm(TALLOC_CTX *memctx, const char *name)
{
diff --git a/src/util/util.h b/src/util/util.h
index 35a8814e5..b638df99a 100644
--- a/src/util/util.h
+++ b/src/util/util.h
@@ -265,8 +265,6 @@ void *sss_mem_attach(TALLOC_CTX *mem_ctx,
int password_destructor(void *memctx);
/* from usertools.c */
-char *get_username_from_uid(TALLOC_CTX *mem_ctx, uid_t uid);
-
char *get_uppercase_realm(TALLOC_CTX *memctx, const char *name);
struct sss_names_ctx {