[srm-cvs] CVS Update: - Fixes to the auth module

From: <d.rethans[@]jdimedia.nl>
Date: Sun Jun 09 2002 - 09:38:24 CEST

Date: Sun Jun 9 09:38:22 CEST 2002
User: Derick Rethans
Directory: srm/modules/auth

Log Message:
 [0.25]
 - Fixes to the auth module
 
 
Modified files:
           srm/modules/auth/Makefile.am (version: 1.5)
           srm/modules/auth/auth.c (version: 1.21)

[FILE: /srm/modules/auth/Makefile.am]

--- srm/modules/auth/Makefile.am:1.4 Mon Jan 14 18:54:00 2002 GMT
+++ srm/modules/auth/Makefile.am Sun Jun 09 05:38:21 2002 GMT
@@ -1,5 +1,5 @@
 ##
-## $Id: cvstemp,v 1.4 2002/01/14 19:54:00 peter Exp $
+## $Id: cvstemp,v 1.5 2002/06/09 07:38:21 derick Exp $
 ##
 
 ## The contents of this file are subject to the Vulcan Logic Public
@@ -21,7 +21,7 @@
 ## Contributor(s):
 ##/
 
-sources = auth.c auth_parse.c
+sources = auth.c auth_parse.c split.c
 
 lib_LTLIBRARIES = srm_auth.la
 noinst_LTLIBRARIES = libauth.la

[FILE: /srm/modules/auth/auth.c]

--- srm/modules/auth/auth.c:1.20 Sun Feb 24 18:45:16 2002 GMT
+++ srm/modules/auth/auth.c Sun Jun 09 05:38:21 2002 GMT
@@ -1,4 +1,4 @@
-/* $Id: cvstemp,v 1.20 2002/02/24 19:45:16 kalowsky Exp $ */
+/* $Id: cvstemp,v 1.21 2002/06/09 07:38:21 derick Exp $ */
 
 /* The contents of this file are subject to the Vulcan Logic Public
  * License Version 1.1 (the "License"); you may not use this file
@@ -228,7 +228,7 @@
         } else {
                 /* Throw use in hash */
                 auth = (auth_auth_info*) malloc(sizeof(auth_auth_info));
- auth->user = SRMVALP_STR(username);
+ auth->user = strdup(SRMVALP_STR(username));
                 auth->timeleft = INI_SETTING(idle_to);
                 auth->authorized = TRUE;
 
@@ -328,6 +328,7 @@
 {
         if (auth->timeleft == -1)
                 return FALSE;
+ diff = 1;
 
 #if SRM_DEBUG
         printf("USER : %s\n", auth->user);
@@ -352,7 +353,9 @@
         struct auth_auth_info *auth;
 
         auth = (struct auth_auth_info *) data;
- free (auth->user);
+ if (auth->user) {
+ free (auth->user);
+ }
         free (auth);
 }
 
Received on Sun Jun 9 10:27:45 2002

This archive was generated by hypermail 2.1.8 : Tue Jan 06 2009 - 03:00:03 CET