You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "William A. Rowe, Jr." <wr...@rowe-clan.net> on 2001/01/31 22:38:09 UTC

.protection

Folks,

  Following Bill's last patch (with I took a few issues with),
here's the summary of finfo.protection throughout the server.
These are the only two uses for the actual protection bits:

modules\dav\fs\repos.c(1800):
 if (resource->info->finfo.protection & APR_UEXECUTE)
modules\dav\fs\repos.c(1927):
    apr_fileperms_t perms = resource->info->finfo.protection;
modules\dav\fs\repos.c(1949):
    resource->info->finfo.protection = perms;
modules\dav\fs\repos.c(1968):
    apr_fileperms_t perms = resource->info->finfo.protection & ~APR_UEXECUTE;
modules\dav\fs\repos.c(1985):
    resource->info->finfo.protection = perms;

And of course, the classic xbithack (which just needs the extra test for
r->finfo.valid & APR_FINFO_GPROT):

modules\filters\mod_include.c(2976):
        && (r->finfo.protection & APR_GEXECUTE)


The following are nothing but file existance tests.  Sort of
ironic that the -worst- call in win32 is used to test the
simplest thing :-)  These will all become s/protection/filetype/:

modules\dav\fs\repos.c(657):
    if (r->finfo.protection != 0) {

modules\dav\fs\repos.c(691):
  ctx->finfo.protection = 0;

modules\dav\fs\repos.c(768):
    if (ctx1->finfo.protection != 0)

modules\dav\fs\repos.c(1137):
    if (dstinfo->finfo.protection != 0) {

modules\dav\fs\repos.c(1695):
    if (ctx->finfo.protection != 0) {

modules\filters\mod_include.c(704):
    if (rr->finfo.protection == 0) {

modules\filters\mod_include.c(1277):
            if (rr->status == HTTP_OK && rr->finfo.protection != 0) {

modules\filters\mod_include.c(1307):
        if (rr->status == HTTP_OK && rr->finfo.protection != 0) {

modules\generators\mod_asis.c(84):
    if (r->finfo.protection == 0) {

modules\generators\mod_autoindex.c(1189):
 if (rr->finfo.protection != 0) {

modules\generators\mod_cgi.c(553):
    if (r->finfo.protection == 0) {

modules\generators\mod_cgi.c(568):
    if (r->finfo.protection == 0)

modules\generators\mod_cgid.c(819):
    if (r->finfo.protection == 0) 

modules\http\http_core.c(2995):
    if (r->finfo.protection == 0 || (r->path_info && *r->path_info)) {

modules\http\http_protocol.c(633):
    if (r->finfo.protection != 0) {

modules\http\http_request.c(137):
    if (r->finfo.protection == 0      /* doesn't exist */

modules\http\http_request.c(229):
    if (r->finfo.protection) {

modules\http\http_request.c(297):
                r->finfo.protection = 0;  /* XXX: Wrong test for no such file... */

modules\http\http_request.c(354):
        r->finfo.protection = 0;   /* Not really a file... */

modules\http\http_request.c(985):
            rnew->finfo.protection = 0;

modules\mappers\mod_actions.c(197):
 if (r->finfo.protection == 0) {

modules\mappers\mod_negotiation.c(2604):
    if (r->finfo.protection != 0 || !(ap_allow_options(r) & OPT_MULTI)) {

modules\mappers\mod_speling.c(256):
    if (r->proxyreq || (r->finfo.protection != 0)) {

modules\metadata\mod_cern_meta.c(326):
    if (r->finfo.protection == 0) {

modules\metadata\mod_expires.c(470):
 if (r->finfo.protection == 0) { 

modules\metadata\mod_mime_magic.c(2435):
    if (r->finfo.protection == 0 || !r->filename) {

modules\test\mod_autoindex.c(1189):
 if (rr->finfo.protection != 0) {


Oh, this one is a straight-out bug that needed s/protection/filetype/:

modules\metadata\mod_mime_magic.c(1496):
      MODNAME ": invalid mode 0%o.", (unsigned int)r->finfo.protection);