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 Mon, 01 Jul 2002 16:44:10 GMT
trawick     2002/07/01 09:44:10

  Modified:    .        CHANGES
               user/unix userinfo.c
  Log:
  Fix the userid functions on Irix to handle the way that Irix
  reports a failure from getpwnam_r().
  
  PR:           10095
  Submitted by: Robert I. Cowles <ric@cs.uregina.ca>, Jeff Trawick
  
  Revision  Changes    Path
  1.301     +4 -0      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.300
  retrieving revision 1.301
  diff -u -r1.300 -r1.301
  --- CHANGES	28 Jun 2002 22:45:37 -0000	1.300
  +++ CHANGES	1 Jul 2002 16:44:09 -0000	1.301
  @@ -1,5 +1,9 @@
   Changes with APR b1
   
  +  *) Fix the userid functions on Irix to handle the way that Irix 
  +     reports a failure from getpwnam_r().  PR 10095.
  +     [Robert I. Cowles <ric@cs.uregina.ca>, Jeff Trawick]
  +
     *) apr_table_do() and apr_table_vdo() now return an int rather than
        void to indicate whether or not any of its iterations returned 0.
        [Cliff Woolley]
  
  
  
  1.19      +2 -1      apr/user/unix/userinfo.c
  
  Index: userinfo.c
  ===================================================================
  RCS file: /home/cvs/apr/user/unix/userinfo.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- userinfo.c	13 Mar 2002 20:39:31 -0000	1.18
  +++ userinfo.c	1 Jul 2002 16:44:10 -0000	1.19
  @@ -76,7 +76,8 @@
   {
       struct passwd *pwptr;
   #if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && defined(HAVE_GETPWNAM_R)
  -    if (!getpwnam_r(username, pw, pwbuf, PWBUF_SIZE, &pwptr)) {
  +    /* IRIX getpwnam_r() returns 0 and sets pwptr to NULL on failure */
  +    if (!getpwnam_r(username, pw, pwbuf, PWBUF_SIZE, &pwptr) && pwptr) {
           /* nothing extra to do on success */
   #else
       if ((pwptr = getpwnam(username)) != NULL) {
  
  
  

Mime
View raw message