[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: pam_group patch



Hi,

On Tue, 21 Jul 1998, Andrew Morgan wrote:

> Index: pam_group.c
> ===================================================================
> RCS file: /var/proj/cvsroot/pam/Linux-PAM/modules/pam_group/pam_group.c,v
> retrieving revision 1.1.1.1
> diff -u -r1.1.1.1 pam_group.c
> --- pam_group.c 1998/07/12 05:17:16     1.1.1.1
> +++ pam_group.c 1998/07/22 04:11:23
> @@ -734,6 +734,10 @@
>  
>      } while (buffer);
>  
> +    if (fd != -1) {
> +       close(fd);
> +    }
> +
>      /* now set the groups for the user */
>  
>      if (no_grps > 0) {
> 
> Please try it and tell me if it solves your problems..

	From the function read_field, fd is always set to -1 before it
reaches those lines :(. Below is a tested patch that fixes the problem.

--
eman


--- pam_group.c.orig	Wed Jul 22 19:54:47 1998
+++ pam_group.c	Wed Jul 22 19:55:11 1998
@@ -137,6 +137,7 @@
 	    _log_err("error reading " PAM_GROUP_CONF);
 	    return -1;
 	} else if (!i) {
+            close(fd);
 	    fd = -1;          /* end of file reached */
 	} else
 	    *to += i;




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []