hi,

we have been using l2tpd for more than a year. it mostly works fine,
but after a certain time it seems that it can not authenticate and i
have to restart the daemon. after some debugging i realized that
l2tpd does not close the secrets file after parsing it in aaa.c.

it seems that the following patch solves the problem:

diff -ruN l2tpd-orig/aaa.c l2tpd/aaa.c
--- l2tpd-orig/aaa.c    Fri Aug 29 10:33:43 2003
+++ l2tpd/aaa.c Thu Jan 22 17:11:50 2004
@@ -207,9 +207,11 @@
                  __FUNCTION__, u, t, s);
 #endif
             strncpy (secret, s, size);
+            fclose(f);
             return -1;
         }
     }
+    fclose(f);
     return 0;
 }

thanks for your work,
-vili




Reply via email to