httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thom May <t...@planetarytramp.net>
Subject [PATCH] catch up with renames pending
Date Tue, 10 Dec 2002 23:40:36 GMT
As the topic :-)
-Thom


Index: modules/arch/netware/mod_netware.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/arch/netware/mod_netware.c,v
retrieving revision 1.5
diff -u -u -r1.5 mod_netware.c
--- modules/arch/netware/mod_netware.c	11 Oct 2002 17:31:09 -0000	1.5
+++ modules/arch/netware/mod_netware.c	10 Dec 2002 23:32:40 -0000
@@ -169,7 +169,7 @@
     *ptr = '\0';
 
     /* Figure out what the extension is so that we can matche it. */
-    ext = strrchr(apr_filename_of_pathname(cmd_only), '.');
+    ext = strrchr(apr_filepath_name_get(cmd_only), '.');
     
     /* eliminate the '.' if there is one */
     if (*ext == '.')
Index: modules/arch/win32/mod_win32.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/arch/win32/mod_win32.c,v
retrieving revision 1.21
diff -u -u -r1.21 mod_win32.c
--- modules/arch/win32/mod_win32.c	6 Jul 2002 02:49:59 -0000	1.21
+++ modules/arch/win32/mod_win32.c	10 Dec 2002 23:32:40 -0000
@@ -447,7 +447,7 @@
      * win32 parsing here, therefore the final extension is the only one
      * we will consider.
      */
-    ext = strrchr(apr_filename_of_pathname(*cmd), '.');
+    ext = strrchr(apr_filepath_name_get(*cmd), '.');
     
     /* If the file has an extension and it is not .com and not .exe and
      * we've been instructed to search the registry, then do so.
Index: modules/filters/mod_include.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/filters/mod_include.c,v
retrieving revision 1.232
diff -u -u -r1.232 mod_include.c
--- modules/filters/mod_include.c	15 Sep 2002 00:00:47 -0000	1.232
+++ modules/filters/mod_include.c	10 Dec 2002 23:32:45 -0000
@@ -192,7 +192,7 @@
         val = ap_ht_time(r->pool, r->finfo.mtime, conf->default_time_fmt, 0);
     }
     else if (!strcasecmp(var, "USER_NAME")) {
-        if (apr_get_username(&val, r->finfo.user, r->pool) != APR_SUCCESS) {
+        if (apr_uid_name_get(&val, r->finfo.user, r->pool) != APR_SUCCESS) {
             val = "<unknown>";
         }
     }
Index: modules/generators/mod_cgi.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/generators/mod_cgi.c,v
retrieving revision 1.149
diff -u -u -r1.149 mod_cgi.c
--- modules/generators/mod_cgi.c	22 Nov 2002 14:45:19 -0000	1.149
+++ modules/generators/mod_cgi.c	10 Dec 2002 23:32:46 -0000
@@ -474,7 +474,7 @@
             /* Bad things happened. Everyone should have cleaned up. */
             ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, rc, r,
                           "couldn't create child process: %d: %s", rc,
-                          apr_filename_of_pathname(r->filename));
+                          apr_filepath_name_get(r->filename));
         }
         else {
             apr_pool_note_subprocess(p, procnew, APR_KILL_AFTER_TIMEOUT);
@@ -599,7 +599,7 @@
         return DECLINED;
     }
 
-    argv0 = apr_filename_of_pathname(r->filename);
+    argv0 = apr_filepath_name_get(r->filename);
     nph = !(strncmp(argv0, "nph-", 4));
     conf = ap_get_module_config(r->server->module_config, &cgi_module);
 
Index: modules/generators/mod_cgid.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/generators/mod_cgid.c,v
retrieving revision 1.146
diff -u -u -r1.146 mod_cgid.c
--- modules/generators/mod_cgid.c	22 Nov 2002 14:45:19 -0000	1.146
+++ modules/generators/mod_cgid.c	10 Dec 2002 23:32:48 -0000
@@ -736,7 +736,7 @@
                 /* Bad things happened. Everyone should have cleaned up. */
                 ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, rc, r,
                               "couldn't create child process: %d: %s", rc, 
