version 1.27, 2008/06/10 23:06:19 |
version 1.28, 2013/05/17 00:13:13 |
|
|
#include <sys/types.h> |
#include <sys/types.h> |
|
|
#include <ctype.h> |
#include <ctype.h> |
|
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
|
|
#include "xmalloc.h" |
#include "xmalloc.h" |
|
|
|
|
if ((ret = match_pattern(user, pat)) == 1) |
if ((ret = match_pattern(user, pat)) == 1) |
ret = match_host_and_ip(host, ipaddr, p); |
ret = match_host_and_ip(host, ipaddr, p); |
xfree(pat); |
free(pat); |
|
|
return ret; |
return ret; |
} |
} |
|
|
/* |
/* |
* Returns first item from client-list that is also supported by server-list, |
* Returns first item from client-list that is also supported by server-list, |
* caller must xfree() returned string. |
* caller must free the returned string. |
*/ |
*/ |
#define MAX_PROP 40 |
#define MAX_PROP 40 |
#define SEP "," |
#define SEP "," |
|
|
if (next != NULL) |
if (next != NULL) |
*next = (cp == NULL) ? |
*next = (cp == NULL) ? |
strlen(c) : (u_int)(cp - c); |
strlen(c) : (u_int)(cp - c); |
xfree(c); |
free(c); |
xfree(s); |
free(s); |
return ret; |
return ret; |
} |
} |
} |
} |
} |
} |
if (next != NULL) |
if (next != NULL) |
*next = strlen(c); |
*next = strlen(c); |
xfree(c); |
free(c); |
xfree(s); |
free(s); |
return NULL; |
return NULL; |
} |
} |