"Fossies" - the Fresh Open Source Software Archive

Member "mod_auth_dce-3.4/patches/apache_1.3.9+.diff" (18 Sep 1999, 5565 Bytes) of package /linux/www/apache_httpd_modules/old/mod_auth_dce-3.4.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Diff source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 diff -c -r apache_1.3.9+ssl_1.37/src/main/http_request.c apache_1.3.9+ssl_1.37-dce/src/main/http_request.c
    2 *** apache_1.3.9+ssl_1.37/src/main/http_request.c   Fri May 21 05:16:21 1999
    3 --- apache_1.3.9+ssl_1.37-dce/src/main/http_request.c   Thu Sep 16 19:01:28 1999
    4 ***************
    5 *** 171,177 ****
    6   
    7   /* Dealing with the file system to get PATH_INFO
    8    */
    9 ! static int get_path_info(request_rec *r)
   10   {
   11       char *cp;
   12       char *path = r->filename;
   13 --- 171,181 ----
   14   
   15   /* Dealing with the file system to get PATH_INFO
   16    */
   17 ! 
   18 ! /* Modification for mod_auth_dce -- This function used to be static, however,
   19 !  * mod_auth_dce needs to call it.
   20 !  */
   21 ! int get_path_info(request_rec *r)
   22   {
   23       char *cp;
   24       char *path = r->filename;
   25 ***************
   26 *** 279,290 ****
   27               while (cp > path && cp[-1] == '/')
   28                   --cp;
   29           }
   30           else {
   31 ! #if defined(EACCES)
   32 !             if (errno != EACCES)
   33 ! #endif
   34 !                 ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
   35 !                             "access to %s failed", r->uri);
   36               return HTTP_FORBIDDEN;
   37           }
   38   #else
   39 --- 283,309 ----
   40               while (cp > path && cp[-1] == '/')
   41                   --cp;
   42           }
   43 +         /* Modification for mod_auth_dce -- This check is made before
   44 +          * authentication modules are called. If the error is access
   45 +          * denied, it is possible that once DCE credentials are obtained
   46 +          * that the entry would be accessible. Therefore, return OK now,
   47 +          * and mod_auth_dce will call this function again after credentials
   48 +          * are obtained.
   49 +          */
   50 +         else if (errno == EACCES)
   51 +             return OK;
   52 +         /* Modification for mod_auth_dce -- If a fileset is unavailable
   53 +          * and a request times out, return HTTP_SERVICE_UNAVAILABLE instead
   54 +          * instead of HTTP_FORBIDDEN.
   55 +          */
   56 +         else if (errno == ETIMEDOUT) {
   57 +             ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
   58 +                          "access to %s timed out", r->uri);
   59 +             return HTTP_SERVICE_UNAVAILABLE;
   60 +         }
   61           else {
   62 !             ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
   63 !                          "access to %s failed", r->uri);
   64               return HTTP_FORBIDDEN;
   65           }
   66   #else
   67 diff -c -r apache_1.3.9+ssl_1.37/src/modules/standard/mod_cgi.c apache_1.3.9+ssl_1.37-dce/src/modules/standard/mod_cgi.c
   68 *** apache_1.3.9+ssl_1.37/src/modules/standard/mod_cgi.c    Tue Jun 29 21:36:55 1999
   69 --- apache_1.3.9+ssl_1.37-dce/src/modules/standard/mod_cgi.c    Thu Sep 16 16:55:28 1999
   70 ***************
   71 *** 424,432 ****
   72     return log_scripterror(r, conf, FORBIDDEN, APLOG_NOERRNO,
   73                    "attempt to invoke directory as script");
   74       if (!ap_suexec_enabled) {
   75 !   if (!ap_can_exec(&r->finfo))
   76 !       return log_scripterror(r, conf, FORBIDDEN, APLOG_NOERRNO,
   77 !                  "file permissions deny server execution");
   78       }
   79   
   80       if ((retval = ap_setup_client_block(r, REQUEST_CHUNKED_ERROR)))
   81 --- 424,443 ----
   82     return log_scripterror(r, conf, FORBIDDEN, APLOG_NOERRNO,
   83                    "attempt to invoke directory as script");
   84       if (!ap_suexec_enabled) {
   85 !        /* Modification for mod_auth_dce -- This used to be a call to ap_can_exec
   86 !         * in util.c; however, that function does a naive bit check to decide
   87 !         * if a script is executable. That fails in an environment with ACLs,
   88 !         * where the server may have permission based on the ACL, but not on
   89 !         * the Unix mode bits. The access() system call takes ACLs into account.
   90 !         */
   91 !        if(access(r->filename, X_OK)) {
   92 !          if (errno == EACCES)
   93 !            return log_scripterror(r, conf, FORBIDDEN, APLOG_NOERRNO,
   94 !                                   "file permissions deny server execution");
   95 !          else
   96 !          return log_scripterror(r, conf, SERVER_ERROR, APLOG_NOERRNO,
   97 !                                 "system error checking execute access");
   98 !        }
   99       }
  100   
  101       if ((retval = ap_setup_client_block(r, REQUEST_CHUNKED_ERROR)))
  102 diff -c -r apache_1.3.9+ssl_1.37/src/modules/standard/mod_userdir.c apache_1.3.9+ssl_1.37-dce/src/modules/standard/mod_userdir.c
  103 *** apache_1.3.9+ssl_1.37/src/modules/standard/mod_userdir.c    Sun Mar  7 05:13:54 1999
  104 --- apache_1.3.9+ssl_1.37-dce/src/modules/standard/mod_userdir.c    Fri Sep 17 17:07:10 1999
  105 ***************
  106 *** 312,325 ****
  107            * anyway, in the hope that some handler might handle it. This can be
  108            * used, for example, to run a CGI script for the user.
  109            */
  110 !         if (filename && (!*userdirs || stat(filename, &statbuf) != -1)) {
  111 !             r->filename = ap_pstrcat(r->pool, filename, dname, NULL);
  112         /* when statbuf contains info on r->filename we can save a syscall
  113          * by copying it to r->finfo
  114          */
  115         if (*userdirs && dname[0] == 0)
  116 !       r->finfo = statbuf;
  117               return OK;
  118           }
  119       }
  120   
  121 --- 312,328 ----
  122            * anyway, in the hope that some handler might handle it. This can be
  123            * used, for example, to run a CGI script for the user.
  124            */
  125 !         if (filename) {
  126 !     if (!*userdirs || stat(filename, &statbuf) != -1) {
  127 !       r->filename = ap_pstrcat(r->pool, filename, dname, NULL);
  128         /* when statbuf contains info on r->filename we can save a syscall
  129          * by copying it to r->finfo
  130          */
  131         if (*userdirs && dname[0] == 0)
  132 !         r->finfo = statbuf;
  133               return OK;
  134 +     }
  135 +     if (errno == ETIMEDOUT) return HTTP_SERVICE_UNAVAILABLE;
  136           }
  137       }
  138