Changeset View
Changeset View
Standalone View
Standalone View
contrib/tcp_wrappers/percent_x.c
Show All 23 Lines | |||||
extern void exit(); | extern void exit(); | ||||
/* Local stuff. */ | /* Local stuff. */ | ||||
#include "tcpd.h" | #include "tcpd.h" | ||||
/* percent_x - do %<char> expansion, abort if result buffer is too small */ | /* percent_x - do %<char> expansion, abort if result buffer is too small */ | ||||
char *percent_x(result, result_len, string, request) | char *percent_x(char *result, int result_len, char *string, | ||||
char *result; | struct request_info *request) | ||||
int result_len; | |||||
char *string; | |||||
struct request_info *request; | |||||
{ | { | ||||
char *bp = result; | char *bp = result; | ||||
char *end = result + result_len - 1; /* end of result buffer */ | char *end = result + result_len - 1; /* end of result buffer */ | ||||
char *expansion; | char *expansion; | ||||
int expansion_len; | int expansion_len; | ||||
static char ok_chars[] = "1234567890!@%-_=+:,./\ | static char ok_chars[] = "1234567890!@%-_=+:,./\ | ||||
abcdefghijklmnopqrstuvwxyz\ | abcdefghijklmnopqrstuvwxyz\ | ||||
ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | ||||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |