]> granicus.if.org Git - apache/commitdiff
* easy proposals to synch 2.4.x and trunk
authorGraham Leggett <minfrin@apache.org>
Thu, 26 Dec 2013 18:01:53 +0000 (18:01 +0000)
committerGraham Leggett <minfrin@apache.org>
Thu, 26 Dec 2013 18:01:53 +0000 (18:01 +0000)
  - Use apr_file_printf(... "%pm"...) instead of explicit call to apr_strerror
  - remove unused variables
  - axe some useless assignments (clang scan-build)
  - Remove useless apr_pstrdup as done for other mod_auth modules in r1026660
  - Remove unused APXS setting from template for generated Makefile

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1553528 13f79535-47bb-0310-9956-ffa450edef68

STATUS
modules/aaa/mod_auth_form.c
modules/aaa/mod_authz_dbm.c
support/apxs.in
support/htcacheclean.c

diff --git a/STATUS b/STATUS
index ee0a9bfb61fa929dc99a5c69d09ef88905cb5c07..94ddf46ce9417160d363ae57fbe343980cb7e5ae 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -98,23 +98,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  * easy proposals to synch 2.4.x and trunk
-      - Use apr_file_printf(... "%pm"...) instead of explicit call to apr_strerror
-      - remove unused variables
-      - axe some useless assignments (clang scan-build)
-      - Remove useless apr_pstrdup as done for other mod_auth modules in r1026660
-      - Remove unused APXS setting from template for generated Makefile
-    trunk patches:
-      - https://svn.apache.org/viewvc?view=revision&revision=1464674
-      - https://svn.apache.org/viewvc?view=revision&revision=1465084
-      - https://svn.apache.org/viewvc?view=revision&revision=1534997
-      - https://svn.apache.org/viewvc?view=revision&revision=1538149
-      - https://svn.apache.org/viewvc?view=revision&revision=1535699
-    2.4.x patches: trunk patches work
-      - the 3 first ones partially apply because of files which are not part of 2.4.x
-        http://people.apache.org/~jim/patches/ez-2.4-v1.patch
-    +1: jailletc36, jim, minfrin
-
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
index 7bba517b80d95c56dd44a05201da655c3df8d216..474a9de235d9d55e01b8a555c33b9ec7829584eb 100644 (file)
@@ -149,7 +149,7 @@ static const char *add_authn_provider(cmd_parms * cmd, void *config,
     authn_provider_list *newp;
 
     newp = apr_pcalloc(cmd->pool, sizeof(authn_provider_list));
-    newp->provider_name = apr_pstrdup(cmd->pool, arg);
+    newp->provider_name = arg;
 
     /* lookup and cache the actual provider now */
     newp->provider = ap_lookup_provider(AUTHN_PROVIDER_GROUP,
index 4f13caeab5f1d66b16b15fdc22c9298fd721437c..bb893d44424929d32aa2de02591a6cb92e6e0289 100644 (file)
@@ -210,7 +210,6 @@ static authz_status dbmfilegroup_check_authorization(request_rec *r,
     char *user = r->user;
     const char *realm = ap_auth_name(r);
     const char *filegroup = NULL;
-    const char *orig_groups = NULL;
     apr_status_t status;
     const char *groups;
     char *v;
@@ -245,12 +244,9 @@ static authz_status dbmfilegroup_check_authorization(request_rec *r,
         return AUTHZ_DENIED;
     }
 
-    orig_groups = groups;
-
     filegroup = authz_owner_get_file_group(r);
 
     if (filegroup) {
-        groups = orig_groups;
         while (groups[0]) {
             v = ap_getword(r->pool, &groups, ',');
             if (!strcmp(v, filegroup)) {
index 8bdc2daca0221ac28de9920399345c6e500232dd..ad1287ffb1369ee277e650c9295ab75a1a2b2101 100644 (file)
@@ -676,7 +676,6 @@ top_builddir=%PREFIX%
 include %INSTALLBUILDDIR%/special.mk
 
 #   the used tools
-APXS=apxs
 APACHECTL=apachectl
 
 #   additional defines, includes and libraries
index 4150936fbbb8a86db367061b94c51190a345a47e..92d09e183a280d428c3f35b12251042b5660adf8 100644 (file)
@@ -1087,9 +1087,8 @@ static apr_status_t remove_directory(apr_pool_t *pool, const char *dir)
         return rv;
     }
     if (rv != APR_SUCCESS) {
-        char errmsg[120];
-        apr_file_printf(errfile, "Could not open directory %s: %s" APR_EOL_STR,
-                dir, apr_strerror(rv, errmsg, sizeof errmsg));
+        apr_file_printf(errfile, "Could not open directory %s: %pm" APR_EOL_STR,
+                dir, &rv);
         return rv;
     }
 
@@ -1110,10 +1109,9 @@ static apr_status_t remove_directory(apr_pool_t *pool, const char *dir)
             const char *file = apr_pstrcat(pool, dir, "/", dirent.name, NULL);
             rv = apr_file_remove(file, pool);
             if (APR_SUCCESS != rv) {
-                char errmsg[120];
                 apr_file_printf(errfile,
-                        "Could not remove file '%s': %s" APR_EOL_STR, file,
-                        apr_strerror(rv, errmsg, sizeof errmsg));
+                        "Could not remove file '%s': %pm" APR_EOL_STR, file,
+                        &rv);
                 break;
             }
         }
@@ -1127,9 +1125,8 @@ static apr_status_t remove_directory(apr_pool_t *pool, const char *dir)
             rv = APR_SUCCESS;
         }
         if (rv != APR_SUCCESS) {
-            char errmsg[120];
-            apr_file_printf(errfile, "Could not remove directory %s: %s" APR_EOL_STR,
-                    dir, apr_strerror(rv, errmsg, sizeof errmsg));
+            apr_file_printf(errfile, "Could not remove directory %s: %pm" APR_EOL_STR,
+                    dir, &rv);
         }
     }
 
@@ -1151,9 +1148,8 @@ static apr_status_t find_directory(apr_pool_t *pool, const char *base,
 
     rv = apr_dir_open(&dirp, base, pool);
     if (rv != APR_SUCCESS) {
-        char errmsg[120];
-        apr_file_printf(errfile, "Could not open directory %s: %s" APR_EOL_STR,
-                base, apr_strerror(rv, errmsg, sizeof errmsg));
+        apr_file_printf(errfile, "Could not open directory %s: %pm" APR_EOL_STR,
+                base, &rv);
         return rv;
     }
 
@@ -1194,18 +1190,16 @@ static apr_status_t find_directory(apr_pool_t *pool, const char *base,
             remove = apr_pstrcat(pool, base, "/", header, NULL);
             status = apr_file_remove(remove, pool);
             if (status != APR_SUCCESS && !APR_STATUS_IS_ENOENT(status)) {
-                char errmsg[120];
-                apr_file_printf(errfile, "Could not remove file %s: %s" APR_EOL_STR,
-                        remove, apr_strerror(status, errmsg, sizeof errmsg));
+                apr_file_printf(errfile, "Could not remove file %s: %pm" APR_EOL_STR,
+                        remove, &status);
                 rv = status;
             }
 
             remove = apr_pstrcat(pool, base, "/", data, NULL);
             status = apr_file_remove(remove, pool);
             if (status != APR_SUCCESS && !APR_STATUS_IS_ENOENT(status)) {
-                char errmsg[120];
-                apr_file_printf(errfile, "Could not remove file %s: %s" APR_EOL_STR,
-                        remove, apr_strerror(status, errmsg, sizeof errmsg));
+                apr_file_printf(errfile, "Could not remove file %s: %pm" APR_EOL_STR,
+                        remove, &status);
                 rv = status;
             }
 
@@ -1357,7 +1351,6 @@ static void usage_repeated_arg(apr_pool_t *pool, char option) {
 static void log_pid(apr_pool_t *pool, const char *pidfilename, apr_file_t **pidfile)
 {
     apr_status_t status;
-    char errmsg[120];
     pid_t mypid = getpid();
 
     if (APR_SUCCESS == (status = apr_file_open(pidfile, pidfilename,
@@ -1369,9 +1362,8 @@ static void log_pid(apr_pool_t *pool, const char *pidfilename, apr_file_t **pidf
     else {
         if (errfile) {
             apr_file_printf(errfile,
-                            "Could not write the pid file '%s': %s" APR_EOL_STR,
-                            pidfilename,
-                            apr_strerror(status, errmsg, sizeof errmsg));
+                            "Could not write the pid file '%s': %pm" APR_EOL_STR,
+                            pidfilename, &status);
         }
         exit(1);
     }
@@ -1393,7 +1385,6 @@ int main(int argc, const char * const argv[])
     char opt;
     const char *arg;
     char *proxypath, *path, *pidfilename;
-    char errmsg[1024];
 
     interrupted = 0;
     repeat = 0;
@@ -1579,8 +1570,8 @@ int main(int argc, const char * const argv[])
                 }
                 proxypath = apr_pstrdup(pool, arg);
                 if ((status = apr_filepath_set(proxypath, pool)) != APR_SUCCESS) {
-                    usage(apr_psprintf(pool, "Could not set filepath to '%s': %s",
-                                       proxypath, apr_strerror(status, errmsg, sizeof errmsg)));
+                    usage(apr_psprintf(pool, "Could not set filepath to '%s': %pm",
+                                       proxypath, &status));
                 }
                 break;
 
@@ -1680,8 +1671,7 @@ int main(int argc, const char * const argv[])
     }
 
     if (apr_filepath_get(&path, 0, pool) != APR_SUCCESS) {
-        usage(apr_psprintf(pool, "Could not get the filepath: %s",
-                           apr_strerror(status, errmsg, sizeof errmsg)));
+        usage(apr_psprintf(pool, "Could not get the filepath: %pm", &status));
     }
     baselen = strlen(path);