db.c
changeset 22 822094314703
parent 18 d4ce82194b64
child 32 6dc2d52e4b13
equal deleted inserted replaced
21:3510b50c6694 22:822094314703
     1 /* vim: set noet nosta sw=4 ts=4 ft=c : */
     1 /* vim: set noet nosta sw=4 ts=4 ft=c : */
     2 /*
     2 /*
     3 Copyright (c) 2011, Mahlon E. Smith <mahlon@martini.nu>
     3 Copyright (c) 2011-2012, Mahlon E. Smith <mahlon@martini.nu>
     4 All rights reserved.
     4 All rights reserved.
     5 Redistribution and use in source and binary forms, with or without
     5 Redistribution and use in source and binary forms, with or without
     6 modification, are permitted provided that the following conditions are met:
     6 modification, are permitted provided that the following conditions are met:
     7 
     7 
     8     * Redistributions of source code must retain the above copyright
     8     * Redistributions of source code must retain the above copyright
   120 
   120 
   121 		/* validate rule */
   121 		/* validate rule */
   122 		rule = parse_rule( dbline->val );
   122 		rule = parse_rule( dbline->val );
   123 		if ( rule == NULL ||
   123 		if ( rule == NULL ||
   124 			( rule->negate == 1 && rule->host != NULL ) ||
   124 			( rule->negate == 1 && rule->host != NULL ) ||
   125 			( rule->negate == 0 && rule->host == NULL )) {
   125 			( rule->negate == 0 && rule->host == NULL ) ||
       
   126 			( rule->lua    == 1 && rule->luapath == NULL )
       
   127 		   ) {
   126 
   128 
   127 			debug( 0, LOC, "Invalid rule (line %d), stopping: %s", linenum, buf );
   129 			debug( 0, LOC, "Invalid rule (line %d), stopping: %s", linenum, buf );
   128 			error = 1;
   130 			error = 1;
   129 			break;
   131 			break;
   130 		}
   132 		}