From 16cd3d5599d7bfe6ef4918142b9233ae2354f200 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Sun, 20 Jul 2014 15:15:45 +0200 Subject: UTIL: remove get_username_from_uid The function was unused since 2009 and moreover it was synchronous. Reviewed-by: Pavel Reichl --- src/util/usertools.c | 12 ------------ src/util/util.h | 2 -- 2 files changed, 14 deletions(-) (limited to 'src/util') 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 { -- cgit