diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2014-07-20 15:15:45 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-08-06 10:29:32 +0200 |
commit | 16cd3d5599d7bfe6ef4918142b9233ae2354f200 (patch) | |
tree | fce029e8d5a4c87db31d2a5bb2e4180a233cdf4f /src | |
parent | e14cad512af789c78ab56c6f205f77a20a151316 (diff) | |
download | sssd-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>
Diffstat (limited to 'src')
-rw-r--r-- | src/util/usertools.c | 12 | ||||
-rw-r--r-- | src/util/util.h | 2 |
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 { |