"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/authlib.c" between
dacs-1.4.45.txz and dacs-1.4.46.txz

About: DACS (Distributed Access Control System) is a light-weight single sign-on and role-based access control system for web servers and server-based software.

authlib.c  (dacs-1.4.45.txz):authlib.c  (dacs-1.4.46.txz)
skipping to change at line 49 skipping to change at line 49
/* /*
* Support functions for DACS authentication. * Support functions for DACS authentication.
*/ */
#ifndef lint #ifndef lint
static const char copyright[] = static const char copyright[] =
"Copyright (c) 2003-2021\n\ "Copyright (c) 2003-2021\n\
Distributed Systems Software. All rights reserved."; Distributed Systems Software. All rights reserved.";
static const char revid[] = static const char revid[] =
"$Id: authlib.c 3151 2021-01-14 22:32:04Z brachman $"; "$Id: authlib.c 3171 2021-02-23 18:43:40Z brachman $";
#endif #endif
#include "auth.h" #include "auth.h"
#include "acs.h" #include "acs.h"
#include "group.h" #include "group.h"
#include "frame.h" #include "frame.h"
#include "crypto_aux.h" #include "crypto_aux.h"
#ifdef NOTDEF #ifdef NOTDEF
#include <netinet/in.h> #include <netinet/in.h>
skipping to change at line 316 skipping to change at line 316
cookie_name_prefix = ds_xprintf("DACS:%s:", conf_val(CONF_FEDERATION_NAME)); cookie_name_prefix = ds_xprintf("DACS:%s:", conf_val(CONF_FEDERATION_NAME));
} }
return(cookie_name_prefix); return(cookie_name_prefix);
} }
/* /*
* Return the cookie name prefix string used within the application. * Return the cookie name prefix string used within the application.
*/ */
char * char *
make_cookie_name_app_prefix(const Cookie_name_terminators *term) make_cookie_name_app_prefix(const Cookie_name_terminators *term, char *app)
{ {
char *cookie_name_prefix; char *cookie_name_prefix;
const Cookie_name_terminators *t; const Cookie_name_terminators *t;
if (term == NULL) if (term == NULL)
t = &current_cookie_name_terminators; t = &current_cookie_name_terminators;
else else
t = term; t = term;
if (conf_val(CONF_COMPAT_MODE) == NULL if (app != NULL && (conf_val(CONF_COMPAT_MODE) == NULL
|| conf_val_eq(CONF_COMPAT_MODE, "off")) || conf_val_eq(CONF_COMPAT_MODE, "off")
cookie_name_prefix = ds_xprintf("%s%s", ))
DACS_COOK cookie_name_prefix = ds_xprintf("%s%s", app, t->app_end);
IE_APP_NAME, t->app_end);
else { else {
/* This is only for backward compatibility, supposedly temporarily. */ /* Use the default prefix if none provided or for ancient compatibility. */
cookie_name_prefix = ds_xprintf("DACS:"); cookie_name_prefix = ds_xprintf("DACS:");
} }
return(cookie_name_prefix); return(cookie_name_prefix);
} }
/* /*
* Parse HTTP cookie name NAME into its components. * Parse HTTP cookie name NAME into its components.
* If TERM is NULL, the default terminators are used. * If TERM is NULL, the default terminators are used.
* If a component is unspecified, it is set to the empty string, except for * If a component is unspecified, it is set to the empty string, except for
skipping to change at line 1295 skipping to change at line 1294
else else
s = strdup(v->val); s = strdup(v->val);
log_msg((LOG_TRACE_LEVEL, "get_cookies: HTTP_COOKIE=%s", s)); log_msg((LOG_TRACE_LEVEL, "get_cookies: HTTP_COOKIE=%s", s));
} }
else else
return(0); return(0);
} }
log_msg((LOG_TRACE_LEVEL, "get_cookies: COOKIE=\"%s\"", non_null(s))); log_msg((LOG_TRACE_LEVEL, "get_cookies: COOKIE=\"%s\"", non_null(s)));
app_cookie_name_prefix = make_cookie_name_app_prefix(NULL); app_cookie_name_prefix = make_cookie_name_app_prefix(NULL, NULL);
first_cookie = last_cookie = NULL; first_cookie = last_cookie = NULL;
n = 0; n = 0;
p = s; p = s;
while (p != NULL) { while (p != NULL) {
if (n == AUTH_MAX_CREDENTIALS) { if (n == AUTH_MAX_CREDENTIALS) {
log_msg((LOG_NOTICE_LEVEL, "Too many credentials")); log_msg((LOG_NOTICE_LEVEL, "Too many credentials"));
break; break;
} }
 End of changes. 5 change blocks. 
9 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)