httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r293169 - in /httpd/httpd/branches/2.2.x/modules: aaa/mod_authnz_ldap.c ldap/util_ldap.c
Date Sun, 02 Oct 2005 21:22:03 GMT
Author: colm
Date: Sun Oct  2 14:21:59 2005
New Revision: 293169

URL: http://svn.apache.org/viewcvs?rev=293169&view=rev
Log:
Merge r265047 and r265049 from trunk. Use the correct PID formatting.
Originally by: Jim
Reviewed by: Colm

Modified:
    httpd/httpd/branches/2.2.x/modules/aaa/mod_authnz_ldap.c
    httpd/httpd/branches/2.2.x/modules/ldap/util_ldap.c

Modified: httpd/httpd/branches/2.2.x/modules/aaa/mod_authnz_ldap.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/aaa/mod_authnz_ldap.c?rev=293169&r1=293168&r2=293169&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/aaa/mod_authnz_ldap.c (original)
+++ httpd/httpd/branches/2.2.x/modules/aaa/mod_authnz_ldap.c Sun Oct  2 14:21:59 2005
@@ -366,24 +366,24 @@
     }
     else {
         ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, 
-                      "[%d] auth_ldap authenticate: no sec->host - weird...?", getpid());
+                      "[%" APR_PID_T_FMT "] auth_ldap authenticate: no sec->host - weird...?",
getpid());
         return AUTH_GENERAL_ERROR;
     }
 
     ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
-                  "[%d] auth_ldap authenticate: using URL %s", getpid(), sec->url);
+                  "[%" APR_PID_T_FMT "] auth_ldap authenticate: using URL %s", getpid(),
sec->url);
 
     /* Get the password that the client sent */
     if (password == NULL) {
         ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
-                      "[%d] auth_ldap authenticate: no password specified", getpid());
+                      "[%" APR_PID_T_FMT "] auth_ldap authenticate: no password specified",
getpid());
         util_ldap_connection_close(ldc);
         return AUTH_GENERAL_ERROR;
     }
 
     if (user == NULL) {
         ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
-                      "[%d] auth_ldap authenticate: no user specified", getpid());
+                      "[%" APR_PID_T_FMT "] auth_ldap authenticate: no user specified", getpid());
         util_ldap_connection_close(ldc);
         return AUTH_GENERAL_ERROR;
     }
@@ -406,7 +406,7 @@
     /* handle bind failure */
     if (result != LDAP_SUCCESS) {
         ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, 
-                      "[%d] auth_ldap authenticate: "
+                      "[%" APR_PID_T_FMT "] auth_ldap authenticate: "
                       "user %s authentication failed; URI %s [%s][%s]",
                       getpid(), user, r->uri, ldc->reason, ldap_err2string(result));
 
@@ -443,7 +443,7 @@
     }
 
     ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, 
-                  "[%d] auth_ldap authenticate: accepting %s", getpid(), user);
+                  "[%" APR_PID_T_FMT "] auth_ldap authenticate: accepting %s", getpid(),
user);
 
     return AUTH_GRANTED;
 }
@@ -507,7 +507,7 @@
     }
     else {
         ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, 
-                      "[%d] auth_ldap authorise: no sec->host - weird...?", getpid());
+                      "[%" APR_PID_T_FMT "] auth_ldap authorise: no sec->host - weird...?",
getpid());
         return sec->auth_authoritative? HTTP_UNAUTHORIZED : DECLINED;
     }
 
@@ -531,7 +531,7 @@
 
     if (!reqs_arr) {
         ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
-                      "[%d] auth_ldap authorise: no requirements array", getpid());
+                      "[%" APR_PID_T_FMT "] auth_ldap authorise: no requirements array",
getpid());
         return sec->auth_authoritative? HTTP_UNAUTHORIZED : DECLINED;
     }
 
@@ -587,7 +587,7 @@
         if (strcmp(w, "ldap-user") == 0) {
             if (req->dn == NULL || strlen(req->dn) == 0) {
                 ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
-                              "[%d] auth_ldap authorise: "
+                              "[%" APR_PID_T_FMT "] auth_ldap authorise: "
                               "require user: user's DN has not been defined; failing authorisation",

                               getpid());
                 return sec->auth_authoritative? HTTP_UNAUTHORIZED : DECLINED;
@@ -600,13 +600,13 @@
             switch(result) {
                 case LDAP_COMPARE_TRUE: {
                     ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, 
-                                  "[%d] auth_ldap authorise: "
+                                  "[%" APR_PID_T_FMT "] auth_ldap authorise: "
                                   "require user: authorisation successful", getpid());
                     return OK;
                 }
                 default: {
                     ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, 
-                                  "[%d] auth_ldap authorise: require user: "
+                                  "[%" APR_PID_T_FMT "] auth_ldap authorise: require user:
"
                                   "authorisation failed [%s][%s]", getpid(),
                                   ldc->reason, ldap_err2string(result));
                 }
