This commit is contained in:
2018-08-06 18:55:55 -04:00
parent 4e772dff51
commit dd1db50da1
7 changed files with 7 additions and 5 deletions
Regular → Executable
View File
+1 -1
View File
@@ -1,4 +1,4 @@
#/home/jlcyr/apache2/bin/apxs -lpam -lpam_misc `mysql_config --cflags --libs` -c -i mod_absec.c #/home/jlcyr/apache2/bin/apxs -lpam -lpam_misc `mysql_config --cflags --libs` -c -i mod_absec.c
apxs -lpam -lpam_misc `mysql_config --cflags --libs` -c -i mod_absec.c sudo apxs -lpam -lpam_misc `mysql_config --cflags --libs` -c -i mod_absec.c
#/home/jlcyr/apache2/bin/apachectl restart #/home/jlcyr/apache2/bin/apachectl restart
sudo /etc/init.d/apache2 restart sudo /etc/init.d/apache2 restart
Regular → Executable
View File
Regular → Executable
+6 -4
View File
@@ -116,7 +116,7 @@ int mysql_lookup(request_rec *r, struct stat *fperm)
return(0); return(0);
} }
char query[64]; char query[256];
sprintf(query, "select * from urls where url='%s'", r->uri); sprintf(query, "select * from urls where url='%s'", r->uri);
/* send SQL query */ /* send SQL query */
//if (mysql_query(conn, "show tables")) { //if (mysql_query(conn, "show tables")) {
@@ -124,7 +124,7 @@ int mysql_lookup(request_rec *r, struct stat *fperm)
ap_rprintf(r, "%s\n<br/>", mysql_error(conn)); ap_rprintf(r, "%s\n<br/>", mysql_error(conn));
return(-1); return(-1);
} }
res = mysql_use_result(conn); res = mysql_use_result(conn);
/* output table name */ /* output table name */
@@ -183,10 +183,12 @@ static int absec_handler_last(request_rec *r)
/* Main routine - called before request processing */ /* Main routine - called before request processing */
static int absec_handler_first(request_rec *r) static int absec_handler_first(request_rec *r)
{ {
ap_rprintf(r, "Before Method: %s<br/>\r\n", r->method);
// Is this module really called? // Is this module really called?
if (strcmp(r->handler, "absec")) { /*if (strcmp(r->handler, "absec")) {
ap_rprintf(r, "DECLINED<br/>\r\n");
return DECLINED; return DECLINED;
} }*/
//////// ////////
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File