2
0
Эх сурвалжийг харах

modules_k/permissions: group identifier must be positive integer

- Group Identifier in address permissions must have a positive integer
  value.
Juha Heinanen 15 жил өмнө
parent
commit
c67e72eb16

+ 2 - 2
modules_k/permissions/README

@@ -276,8 +276,8 @@ Chapter 1. Admin Guide
    (allow_source_address) or given as pvar arguments (allow_address).
 
    Addresses stored in cached database table can be grouped together into
-   one or more groups specified by a group identifier (unsigned integer).
-   Group identifier is given as argument to allow_address and
+   one or more groups specified by a group identifier (positive integer
+   value). Group identifier is given as argument to allow_address and
    allow_source_address functions.
 
 1.5. Trusted Requests

+ 1 - 0
modules_k/permissions/address.c

@@ -114,6 +114,7 @@ int reload_address_table(void)
 	val = ROW_VALUES(row + i);
 	if ((ROW_N(row + i) == 4) &&
 	    (VAL_TYPE(val) == DB1_INT) && !VAL_NULL(val) &&
+	    (VAL_INT(val) > 0) && 
 	    (VAL_TYPE(val + 1) == DB1_STRING) && !VAL_NULL(val + 1) &&
 	    inet_aton((char *)VAL_STRING(val + 1), &ip_addr) != 0 &&
 	    (VAL_TYPE(val + 2) == DB1_INT) && !VAL_NULL(val + 2) && 

+ 1 - 1
modules_k/permissions/doc/permissions_admin.xml

@@ -179,7 +179,7 @@
 		<para>
 		Addresses stored in cached database table can be grouped
 		together into one or more groups specified by a group
-		identifier (unsigned integer).  Group
+		identifier (positive integer value).  Group
 		identifier is given as argument to allow_address and
 		allow_source_address functions.
 		</para>