"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "net/netfilter/x_tables.c" between
linux-3.16.62.tar.xz and linux-3.16.63.tar.xz

About: The full source of the Linux kernel 3.16.x (longterm stable)

x_tables.c  (linux-3.16.62.tar.xz):x_tables.c  (linux-3.16.63.tar.xz)
skipping to change at line 382 skipping to change at line 382
if (res > 0) { if (res > 0) {
size -= res; size -= res;
p += res; p += res;
} }
np = true; np = true;
} }
return buf; return buf;
} }
/**
* xt_check_proc_name - check that name is suitable for /proc file creation
*
* @name: file name candidate
* @size: length of buffer
*
* some x_tables modules wish to create a file in /proc.
* This function makes sure that the name is suitable for this
* purpose, it checks that name is NUL terminated and isn't a 'special'
* name, like "..".
*
* returns negative number on error or 0 if name is useable.
*/
int xt_check_proc_name(const char *name, unsigned int size)
{
if (name[0] == '\0')
return -EINVAL;
if (strnlen(name, size) == size)
return -ENAMETOOLONG;
if (strcmp(name, ".") == 0 ||
strcmp(name, "..") == 0 ||
strchr(name, '/'))
return -EINVAL;
return 0;
}
EXPORT_SYMBOL(xt_check_proc_name);
int xt_check_match(struct xt_mtchk_param *par, int xt_check_match(struct xt_mtchk_param *par,
unsigned int size, u_int8_t proto, bool inv_proto) unsigned int size, u_int8_t proto, bool inv_proto)
{ {
int ret; int ret;
if (XT_ALIGN(par->match->matchsize) != size && if (XT_ALIGN(par->match->matchsize) != size &&
par->match->matchsize != -1) { par->match->matchsize != -1) {
/* /*
* ebt_among is exempt from centralized matchsize checking * ebt_among is exempt from centralized matchsize checking
* because it uses a dynamic-size data set. * because it uses a dynamic-size data set.
 End of changes. 1 change blocks. 
0 lines changed or deleted 30 lines changed or added

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