@@ -620,13 +620,13 @@
                 switch(result) {
                     case LDAP_COMPARE_TRUE: {
                         ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, 
-                                      "[%d] auth_ldap authorise: "
+                                      "[%" APR_PID_T_FMT "] auth_ldap authorise: "
                                       "require user: authorisation successful", getpid());
                         return OK;
                     }
                     default: {
                         ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, 
-                                      "[%d] auth_ldap authorise: "
+                                      "[%" APR_PID_T_FMT "] auth_ldap authorise: "
                                       "require user: authorisation failed [%s][%s]",
                                       getpid(), ldc->reason, ldap_err2string(result));
                     }
@@ -636,7 +636,7 @@
         else if (strcmp(w, "ldap-dn") == 0) {
             if (req->dn == NULL || strlen(req->dn) == 0) {
                 ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
-                              "[%d] auth_ldap authorise: "
+                              "[%" APR_PID_T_FMT "] auth_ldap authorise: "
                               "require dn: user's DN has not been defined; failing authorisation",

                               getpid());
                 return sec->auth_authoritative? HTTP_UNAUTHORIZED : DECLINED;
@@ -646,13 +646,13 @@
             switch(result) {
                 case LDAP_COMPARE_TRUE: {
                     ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, 
-                                  "[%d] auth_ldap authorise: "
+                                  "[%" APR_PID_T_FMT "] auth_ldap authorise: "
                                   "require dn: authorisation successful", getpid());
                     return OK;
                 }
                 default: {
                     ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, 
-                                  "[%d] auth_ldap authorise: "
+                                  "[%" APR_PID_T_FMT "] auth_ldap authorise: "
                                   "require dn \"%s\": LDAP error [%s][%s]",
                                   getpid(), t, ldc->reason, ldap_err2string(result));
                 }
@@ -665,7 +665,8 @@
             if (sec->group_attrib_is_dn) {
                 if (req->dn == NULL || strlen(req->dn) == 0) {
                     ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
-                                  "[%d] auth_ldap authorise: require group: user's DN has
not been defined; failing authorisation", 
+                                  "[%" APR_PID_T_FMT "] auth_ldap authorise: require group:
"
+                                  "user's DN has not been defined; failing authorisation",

                                   getpid());
                     return sec->auth_authoritative? HTTP_UNAUTHORIZED : DECLINED;
                 }
@@ -679,12 +680,14 @@
             }
 
             ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, 
-                          "[%d] auth_ldap authorise: require group: testing for group membership
in \"%s\"", 
+                          "[%" APR_PID_T_FMT "] auth_ldap authorise: require group: "
+                          "testing for group membership in \"%s\"", 
                           getpid(), t);
 
             for (i = 0; i < sec->groupattr->nelts; i++) {
                 ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, 
-                              "[%d] auth_ldap authorise: require group: testing for %s: %s
(%s)", getpid(),
+                              "[%" APR_PID_T_FMT "] auth_ldap authorise: require group: "
+                              "testing for %s: %s (%s)", getpid(),
                               ent[i].name, sec->group_attrib_is_dn ? req->dn : req->user,
t);
 
                 result = util_ldap_cache_compare(r, ldc, sec->url, t, ent[i].name, 
@@ -692,14 +695,14 @@
                 switch(result) {
                     case LDAP_COMPARE_TRUE: {
                         ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, 
-                                      "[%d] auth_ldap authorise: require group: "
+                                      "[%" APR_PID_T_FMT "] auth_ldap authorise: require
group: "
                                       "authorisation successful (attribute %s) [%s][%s]",
                                       getpid(), ent[i].name, ldc->reason, ldap_err2string(result));
                         return OK;
                     }
                     default: {
                         ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, 
-                                      "[%d] auth_ldap authorise: require group \"%s\": "
+                                      "[%" APR_PID_T_FMT "] auth_ldap authorise: require
group \"%s\": "
                                       "authorisation failed [%s][%s]",
                                       getpid(), t, ldc->reason, ldap_err2string(result));
                     }
