[SSSD] [PATCH] UTIL: remove get_username_from_uid
Jakub Hrozek
jhrozek at redhat.com
Tue Aug 5 11:10:07 UTC 2014
Hi,
a trivial patch I created when working on the non-root RFE.
-------------- next part --------------
>From df3b98be47f53ecb5678877c41d0b6042dcb7d19 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek at redhat.com>
Date: Sun, 20 Jul 2014 15:15:45 +0200
Subject: [PATCH] UTIL: remove get_username_from_uid
The function was unused since 2009 and moreover it was synchronous.
---
src/util/usertools.c | 12 ------------
src/util/util.h | 2 --
2 files changed, 14 deletions(-)
diff --git a/src/util/usertools.c b/src/util/usertools.c
index 06384b8491b412d12dfb39a4ca8a614925996b0a..0ee167b8ef3f20e2a21bd596f6aafc3bfae9e46e 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 35a8814e587d3050a265d9b82d88095fb82d4680..b638df99aee00d8b133555ace1ee5bd290dfecf4 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 {
--
1.9.3
More information about the sssd-devel
mailing list