apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: apr/user/unix userinfo.c
Date Sat, 21 Jul 2001 11:14:56 GMT
trawick     01/07/21 04:14:56

  Modified:    include  apr_user.h
               user/unix userinfo.c
  Log:
  yank apr_get_user_passwd()
  
  This function doesn't work on many/most current Unix boxes (think
  "shadow") and the concept is not portable to many other platforms
  either.
  
  You just can't count on retrieving the password for a user, and even
  when you can you can't count on the encryption method (if any).
  
  Revision  Changes    Path
  1.13      +0 -10     apr/include/apr_user.h
  
  Index: apr_user.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_user.h,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- apr_user.h	2001/03/08 00:35:36	1.12
  +++ apr_user.h	2001/07/21 11:14:56	1.13
  @@ -161,16 +161,6 @@
   #define apr_compare_groups(left,right) ((left == right) ? APR_SUCCESS : APR_EMISMATCH)
   #endif
   
  -/**
  - * Get a password from the system, given a username.
  - * @param passwd The returned password
  - * @param username The username to get the password for
  - * @param p The pool to allocate out of.
  - * @deffunc apr_status_t apr_get_user_passwd(char **passwd, const char *username, apr_pool_t
*p);
  - */
  -APR_DECLARE(apr_status_t) apr_get_user_passwd(char **passwd,
  -                                         const char *username, apr_pool_t *p);
  -
   #endif  /* ! APR_HAS_USER */
   
   #ifdef __cplusplus
  
  
  
  1.15      +0 -18     apr/user/unix/userinfo.c
  
  Index: userinfo.c
  ===================================================================
  RCS file: /home/cvs/apr/user/unix/userinfo.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- userinfo.c	2001/07/20 13:35:27	1.14
  +++ userinfo.c	2001/07/21 11:14:56	1.15
  @@ -144,22 +144,4 @@
       return APR_SUCCESS;
   }
   
  -APR_DECLARE(apr_status_t) apr_get_user_passwd(char **passwd,
  -                                         const char *username, apr_pool_t *p)
  -{
  -    struct passwd pw;
  -    char pwbuf[PWBUF_SIZE];
  -    apr_status_t rv;
  -        
  -    if ((rv = getpwnam_safe(username, &pw, pwbuf)) != APR_SUCCESS)
  -        return rv;
  -
  -#if defined(__MVS__) /* silly hack, but this function will be replaced soon anyway */
  -    *passwd = "x"; /* same as many Linux (and Solaris and more) boxes these days */
  -#else
  -    *passwd = apr_pstrdup(p, pw.pw_passwd);
  -#endif
  -
  -    return APR_SUCCESS;
  -}
     
  
  
  

Mime
View raw message