-                              apr_filename_of_pathname(r->filename));
+                              apr_filepath_name_get(r->filename));
             }
             else {
                 apr_hash_set(script_hash, &cgid_req.conn_id, sizeof(cgid_req.conn_id),

Index: modules/mappers/mod_negotiation.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/mappers/mod_negotiation.c,v
retrieving revision 1.109
diff -u -u -r1.109 mod_negotiation.c
--- modules/mappers/mod_negotiation.c	25 Nov 2002 19:02:44 -0000	1.109
+++ modules/mappers/mod_negotiation.c	10 Dec 2002 23:32:53 -0000
@@ -988,7 +988,7 @@
                      break;
                 }
                 mime_info.bytes = len;
-                mime_info.file_name = apr_filename_of_pathname(rr->filename);
+                mime_info.file_name = apr_filepath_name_get(rr->filename);
             }
         }
         else {
Index: modules/mappers/mod_rewrite.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/mappers/mod_rewrite.c,v
retrieving revision 1.135
diff -u -u -r1.135 mod_rewrite.c
--- modules/mappers/mod_rewrite.c	4 Oct 2002 16:57:38 -0000	1.135
+++ modules/mappers/mod_rewrite.c	10 Dec 2002 23:32:58 -0000
@@ -2713,7 +2713,7 @@
         user[j] = '\0';
 
         /* lookup username in systems passwd file */
-        if (apr_get_home_directory(&homedir, user, r->pool) == APR_SUCCESS) {
+        if (apr_uid_homepath_get(&homedir, user, r->pool) == APR_SUCCESS) {
             /* ok, user was found, so expand the ~user string */
             if (uri[i] != '\0') {
                 /* ~user/anything...  has to be expanded */
@@ -3707,13 +3707,13 @@
     else if (strcasecmp(var, "SCRIPT_USER") == 0) {
         result = "<unknown>";
         if (r->finfo.valid & APR_FINFO_USER) {
-            apr_get_username((char **)&result, r->finfo.user, r->pool);
+            apr_uid_name_get((char **)&result, r->finfo.user, r->pool);
         }
     }
     else if (strcasecmp(var, "SCRIPT_GROUP") == 0) {
         result = "<unknown>";
         if (r->finfo.valid & APR_FINFO_GROUP) {
-            apr_group_name_get((char **)&result, r->finfo.group, r->pool);
+            apr_gid_name_get((char **)&result, r->finfo.group, r->pool);
         }
     }
 
Index: modules/mappers/mod_userdir.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/mappers/mod_userdir.c,v
retrieving revision 1.52
diff -u -u -r1.52 mod_userdir.c
--- modules/mappers/mod_userdir.c	28 Sep 2002 06:10:47 -0000	1.52
+++ modules/mappers/mod_userdir.c	10 Dec 2002 23:32:58 -0000
@@ -325,7 +325,7 @@
 #if APR_HAS_USER
             char *homedir;
 
-            if (apr_get_home_directory(&homedir, w, r->pool) == APR_SUCCESS) {
+            if (apr_uid_homepath_get(&homedir, w, r->pool) == APR_SUCCESS) {
                 filename = apr_pstrcat(r->pool, homedir, "/", userdir, NULL);
             }
 #else
@@ -376,7 +376,7 @@
         return NULL;
     }
 
-    if (apr_get_userid(&ugid->uid, &ugid->gid, username, r->pool) != APR_SUCCESS)
{
+    if (apr_uid_get(&ugid->uid, &ugid->gid, username, r->pool) != APR_SUCCESS)
{
         return NULL;
     }
 
Index: modules/proxy/proxy_connect.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/proxy/proxy_connect.c,v
retrieving revision 1.60
diff -u -u -r1.60 proxy_connect.c
--- modules/proxy/proxy_connect.c	11 Jul 2002 05:42:19 -0000	1.60
+++ modules/proxy/proxy_connect.c	10 Dec 2002 23:32:59 -0000
@@ -267,10 +267,10 @@
 		     "proxy: CONNECT: sending the CONNECT request to the remote proxy");
         nbytes = apr_snprintf(buffer, sizeof(buffer),
 			      "CONNECT %s HTTP/1.0" CRLF, r->uri);
-        apr_send(sock, buffer, &nbytes);
+        apr_socket_send(sock, buffer, &nbytes);
         nbytes = apr_snprintf(buffer, sizeof(buffer),
 			      "Proxy-agent: %s" CRLF CRLF, ap_get_server_version());
-        apr_send(sock, buffer, &nbytes);
+        apr_socket_send(sock, buffer, &nbytes);
     }
     else {
         ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
@@ -278,11 +278,11 @@
         nbytes = apr_snprintf(buffer, sizeof(buffer),
 			      "HTTP/1.0 200 Connection Established" CRLF);
         ap_xlate_proto_to_ascii(buffer, nbytes);
-        apr_send(client_socket, buffer, &nbytes);
+        apr_socket_send(client_socket, buffer, &nbytes);
         nbytes = apr_snprintf(buffer, sizeof(buffer),
 			      "Proxy-agent: %s" CRLF CRLF, ap_get_server_version());
         ap_xlate_proto_to_ascii(buffer, nbytes);
-        apr_send(client_socket, buffer, &nbytes);
+        apr_socket_send(client_socket, buffer, &nbytes);
 #if 0
         /* This is safer code, but it doesn't work yet.  I'm leaving it 
          * here so that I can fix it later.
@@ -336,7 +336,7 @@
 /*		ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
                              "proxy: CONNECT: sock was set");*/
                 nbytes = sizeof(buffer);
-                if (apr_recv(sock, buffer, &nbytes) == APR_SUCCESS) {
+                if (apr_socket_recv(sock, buffer, &nbytes) == APR_SUCCESS) {
                     o = 0;
                     i = nbytes;
                     while(i > 0)
@@ -348,7 +348,7 @@
      * if ((nbytes = ap_rwrite(buffer + o, nbytes, r)) < 0)
      * rbb
      */
-                        if (apr_send(client_socket, buffer + o, &nbytes) != APR_SUCCESS)
+                        if (apr_socket_send(client_socket, buffer + o, &nbytes) != APR_SUCCESS)
 			    break;
                         o += nbytes;
                         i -= nbytes;
@@ -366,13 +366,13 @@
 /*		ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
                              "proxy: CONNECT: client was set");*/
                 nbytes = sizeof(buffer);
-                if (apr_recv(client_socket, buffer, &nbytes) == APR_SUCCESS) {
+                if (apr_socket_recv(client_socket, buffer, &nbytes) == APR_SUCCESS) {
                     o = 0;
                     i = nbytes;
                     while(i > 0)
                     {
 			nbytes = i;
-			if (apr_send(sock, buffer + o, &nbytes) != APR_SUCCESS)
+			if (apr_socket_send(sock, buffer + o, &nbytes) != APR_SUCCESS)
 			    break;
                         o += nbytes;
                         i -= nbytes;
Index: modules/proxy/proxy_ftp.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/proxy/proxy_ftp.c,v
retrieving revision 1.130
diff -u -u -r1.130 proxy_ftp.c
--- modules/proxy/proxy_ftp.c	18 Aug 2002 21:01:06 -0000	1.130
+++ modules/proxy/proxy_ftp.c	10 Dec 2002 23:33:01 -0000
@@ -991,7 +991,7 @@
                          connect_addr->family, connect_addr, connectname);
 
             /* make the connection out of the socket */
-            rv = apr_connect(sock, connect_addr);
+            rv = apr_socket_connect(sock, connect_addr);
 
             /* if an error occurred, loop round and try again */
             if (rv != APR_SUCCESS) {
@@ -1289,7 +1289,7 @@
                 apr_socket_addr_get(&data_addr, APR_REMOTE, sock);
                 apr_sockaddr_ip_get(&data_ip, data_addr);
                 apr_sockaddr_info_get(&epsv_addr, data_ip, connect_addr->family, data_port,
0, p);
-                rv = apr_connect(data_sock, epsv_addr);
+                rv = apr_socket_connect(data_sock, epsv_addr);
                 if (rv != APR_SUCCESS) {
                     ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
                                  "proxy: FTP: EPSV attempt to connect to %pI failed - Firewall/NAT?",
epsv_addr);
@@ -1374,7 +1374,7 @@
 
                 /* make the connection */
                 apr_sockaddr_info_get(&pasv_addr, apr_psprintf(p, "%d.%d.%d.%d", h3,
h2, h1, h0), connect_addr->family, pasvport, 0, p);
-                rv = apr_connect(data_sock, pasv_addr);
+                rv = apr_socket_connect(data_sock, pasv_addr);
                 if (rv != APR_SUCCESS) {
                     ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
                                  "proxy: FTP: PASV attempt to connect to %pI failed - Firewall/NAT?",
pasv_addr);
@@ -1420,14 +1420,14 @@
 
         apr_sockaddr_info_get(&local_addr, local_ip, APR_UNSPEC, local_port, 0, r->pool);
 
-        if ((rv = apr_bind(local_sock, local_addr)) != APR_SUCCESS) {
+        if ((rv = apr_socket_bind(local_sock, local_addr)) != APR_SUCCESS) {
             ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
             "proxy: FTP: error binding to ftp data socket %pI", local_addr);
             return HTTP_INTERNAL_SERVER_ERROR;
         }
 
         /* only need a short queue */
-        if ((rv = apr_listen(local_sock, 2)) != APR_SUCCESS) {
+        if ((rv = apr_socket_listen(local_sock, 2)) != APR_SUCCESS) {
             ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
                           "proxy: FTP: error listening to ftp data socket %pI", local_addr);
             return HTTP_INTERNAL_SERVER_ERROR;
@@ -1764,7 +1764,7 @@
     /* wait for connection */
     if (use_port) {
         for (;;) {
-            rv = apr_accept(&data_sock, local_sock, r->pool);
+            rv = apr_socket_accept(&data_sock, local_sock, r->pool);
             if (rv == APR_EINTR) {
                 continue;
             }
Index: modules/proxy/proxy_http.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/proxy/proxy_http.c,v
retrieving revision 1.166
diff -u -u -r1.166 proxy_http.c
--- modules/proxy/proxy_http.c	9 Dec 2002 05:37:26 -0000	1.166
+++ modules/proxy/proxy_http.c	10 Dec 2002 23:33:03 -0000
@@ -330,7 +330,7 @@
         apr_socket_timeout_get(p_conn->sock, &current_timeout);
         /* set no timeout */
         apr_socket_timeout_set(p_conn->sock, 0);
-        socket_status = apr_recv(p_conn->sock, test_buffer, &buffer_len);
+        socket_status = apr_socket_recv(p_conn->sock, test_buffer, &buffer_len);
         /* put back old timeout */
         apr_socket_timeout_set(p_conn->sock, current_timeout);
         if ( APR_STATUS_IS_EOF(socket_status) ) {
Index: modules/proxy/proxy_util.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/proxy/proxy_util.c,v
retrieving revision 1.99
diff -u -u -r1.99 proxy_util.c
--- modules/proxy/proxy_util.c	14 Oct 2002 14:11:24 -0000	1.99
+++ modules/proxy/proxy_util.c	10 Dec 2002 23:33:04 -0000
@@ -1203,7 +1203,7 @@
                      proxy_function, backend_addr->family, backend_name);
 
         /* make the connection out of the socket */
-        rv = apr_connect(*newsock, backend_addr);
+        rv = apr_socket_connect(*newsock, backend_addr);
 
         /* if an error occurred, loop round and try again */
         if (rv != APR_SUCCESS) {
Index: os/beos/beosd.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/os/beos/beosd.c,v
retrieving revision 1.21
diff -u -u -r1.21 beosd.c
--- os/beos/beosd.c	17 May 2002 11:33:10 -0000	1.21
+++ os/beos/beosd.c	10 Dec 2002 23:33:04 -0000
@@ -119,7 +119,7 @@
     apr_status_t status;
     int sockdes;
 
-    status = apr_accept(&csd, lr->sd, ptrans);
+    status = apr_socket_accept(&csd, lr->sd, ptrans);
     if (status == APR_SUCCESS) { 
         *accepted = csd;
         apr_os_sock_get(&sockdes, csd);
@@ -195,13 +195,13 @@
              * occur in mobile IP.
              */
             ap_log_error(APLOG_MARK, APLOG_EMERG, status, ap_server_conf,
-                         "apr_accept: giving up.");
+                         "apr_socket_accept: giving up.");
             return APR_EGENERAL;
 #endif /*ENETDOWN*/
 
         default:
             ap_log_error(APLOG_MARK, APLOG_ERR, status, ap_server_conf,
-                         "apr_accept: (client socket)");
+                         "apr_socket_accept: (client socket)");
             return APR_EGENERAL;
     }
     return status;
Index: os/unix/unixd.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/os/unix/unixd.c,v
retrieving revision 1.55
diff -u -u -r1.55 unixd.c
--- os/unix/unixd.c	27 Jun 2002 10:47:49 -0000	1.55
+++ os/unix/unixd.c	10 Dec 2002 23:33:05 -0000
@@ -454,7 +454,7 @@
     int sockdes;
 
     *accepted = NULL;
-    status = apr_accept(&csd, lr->sd, ptrans);
+    status = apr_socket_accept(&csd, lr->sd, ptrans);
     if (status == APR_SUCCESS) { 
         *accepted = csd;
         apr_os_sock_get(&sockdes, csd);
@@ -558,7 +558,7 @@
              * occur in mobile IP.
              */
             ap_log_error(APLOG_MARK, APLOG_EMERG, status, ap_server_conf,
-                         "apr_accept: giving up.");
+                         "apr_socket_accept: giving up.");
             return APR_EGENERAL;
 #endif /*ENETDOWN*/
 
@@ -575,7 +575,7 @@
 #else
         default:
             ap_log_error(APLOG_MARK, APLOG_ERR, status, ap_server_conf,
-                         "apr_accept: (client socket)");
+                         "apr_socket_accept: (client socket)");
             return APR_EGENERAL;
 #endif
     }
Index: server/config.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/config.c,v
retrieving revision 1.158
diff -u -u -r1.158 config.c
--- server/config.c	9 Dec 2002 14:43:32 -0000	1.158
+++ server/config.c	10 Dec 2002 23:33:07 -0000
@@ -76,6 +76,7 @@
 #include "apr_portable.h"
 #include "apr_file_io.h"
 #include "apr_fnmatch.h"
+#include "apr_lib.h"
 
 #define APR_WANT_STDIO
 #define APR_WANT_STRFUNC
@@ -1434,6 +1435,20 @@
     return strcmp(f1->fname,f2->fname);
 }
 
+static int fname_valid(const char *fname)
+{
+    const char *c = fname;    
+    if (!apr_isalnum(*c)) 
+      return 0;
+    ++c;
+    while (*c) {
+      if(!apr_isalnum(*c) && *c!='_' && *c!='-' && *c!='.')
+        return 0;
+      ++c;
+    }
+    return 1;
+}
+        
 AP_DECLARE(void) ap_process_resource_config(server_rec *s, const char *fname,
                                             ap_directive_t **conftree,
                                             apr_pool_t *p,
@@ -1510,7 +1525,8 @@
                 && strcmp(dirent.name, "..")
                 && (!ispatt ||
                     apr_fnmatch(pattern, dirent.name, 
-                                FNM_PERIOD) == APR_SUCCESS)) {
+                                FNM_PERIOD) == APR_SUCCESS)
+                && fname_valid(dirent.name)) {
                 fnew = (fnames *) apr_array_push(candidates);
                 fnew->fname = ap_make_full_path(p, path, dirent.name);
             }
Index: server/connection.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/connection.c,v
retrieving revision 1.106
diff -u -u -r1.106 connection.c
--- server/connection.c	15 Jul 2002 08:05:10 -0000	1.106
+++ server/connection.c	10 Dec 2002 23:33:07 -0000
@@ -167,7 +167,7 @@
     /* Shut down the socket for write, which will send a FIN
      * to the peer.
      */
-    if (apr_shutdown(csd, APR_SHUTDOWN_WRITE) != APR_SUCCESS
+    if (apr_socket_shutdown(csd, APR_SHUTDOWN_WRITE) != APR_SUCCESS
         || c->aborted) {
         apr_socket_close(csd);
         return;
@@ -183,7 +183,7 @@
     apr_socket_opt_set(csd, APR_INCOMPLETE_READ, 1);
     while (1) {
         nbytes = sizeof(dummybuf);
-        rc = apr_recv(csd, dummybuf, &nbytes);
+        rc = apr_socket_recv(csd, dummybuf, &nbytes);
         if (rc != APR_SUCCESS || nbytes == 0)
             break;
 
Index: server/core.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/core.c,v
retrieving revision 1.226
diff -u -u -r1.226 core.c
--- server/core.c	9 Dec 2002 22:19:26 -0000	1.226
+++ server/core.c	10 Dec 2002 23:33:12 -0000
@@ -2693,7 +2693,7 @@
 
     /* XXX handle checking for non-blocking socket */
     while (bytes_written != len) {
-        rv = apr_sendv(s, vec + i, nvec - i, &n);
+        rv = apr_socket_sendv(s, vec + i, nvec - i, &n);
         bytes_written += n;
         if (rv != APR_SUCCESS)
             return rv;
@@ -2701,7 +2701,7 @@
         *nbytes += n;
 
         /* If the write did not complete, adjust the iovecs and issue
-         * apr_sendv again
+         * apr_socket_sendv again
          */
         if (bytes_written < len) {
             /* Skip over the vectors that have already been written */
@@ -2756,7 +2756,7 @@
     do {
         apr_size_t tmplen = file_bytes_left;
 
-        rv = apr_sendfile(c->client_socket, fd, hdtr, &file_offset, &tmplen,
+        rv = apr_socket_sendfile(c->client_socket, fd, hdtr, &file_offset, &tmplen,
                           flags);
         *bytes_sent += tmplen;
         total_bytes_left -= tmplen;
@@ -2867,7 +2867,7 @@
         rv = apr_file_read(fd, buffer, &sendlen);
         while (rv == APR_SUCCESS && sendlen) {
             bytes_sent = sendlen;
-            rv = apr_send(c->client_socket, &buffer[o], &bytes_sent);
+            rv = apr_socket_send(c->client_socket, &buffer[o], &bytes_sent);
             if (rv == APR_SUCCESS) {
                 sendlen -= bytes_sent; /* sendlen != bytes_sent ==> partial write */
                 o += bytes_sent;       /* o is where we are in the buffer */
@@ -3970,7 +3970,7 @@
                                                        headers              */
                                      &bytes_sent,   /* how many bytes were
                                                        sent                 */
-                                     flags);   /* apr_sendfile flags        */
+                                     flags);   /* apr_socket_sendfile flags        */
 
                 if (logio_add_bytes_out && bytes_sent > 0)
                     logio_add_bytes_out(c, bytes_sent);
Index: server/listen.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/listen.c,v
retrieving revision 1.84
diff -u -u -r1.84 listen.c
--- server/listen.c	22 Nov 2002 12:23:10 -0000	1.84
+++ server/listen.c	10 Dec 2002 23:33:13 -0000
@@ -165,7 +165,7 @@
     ap_sock_disable_nagle(s);
 #endif
 
-    if ((stat = apr_bind(s, server->bind_addr)) != APR_SUCCESS) {
+    if ((stat = apr_socket_bind(s, server->bind_addr)) != APR_SUCCESS) {
         ap_log_perror(APLOG_MARK, APLOG_STARTUP|APLOG_CRIT, stat, p,
                       "make_sock: could not bind to address %pI",
                       server->bind_addr);
@@ -173,7 +173,7 @@
         return stat;
     }
 
-    if ((stat = apr_listen(s, ap_listenbacklog)) != APR_SUCCESS) {
+    if ((stat = apr_socket_listen(s, ap_listenbacklog)) != APR_SUCCESS) {
         ap_log_perror(APLOG_MARK, APLOG_STARTUP|APLOG_ERR, stat, p,
                       "make_sock: unable to listen for connections "
                       "on address %pI",
@@ -253,7 +253,7 @@
         if ((sock_rv = apr_socket_create(&tmp_sock, APR_INET6, SOCK_STREAM, p)) 
             == APR_SUCCESS &&
             apr_sockaddr_info_get(&sa, NULL, APR_INET6, 0, 0, p) == APR_SUCCESS &&
-            apr_bind(tmp_sock, sa) == APR_SUCCESS) { 
+            apr_socket_bind(tmp_sock, sa) == APR_SUCCESS) { 
             default_family = APR_INET6;
         }
         else {
Index: server/main.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/main.c,v
retrieving revision 1.140
diff -u -u -r1.140 main.c
--- server/main.c	16 Oct 2002 18:03:44 -0000	1.140
+++ server/main.c	10 Dec 2002 23:33:13 -0000
@@ -276,7 +276,7 @@
     apr_pool_tag(process->pconf, "pconf");
     process->argc = argc;
     process->argv = argv;
-    process->short_name = apr_filename_of_pathname(argv[0]);
+    process->short_name = apr_filepath_name_get(argv[0]);
     return process;
 }
 
Index: server/mpm_common.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/mpm_common.c,v
retrieving revision 1.102
diff -u -u -r1.102 mpm_common.c
--- server/mpm_common.c	15 Jul 2002 08:05:10 -0000	1.102
+++ server/mpm_common.c	10 Dec 2002 23:33:14 -0000
@@ -502,7 +502,7 @@
         return rv;
     }
 
-    rv = apr_connect(sock, pod->sa);
+    rv = apr_socket_connect(sock, pod->sa);
     if (rv != APR_SUCCESS) {
         int log_level = APLOG_WARNING;
 
Index: server/request.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/request.c,v
retrieving revision 1.121
diff -u -u -r1.121 request.c
--- server/request.c	3 Nov 2002 22:17:32 -0000	1.121
+++ server/request.c	10 Dec 2002 23:33:17 -0000
@@ -443,7 +443,7 @@
         return HTTP_FORBIDDEN;
     }
 
-    if (apr_compare_users(fi.user, lfi->user) != APR_SUCCESS) {
+    if (apr_uid_compare(fi.user, lfi->user) != APR_SUCCESS) {
         return HTTP_FORBIDDEN;
     }
 
Index: server/rfc1413.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/rfc1413.c,v
retrieving revision 1.47
diff -u -u -r1.47 rfc1413.c
--- server/rfc1413.c	15 Jul 2002 08:18:50 -0000	1.47
+++ server/rfc1413.c	10 Dec 2002 23:33:17 -0000
@@ -164,7 +164,7 @@
  * addresses from the query socket.
  */
 
-    if ((rv = apr_bind(*newsock, localsa)) != APR_SUCCESS) {
+    if ((rv = apr_socket_bind(*newsock, localsa)) != APR_SUCCESS) {
 	ap_log_error(APLOG_MARK, APLOG_CRIT, rv, srv,
                      "rfc1413: Error binding query socket to local port");
         apr_socket_close(*newsock);
@@ -175,7 +175,7 @@
  * errors from connect usually imply the remote machine doesn't support
  * the service; don't log such an error
  */
-    if ((rv = apr_connect(*newsock, destsa)) != APR_SUCCESS) {
+    if ((rv = apr_socket_connect(*newsock, destsa)) != APR_SUCCESS) {
         apr_socket_close(*newsock);
         return rv;
     }
@@ -207,7 +207,7 @@
     while (i < buflen) {
         apr_size_t j = strlen(buffer + i);
         apr_status_t status;
-	status  = apr_send(sock, buffer+i, &j);
+	status  = apr_socket_send(sock, buffer+i, &j);
 	if (status != APR_SUCCESS) {
 	    ap_log_error(APLOG_MARK, APLOG_CRIT, status, srv,
 		         "write: rfc1413: error sending request");
@@ -233,7 +233,7 @@
     while((cp = strchr(buffer, '\012')) == NULL && i < sizeof(buffer) - 1) {
         apr_size_t j = sizeof(buffer) - 1 - i;
         apr_status_t status;
-	status = apr_recv(sock, buffer+i, &j);
+	status = apr_socket_recv(sock, buffer+i, &j);
 	if (status != APR_SUCCESS) {
 	    ap_log_error(APLOG_MARK, APLOG_CRIT, status, srv,
 			"read: rfc1413: error reading response");
Index: server/util.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/util.c,v
retrieving revision 1.134
diff -u -u -r1.134 util.c
--- server/util.c	8 Dec 2002 21:05:57 -0000	1.134
+++ server/util.c	10 Dec 2002 23:33:19 -0000
@@ -924,7 +924,7 @@
 
     if (finfo.filetype != APR_REG &&
 #if defined(WIN32) || defined(OS2) || defined(NETWARE)
-        strcasecmp(apr_filename_of_pathname(name), "nul") != 0) {
+        strcasecmp(apr_filepath_name_get(name), "nul") != 0) {
 #else
         strcmp(name, "/dev/null") != 0) {
 #endif /* WIN32 || OS2 */
Index: server/util_script.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/util_script.c,v
retrieving revision 1.80
diff -u -u -r1.80 util_script.c
--- server/util_script.c	2 Oct 2002 21:35:57 -0000	1.80
+++ server/util_script.c	10 Dec 2002 23:33:20 -0000
@@ -458,7 +458,7 @@
 	if ((*getsfunc) (w, MAX_STRING_LEN - 1, getsfunc_data) == 0) {
 	    ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, 0, r,
 			  "Premature end of script headers: %s", 
-                          apr_filename_of_pathname(r->filename));
+                          apr_filepath_name_get(r->filename));
 	    return HTTP_INTERNAL_SERVER_ERROR;
 	}
 
@@ -551,7 +551,7 @@
 
 	    ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, 0, r,
 			  "%s: %s", malformed, 
-                          apr_filename_of_pathname(r->filename));
+                          apr_filepath_name_get(r->filename));
 	    return HTTP_INTERNAL_SERVER_ERROR;
 	}
 
Index: server/mpm/beos/beos.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/mpm/beos/beos.c,v
retrieving revision 1.99
diff -u -u -r1.99 beos.c
--- server/mpm/beos/beos.c	12 Jul 2002 12:27:19 -0000	1.99
+++ server/mpm/beos/beos.c	10 Dec 2002 23:33:21 -0000
@@ -267,7 +267,7 @@
     int i = 0;
     for (i = 0 ; i < ap_max_child_assigned; i++){
         len = 4;
-        if (apr_sendto(udp_sock, udp_sa, 0, "die!", &len) != APR_SUCCESS)
+        if (apr_socket_sendto(udp_sock, udp_sa, 0, "die!", &len) != APR_SUCCESS)
             break;
     }   
 }
@@ -443,7 +443,7 @@
                     char *tmpbuf = apr_palloc(ptrans, sizeof(char) * 5);
                     apr_sockaddr_info_get(&rec_sa, "127.0.0.1", APR_UNSPEC, 7772, 0,
ptrans);
                     
-                    if ((ret = apr_recvfrom(rec_sa, listening_sockets[0], 0, tmpbuf, &len))
+                    if ((ret = apr_socket_recvfrom(rec_sa, listening_sockets[0], 0, tmpbuf,
&len))
                         != APR_SUCCESS){
                         ap_log_error(APLOG_MARK, APLOG_ERR, ret, NULL, 
                             "error getting data from UDP!!");
@@ -483,12 +483,12 @@
     got_fd:
 
         if (!this_worker_should_exit) {
-            rv = apr_accept(&csd, sd, ptrans);
+            rv = apr_socket_accept(&csd, sd, ptrans);
 
             apr_thread_mutex_unlock(accept_mutex);
             if (rv != APR_SUCCESS) {
                 ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,
-                  "apr_accept");
+                  "apr_socket_accept");
             } else {
                 process_socket(ptrans, csd, child_slot, bucket_alloc);
                 requests_this_child--;
@@ -801,7 +801,7 @@
             "couldn't create control socket, shutting down");
         return 1;
     }
-    if (apr_bind(udp_sock, udp_sa) != APR_SUCCESS){
+    if (apr_socket_bind(udp_sock, udp_sa) != APR_SUCCESS){
         ap_log_error(APLOG_MARK, APLOG_ALERT, errno, s,
             "couldn't bind UDP socket!");
         return 1;
Index: server/mpm/experimental/perchild/perchild.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/mpm/experimental/perchild/perchild.c,v
retrieving revision 1.136
diff -u -u -r1.136 perchild.c
--- server/mpm/experimental/perchild/perchild.c	25 Oct 2002 02:20:26 -0000	1.136
+++ server/mpm/experimental/perchild/perchild.c	10 Dec 2002 23:33:24 -0000
@@ -659,7 +659,7 @@
         char pipe_read_char;
         apr_size_t n = 1;
 
-        ret = apr_recv(lr->sd, &pipe_read_char, &n);
+        ret = apr_socket_recv(lr->sd, &pipe_read_char, &n);
         if (APR_STATUS_IS_EAGAIN(ret)) {
             /* It lost the lottery. It must continue to suffer
              * through a life of servitude. */
Index: server/mpm/mpmt_os2/mpmt_os2_child.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/mpm/mpmt_os2/mpmt_os2_child.c,v
retrieving revision 1.23
diff -u -u -r1.23 mpmt_os2_child.c
--- server/mpm/mpmt_os2/mpmt_os2_child.c	11 Jul 2002 05:42:20 -0000	1.23
+++ server/mpm/mpmt_os2/mpmt_os2_child.c	10 Dec 2002 23:33:25 -0000
@@ -239,7 +239,7 @@
         worker_args->pconn = pconn;
 
         if (num_listeners == 1) {
-            rv = apr_accept(&worker_args->conn_sd, ap_listeners->sd, pconn);
+            rv = apr_socket_accept(&worker_args->conn_sd, ap_listeners->sd, pconn);
         } else {
             rc = DosRequestMutexSem(ap_mpm_accept_mutex, SEM_INDEFINITE_WAIT);
 
@@ -287,14 +287,14 @@
                 }
 
                 sd = lr->sd;
-                rv = apr_accept(&worker_args->conn_sd, sd, pconn);
+                rv = apr_socket_accept(&worker_args->conn_sd, sd, pconn);
             }
         }
 
         if (rv != APR_SUCCESS) {
             if (!APR_STATUS_IS_EINTR(rv)) {
                 ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,
-                             "apr_accept");
+                             "apr_socket_accept");
                 clean_child_exit(APEXIT_CHILDFATAL);
             }
         } else {
Index: server/mpm/netware/mpm_netware.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/mpm/netware/mpm_netware.c,v
retrieving revision 1.63
diff -u -u -r1.63 mpm_netware.c
--- server/mpm/netware/mpm_netware.c	25 Nov 2002 17:46:26 -0000	1.63
+++ server/mpm/netware/mpm_netware.c	10 Dec 2002 23:33:26 -0000
@@ -448,7 +448,7 @@
             wouldblock_retry = MAX_WB_RETRIES;
 
             while (wouldblock_retry) {
-                if ((stat = apr_accept(&csd, sd, ptrans)) == APR_SUCCESS) {
+                if ((stat = apr_socket_accept(&csd, sd, ptrans)) == APR_SUCCESS) {
                     break;
                 }
                 else {
@@ -510,12 +510,12 @@
                         * occur in mobile IP.
                         */
                         ap_log_error(APLOG_MARK, APLOG_EMERG, stat, ap_server_conf,
-                            "apr_accept: giving up.");
+                            "apr_socket_accept: giving up.");
                         clean_child_exit(APEXIT_CHILDFATAL, my_worker_num, ptrans, bucket_alloc);
                 }
                 else {
                         ap_log_error(APLOG_MARK, APLOG_ERR, stat, ap_server_conf,
-                            "apr_accept: (client socket)");
+                            "apr_socket_accept: (client socket)");
                         clean_child_exit(1, my_worker_num, ptrans, bucket_alloc);
                 }
             }
Index: server/mpm/winnt/mpm_winnt.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/mpm/winnt/mpm_winnt.c,v
retrieving revision 1.296
diff -u -u -r1.296 mpm_winnt.c
--- server/mpm/winnt/mpm_winnt.c	8 Nov 2002 16:31:37 -0000	1.296
+++ server/mpm/winnt/mpm_winnt.c	10 Dec 2002 23:33:28 -0000
@@ -1168,10 +1168,10 @@
     /* WARNING: There is an implict assumption here that the
      * executable resides in ServerRoot or ServerRoot\bin
      */
-    def_server_root = (char *) apr_filename_of_pathname(binpath);
+    def_server_root = (char *) apr_filepath_name_get(binpath);
     if (def_server_root > binpath) {
         *(def_server_root - 1) = '\0';
-        def_server_root = (char *) apr_filename_of_pathname(binpath);
+        def_server_root = (char *) apr_filepath_name_get(binpath);
         if (!strcasecmp(def_server_root, "bin"))
             *(def_server_root - 1) = '\0';
     }
Index: support/ab.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/support/ab.c,v
retrieving revision 1.121
diff -u -u -r1.121 ab.c
--- support/ab.c	16 Oct 2002 12:39:21 -0000	1.121
+++ support/ab.c	10 Dec 2002 23:33:31 -0000
@@ -103,9 +103,9 @@
    ** Version 2.0.36-dev
    **    Improvements to concurrent processing:
    **      - Enabled non-blocking connect()s.
-   **      - Prevent blocking calls to apr_recv() (thereby allowing AB to
+   **      - Prevent blocking calls to apr_socket_recv() (thereby allowing AB to
    **        manage its entire set of socket descriptors).
-   **      - Any error returned from apr_recv() that is not EAGAIN or EOF
+   **      - Any error returned from apr_socket_recv() that is not EAGAIN or EOF
    **        is now treated as fatal.
    **      Contributed by Aaron Bannert, April 24, 2002
    **
@@ -760,7 +760,7 @@
         }
         else
 #endif
-	e = apr_send(c->aprsock, request + c->rwrote, &l);
+	e = apr_socket_send(c->aprsock, request + c->rwrote, &l);
 
 	/*
 	 * Bail early on the most common case
@@ -1250,7 +1250,7 @@
         apr_err("socket nonblock", rv);
     }
     c->start = apr_time_now();
-    if ((rv = apr_connect(c->aprsock, destsa)) != APR_SUCCESS) {
+    if ((rv = apr_socket_connect(c->aprsock, destsa)) != APR_SUCCESS) {
 	if (APR_STATUS_IS_EINPROGRESS(rv)) {
             apr_pollfd_t new_pollfd;
 	    c->state = STATE_CONNECTING;
@@ -1272,7 +1272,7 @@
 	    if (bad++ > 10) {
 		fprintf(stderr,
 			"\nTest aborted after 10 failures\n\n");
-		apr_err("apr_connect()", rv);
+		apr_err("apr_socket_connect()", rv);
 	    }
 	    c->state = STATE_UNCONNECTED;
 	    start_connect(c);
@@ -1371,7 +1371,7 @@
     }
     else {
 #endif
-    status = apr_recv(c->aprsock, buffer, &r);
+    status = apr_socket_recv(c->aprsock, buffer, &r);
     if (APR_STATUS_IS_EAGAIN(status))
 	return;
     else if (r == 0 && APR_STATUS_IS_EOF(status)) {
@@ -1379,12 +1379,12 @@
 	close_connection(c);
 	return;
     }
-    /* catch legitimate fatal apr_recv errors */
+    /* catch legitimate fatal apr_socket_recv errors */
     else if (status != APR_SUCCESS) {
         err_except++; /* XXX: is this the right error counter? */
         /* XXX: Should errors here be fatal, or should we allow a
          * certain number of them before completely failing? -aaron */
-        apr_err("apr_recv", status);
+        apr_err("apr_socket_recv", status);
     }
 #ifdef USE_SSL
     }

Mime
View raw message