lib/util: Remove dummy wrapper for getpwuid().
authorJelmer Vernooij <jelmer@samba.org>
Sat, 24 Mar 2012 14:25:05 +0000 (15:25 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 24 Mar 2012 14:25:05 +0000 (15:25 +0100)
lib/util/util_pw.c
lib/util/util_pw.h
source3/auth/token_util.c
source3/passdb/pdb_interface.c
source3/torture/cmd_vfs.c

index 981e017ab2524a904fb906e85ef154befb09a37b..5ee4456759920ef8aa8bf03cd3ef6085a907ead3 100644 (file)
 #include "lib/util/util_pw.h"
 
 /**************************************************************************
- Wrappers for getpwuid(), getgrnam(), getgrgid()
+ Wrappers for getgrnam(), getgrgid()
 ****************************************************************************/
 
-struct passwd *sys_getpwuid(uid_t uid)
-{
-       return getpwuid(uid);
-}
-
 struct group *sys_getgrnam(const char *name)
 {
        return getgrnam(name);
@@ -92,7 +87,7 @@ struct passwd *getpwuid_alloc(TALLOC_CTX *mem_ctx, uid_t uid)
 {
        struct passwd *temp;
 
-       temp = sys_getpwuid(uid);
+       temp = getpwuid(uid);
        
        if (!temp) {
 #if 0
index ffbb4c069188fce2cc9d7f5ba0ca99d0093118dd..b46197b9ce0718d743109587770657c31e1e197e 100644 (file)
@@ -24,7 +24,6 @@
 #ifndef __LIB_UTIL_UTIL_PW_H__
 #define __LIB_UTIL_UTIL_PW_H__
 
-struct passwd *sys_getpwuid(uid_t uid);
 struct group *sys_getgrnam(const char *name);
 struct group *sys_getgrgid(gid_t gid);
 struct passwd *tcopy_passwd(TALLOC_CTX *mem_ctx,
index a84bcc12476b0ad6d930319d84c23b6642785e47..4a88a6bb72521e4aee346d3b03eb48969fdc4d0e 100644 (file)
@@ -93,9 +93,9 @@ struct security_token *get_root_nt_token( void )
                        cache_data, struct security_token);
        }
 
-       if ( !(pw = sys_getpwuid(0)) ) {
+       if ( !(pw = getpwuid(0)) ) {
                if ( !(pw = getpwnam("root")) ) {
-                       DEBUG(0,("get_root_nt_token: both sys_getpwuid(0) "
+                       DEBUG(0,("get_root_nt_token: both getpwuid(0) "
                                "and getpwnam(\"root\") failed!\n"));
                        return NULL;
                }
index 410ea77037c03a9aac177f4fa5797b625ed6ab44..c5fe56c87d5ab47494c40b3c8ab5faaba73539ab 100644 (file)
@@ -1387,7 +1387,7 @@ static bool pdb_default_uid_to_sid(struct pdb_methods *methods, uid_t uid,
        struct passwd *unix_pw;
        bool ret;
 
-       unix_pw = sys_getpwuid( uid );
+       unix_pw = getpwuid( uid );
 
        if ( !unix_pw ) {
                DEBUG(4,("pdb_default_uid_to_sid: host has no idea of uid "
index 779601a90b379eefeefdad953bf476ae78328111..11d19184e447d871c4cb8278c282edc4ff54788f 100644 (file)
@@ -607,7 +607,7 @@ static NTSTATUS cmd_stat(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, c
        st = smb_fname->st;
        TALLOC_FREE(smb_fname);
 
-       pwd = sys_getpwuid(st.st_ex_uid);
+       pwd = getpwuid(st.st_ex_uid);
        if (pwd != NULL) user = pwd->pw_name;
        else user = null_string;
        grp = sys_getgrgid(st.st_ex_gid);
@@ -678,7 +678,7 @@ static NTSTATUS cmd_fstat(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc,
                return NT_STATUS_UNSUCCESSFUL;
        }
 
-       pwd = sys_getpwuid(st.st_ex_uid);
+       pwd = getpwuid(st.st_ex_uid);
        if (pwd != NULL) user = pwd->pw_name;
        else user = null_string;
        grp = sys_getgrgid(st.st_ex_gid);
@@ -747,7 +747,7 @@ static NTSTATUS cmd_lstat(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc,
        st = smb_fname->st;
        TALLOC_FREE(smb_fname);
 
-       pwd = sys_getpwuid(st.st_ex_uid);
+       pwd = getpwuid(st.st_ex_uid);
        if (pwd != NULL) user = pwd->pw_name;
        else user = null_string;
        grp = sys_getgrgid(st.st_ex_gid);