databases handling tools chmod, chgrp, chown, ls

This commit is contained in:
2019-01-21 09:13:03 -05:00
parent 2fb12410ea
commit ea59731e1f
6 changed files with 244 additions and 25 deletions
+5 -5
View File
@@ -104,7 +104,7 @@ static int absec_handler_last(request_rec *r)
/* Main routine - called before request processing */
static int absec_handler_first(request_rec *r)
{
ap_rprintf(r, "Before Method: %s<br/>\r\n", r->method);
ap_rprintf(r, "handler first : Before Method: %s<br/>\r\n", r->method);
// Is this module really called?
/*if (strcmp(r->handler, "absec")) {
ap_rprintf(r, "DECLINED<br/>\r\n");
@@ -114,7 +114,7 @@ static int absec_handler_first(request_rec *r)
////////
/* http method validate the perm asked (r/w vs get/post,put) */
ap_rprintf(r, "Before Method: %s<br/>\r\n", r->method);
//ap_rprintf(r, "Before Method: %s<br/>\r\n", r->method);
int permmask = 0;
if (strcmp(r->method,"GET")==0) permmask=0444; // r
@@ -312,7 +312,7 @@ static authz_status authz_check_absec(request_rec *r, const char *require_args,
////////
/* http method validate the perm asked (r/w vs get/post,put) */
ap_rprintf(r, "Before Method: %s<br/>\r\n", r->method);
//ap_rprintf(r, "Before Method: %s<br/>\r\n", r->method);
int permmask = 0;
if (strcmp(r->method,"GET")==0) permmask=0444; // r
@@ -361,7 +361,7 @@ static authz_status authz_check_absec(request_rec *r, const char *require_args,
// If file is user readable and user match return content
if ((fperm.st_uid==pw->pw_uid) && (fperm.st_mode & 0700 & permmask)) {
ap_rprintf(r, "Fichier propriétaire<br/>\r\n");
//ap_rprintf(r, "Fichier propriétaire<br/>\r\n");
ap_log_rerror("mod_absec.c", 282, 1, APLOG_ERR, APR_SUCCESS, r, "authz_check_absec : Fichier propriétaire<br/>\r\n");
return AUTHZ_GRANTED;
} else {
@@ -370,7 +370,7 @@ static authz_status authz_check_absec(request_rec *r, const char *require_args,
// If file is group readable and primary group match return content
if ((fperm.st_gid==pw->pw_gid) && (fperm.st_mode & 0070 & permmask)) {
ap_rprintf(r, "Fichier groupe<br/>\r\n");
//ap_rprintf(r, "Fichier groupe<br/>\r\n");
ap_log_rerror("mod_absec.c", 282, 1, APLOG_ERR, APR_SUCCESS, r, "authz_check_absec : Fichier groupe<br/>\r\n");
return AUTHZ_GRANTED;
} else {