lib/util: Remove dummy wrapper for getpwnam().
authorJelmer Vernooij <jelmer@samba.org>
Sat, 24 Mar 2012 14:24:15 +0000 (15:24 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 24 Mar 2012 14:24:15 +0000 (15:24 +0100)
lib/util/util_pw.c
lib/util/util_pw.h
source3/auth/token_util.c
source3/lib/username.c
source3/rpc_server/srvsvc/srv_srvsvc_nt.c

index 43ac0b3467cd127ab455fd3ae1ded9e252ff0425..981e017ab2524a904fb906e85ef154befb09a37b 100644 (file)
 #include "lib/util/util_pw.h"
 
 /**************************************************************************
- Wrappers for getpwnam(), getpwuid(), getgrnam(), getgrgid()
+ Wrappers for getpwuid(), getgrnam(), getgrgid()
 ****************************************************************************/
 
-struct passwd *sys_getpwnam(const char *name)
-{
-       return getpwnam(name);
-}
-
 struct passwd *sys_getpwuid(uid_t uid)
 {
        return getpwuid(uid);
@@ -75,7 +70,7 @@ struct passwd *getpwnam_alloc(TALLOC_CTX *mem_ctx, const char *name)
 {
        struct passwd *temp;
 
-       temp = sys_getpwnam(name);
+       temp = getpwnam(name);
        
        if (!temp) {
 #if 0
index b572502fc55e612aa6b7da98422d6aa3524cfa5d..ffbb4c069188fce2cc9d7f5ba0ca99d0093118dd 100644 (file)
@@ -24,7 +24,6 @@
 #ifndef __LIB_UTIL_UTIL_PW_H__
 #define __LIB_UTIL_UTIL_PW_H__
 
-struct passwd *sys_getpwnam(const char *name);
 struct passwd *sys_getpwuid(uid_t uid);
 struct group *sys_getgrnam(const char *name);
 struct group *sys_getgrgid(gid_t gid);
index 87f57b66ee5530c29ab730a855447cdbf6e234fc..a84bcc12476b0ad6d930319d84c23b6642785e47 100644 (file)
@@ -94,9 +94,9 @@ struct security_token *get_root_nt_token( void )
        }
 
        if ( !(pw = sys_getpwuid(0)) ) {
-               if ( !(pw = sys_getpwnam("root")) ) {
+               if ( !(pw = getpwnam("root")) ) {
                        DEBUG(0,("get_root_nt_token: both sys_getpwuid(0) "
-                               "and sys_getpwnam(\"root\") failed!\n"));
+                               "and getpwnam(\"root\") failed!\n"));
                        return NULL;
                }
        }
index 925b44bb06c96b28140ba0acb45092d50d2d6617..519200436555ca4b8f01cebb5d7080f9ab1f339d 100644 (file)
@@ -42,7 +42,7 @@ static struct passwd *getpwnam_alloc_cached(TALLOC_CTX *mem_ctx, const char *nam
                return tcopy_passwd(mem_ctx, pw);
        }
 
-       pw = sys_getpwnam(name);
+       pw = getpwnam(name);
        if (pw == NULL) {
                return NULL;
        }
@@ -92,7 +92,7 @@ char *get_user_home_dir(TALLOC_CTX *mem_ctx, const char *user)
 }
 
 /****************************************************************************
- * A wrapper for sys_getpwnam().  The following variations are tried:
+ * A wrapper for getpwnam().  The following variations are tried:
  *   - as transmitted
  *   - in all lower case if this differs from transmitted
  *   - in all upper case if this differs from transmitted
index 4435b996da614615fe3e50a29317b585ad2fb173..c9f8ceb6f85259adcd0a4a47220856272c3ae25d 100644 (file)
@@ -906,7 +906,7 @@ static WERROR init_srv_sess_info_1(struct pipes_struct *p,
        for (; resume_handle < *total_entries; resume_handle++) {
                uint32 num_files;
                uint32 connect_time;
-               struct passwd *pw = sys_getpwnam(session_list[resume_handle].username);
+               struct passwd *pw = getpwnam(session_list[resume_handle].username);
                bool guest;
 
                if ( !pw ) {