@@ -709,7 +712,7 @@
         else if (strcmp(w, "ldap-attribute") == 0) {
             if (req->dn == NULL || strlen(req->dn) == 0) {
                 ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
-                              "[%d] auth_ldap authorise: "
+                              "[%" APR_PID_T_FMT "] auth_ldap authorise: "
                               "require ldap-attribute: user's DN has not been defined; failing
authorisation", 
                               getpid());
                 return sec->auth_authoritative? HTTP_UNAUTHORIZED : DECLINED;
@@ -719,21 +722,21 @@
                 value = ap_getword_conf(r->pool, &t);
 
                 ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
-                              "[%d] auth_ldap authorise: checking attribute"
+                              "[%" APR_PID_T_FMT "] auth_ldap authorise: checking attribute"
                               " %s has value %s", getpid(), w, value);
                 result = util_ldap_cache_compare(r, ldc, sec->url, req->dn,
                                                  w, value);
                 switch(result) {
                     case LDAP_COMPARE_TRUE: {
                         ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 
-                                      0, r, "[%d] auth_ldap authorise: "
+                                      0, r, "[%" APR_PID_T_FMT "] auth_ldap authorise: "
                                       "require attribute: authorisation "
                                       "successful", getpid());
                         return OK;
                     }
                     default: {
                         ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 
-                                      0, r, "[%d] auth_ldap authorise: "
+                                      0, r, "[%" APR_PID_T_FMT "] auth_ldap authorise: "
                                       "require attribute: authorisation "
                                       "failed [%s][%s]", getpid(), 
                                       ldc->reason, ldap_err2string(result));
@@ -744,14 +747,14 @@
         else if (strcmp(w, "ldap-filter") == 0) {
             if (req->dn == NULL || strlen(req->dn) == 0) {
                 ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
-                              "[%d] auth_ldap authorise: "
+                              "[%" APR_PID_T_FMT "] auth_ldap authorise: "
                               "require ldap-filter: user's DN has not been defined; failing
authorisation", 
                               getpid());
                 return sec->auth_authoritative? HTTP_UNAUTHORIZED : DECLINED;
             }
             if (t[0]) {
                 ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
-                              "[%d] auth_ldap authorise: checking filter %s", 
+                              "[%" APR_PID_T_FMT "] auth_ldap authorise: checking filter
%s", 
                               getpid(), t);
 
                 /* Build the username filter */
@@ -764,7 +767,7 @@
                 /* Make sure that the filtered search returned the correct user dn */
                 if (result == LDAP_SUCCESS) {
                     ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
-                                  "[%d] auth_ldap authorise: checking dn match %s", 
+                                  "[%" APR_PID_T_FMT "] auth_ldap authorise: checking dn
match %s", 
                                   getpid(), dn);
                     result = util_ldap_cache_comparedn(r, ldc, sec->url, req->dn, dn,

                          sec->compare_dn_on_server);
@@ -773,14 +776,14 @@
                 switch(result) {
                     case LDAP_COMPARE_TRUE: {
                         ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 
-                                      0, r, "[%d] auth_ldap authorise: "
+                                      0, r, "[%" APR_PID_T_FMT "] auth_ldap authorise: "
                                       "require ldap-filter: authorisation "
                                       "successful", getpid());
                         return OK;
                     }
                     case LDAP_FILTER_ERROR: {
                         ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 
-                                      0, r, "[%d] auth_ldap authorise: "
+                                      0, r, "[%" APR_PID_T_FMT "] auth_ldap authorise: "
                                       "require ldap-filter: %s authorisation "
                                       "failed [%s][%s]", getpid(), 
                                       filtbuf, ldc->reason, ldap_err2string(result));
@@ -788,7 +791,7 @@
                     }
                     default: {
                         ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 
-                                      0, r, "[%d] auth_ldap authorise: "
+                                      0, r, "[%" APR_PID_T_FMT "] auth_ldap authorise: "
                                       "require ldap-filter: authorisation "
                                       "failed [%s][%s]", getpid(), 
                                       ldc->reason, ldap_err2string(result));
@@ -800,19 +803,19 @@
 
     if (!method_restricted) {
         ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, 
-                      "[%d] auth_ldap authorise: agreeing because non-restricted", 
+                      "[%" APR_PID_T_FMT "] auth_ldap authorise: agreeing because non-restricted",

                       getpid());
         return OK;
     }
 
     if (!sec->auth_authoritative) {
         ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, 
-                      "[%d] auth_ldap authorise: declining to authorise", getpid());
+                      "[%" APR_PID_T_FMT "] auth_ldap authorise: declining to authorise",
getpid());
         return DECLINED;
     }
 
     ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, 
-                  "[%d] auth_ldap authorise: authorisation denied", getpid());
+                  "[%" APR_PID_T_FMT "] auth_ldap authorise: authorisation denied", getpid());
     ap_note_basic_auth_failure (r);
 
     return HTTP_UNAUTHORIZED;
@@ -835,7 +838,7 @@
     authn_ldap_config_t *sec = config;
 
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
-                 cmd->server, "[%d] auth_ldap url parse: `%s'", getpid(), url);
+                 cmd->server, "[%" APR_PID_T_FMT "] auth_ldap url parse: `%s'", getpid(),
url);
 
     rc = apr_ldap_url_parse(cmd->pool, url, &(urld), &(result));
     if (rc != APR_SUCCESS) {
@@ -844,20 +847,20 @@
     sec->url = apr_pstrdup(cmd->pool, url);
 
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
-                 cmd->server, "[%d] auth_ldap url parse: Host: %s", getpid(), urld->lud_host);
+                 cmd->server, "[%" APR_PID_T_FMT "] auth_ldap url parse: Host: %s", getpid(),
urld->lud_host);
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
-                 cmd->server, "[%d] auth_ldap url parse: Port: %d", getpid(), urld->lud_port);
+                 cmd->server, "[%" APR_PID_T_FMT "] auth_ldap url parse: Port: %d", getpid(),
urld->lud_port);
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
-                 cmd->server, "[%d] auth_ldap url parse: DN: %s", getpid(), urld->lud_dn);
+                 cmd->server, "[%" APR_PID_T_FMT "] auth_ldap url parse: DN: %s", getpid(),
urld->lud_dn);
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
-                 cmd->server, "[%d] auth_ldap url parse: attrib: %s", getpid(), urld->lud_attrs?
urld->lud_attrs[0] : "(null)");
+                 cmd->server, "[%" APR_PID_T_FMT "] auth_ldap url parse: attrib: %s",
getpid(), urld->lud_attrs? urld->lud_attrs[0] : "(null)");
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
-                 cmd->server, "[%d] auth_ldap url parse: scope: %s", getpid(), 
+                 cmd->server, "[%" APR_PID_T_FMT "] auth_ldap url parse: scope: %s", getpid(),

                  (urld->lud_scope == LDAP_SCOPE_SUBTREE? "subtree" : 
                   urld->lud_scope == LDAP_SCOPE_BASE? "base" : 
                   urld->lud_scope == LDAP_SCOPE_ONELEVEL? "onelevel" : "unknown"));
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
-                 cmd->server, "[%d] auth_ldap url parse: filter: %s", getpid(), urld->lud_filter);
+                 cmd->server, "[%" APR_PID_T_FMT "] auth_ldap url parse: filter: %s",
getpid(), urld->lud_filter);
 
     /* Set all the values, or at least some sane defaults */
     if (sec->host) {

Modified: httpd/httpd/branches/2.2.x/modules/ldap/util_ldap.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/ldap/util_ldap.c?rev=293169&r1=293168&r2=293169&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/ldap/util_ldap.c (original)
+++ httpd/httpd/branches/2.2.x/modules/ldap/util_ldap.c Sun Oct  2 14:21:59 2005
@@ -1337,7 +1337,7 @@
     st->search_cache_ttl = atol(ttl) * 1000000;
 
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server, 
-                 "[%d] ldap cache: Setting cache TTL to %ld microseconds.",
+                 "[%" APR_PID_T_FMT "] ldap cache: Setting cache TTL to %ld microseconds.",
                  getpid(), st->search_cache_ttl);
 
     return NULL;
@@ -1357,7 +1357,7 @@
     }
 
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server, 
-                 "[%d] ldap cache: Setting search cache size to %ld entries.",
+                 "[%" APR_PID_T_FMT "] ldap cache: Setting search cache size to %ld entries.",
                  getpid(), st->search_cache_size);
 
     return NULL;
@@ -1373,7 +1373,7 @@
     st->compare_cache_ttl = atol(ttl) * 1000000;
 
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server, 
-                 "[%d] ldap cache: Setting operation cache TTL to %ld microseconds.", 
+                 "[%" APR_PID_T_FMT "] ldap cache: Setting operation cache TTL to %ld microseconds.",

                  getpid(), st->compare_cache_ttl);
 
     return NULL;
@@ -1392,7 +1392,7 @@
     }
 
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server, 
-                 "[%d] ldap cache: Setting operation cache size to %ld "
+                 "[%" APR_PID_T_FMT "] ldap cache: Setting operation cache size to %ld "
                  "entries.", getpid(), st->compare_cache_size);
 
     return NULL;
@@ -1709,7 +1709,7 @@
     st->connectionTimeout = atol(ttl);
 
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server, 
-                 "[%d] ldap connection: Setting connection timeout to "
+                 "[%" APR_PID_T_FMT "] ldap connection: Setting connection timeout to "
                  "%ld seconds.", getpid(), st->connectionTimeout);
 #else
     ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, cmd->server,



Mime
View raw message