]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#8731 Manual adjustments
authorOndřej Kuzník <ondra@openldap.org>
Fri, 15 Feb 2019 13:52:23 +0000 (13:52 +0000)
committerOndřej Kuzník <ondra@openldap.org>
Fri, 15 Feb 2019 16:51:53 +0000 (16:51 +0000)
contrib/slapd-modules/nops/nops.c
libraries/librewrite/config.c
libraries/librewrite/ldapmap.c
libraries/librewrite/xmap.c
servers/slapd/acl.c
servers/slapd/back-ldap/chain.c
servers/slapd/back-wt/dn2id.c
servers/slapd/daemon.c
servers/slapd/limits.c
servers/slapd/modify.c

index 1dcd1c5cc2f42cb5bbf84975880bdc8377f5e545..fcb406900d1ac75a7bdee392d989748d9d0ecece 100644 (file)
@@ -130,8 +130,8 @@ nops_modify( Operation *op, SlapReply *rs )
                        continue;
 
                /* This is a nop, remove it */
-               Debug(LDAP_DEBUG_TRACE, "removing nop on %s%s%s",
-                       a->a_desc->ad_cname.bv_val, "", "");
+               Debug(LDAP_DEBUG_TRACE, "removing nop on %s",
+                       a->a_desc->ad_cname.bv_val, 0, 0 );
 
                nops_rm_mod(&op->orm_modlist, mc);
        }
index f868540da733dd4df874f3b25e16f69f4964621d..8af7292f1eaac6f7b79d2be8e13caae178e0c686 100644 (file)
@@ -67,15 +67,15 @@ rewrite_parse(
        if ( strcasecmp( argv[ 0 ], "rewriteEngine" ) == 0 ) {
                if ( argc < 2 ) {
                        Debug( LDAP_DEBUG_ANY,
-                                       "[%s:%d] rewriteEngine needs 'state'\n%s",
-                                       fname, lineno, "" );
+                                       "[%s:%d] rewriteEngine needs 'state'\n",
+                                       fname, lineno, 0 );
                        return -1;
 
                } else if ( argc > 2 ) {
                        Debug( LDAP_DEBUG_ANY,
                                        "[%s:%d] extra fields in rewriteEngine"
-                                       " will be discarded\n%s",
-                                       fname, lineno, "" );
+                                       " will be discarded\n",
+                                       fname, lineno, 0 );
                }
 
                if ( strcasecmp( argv[ 1 ], "on" ) == 0 ) {
@@ -87,8 +87,8 @@ rewrite_parse(
                } else {
                        Debug( LDAP_DEBUG_ANY,
                                        "[%s:%d] unknown 'state' in rewriteEngine;"
-                                       " assuming 'on'\n%s",
-                                       fname, lineno, "" );
+                                       " assuming 'on'\n",
+                                       fname, lineno, 0 );
                        info->li_state = REWRITE_ON;
                }
                rc = REWRITE_SUCCESS;
@@ -99,8 +99,8 @@ rewrite_parse(
        } else if ( strcasecmp( argv[ 0 ], "rewriteMaxPasses" ) == 0 ) {
                if ( argc < 2 ) {
                        Debug( LDAP_DEBUG_ANY,
-                                       "[%s:%d] rewriteMaxPasses needs 'value'\n%s",
-                                       fname, lineno, "" );
+                                       "[%s:%d] rewriteMaxPasses needs 'value'\n",
+                                       fname, lineno, 0 );
                        return -1;
                }
 
@@ -144,8 +144,8 @@ rewrite_parse(
        } else if ( strcasecmp( argv[ 0 ], "rewriteContext" ) == 0 ) {
                if ( argc < 2 ) {
                        Debug( LDAP_DEBUG_ANY,
-                                       "[%s:%d] rewriteContext needs 'name'\n%s",
-                                       fname, lineno, "" );
+                                       "[%s:%d] rewriteContext needs 'name'\n",
+                                       fname, lineno, 0 );
                        return -1;
                } 
 
@@ -178,8 +178,8 @@ rewrite_parse(
                                         Debug( LDAP_DEBUG_ANY,
                                                         "[%s:%d] rewriteContext"
                                                         " needs 'name' after"
-                                                        " 'alias'\n%s",
-                                                        fname, lineno, "" );
+                                                        " 'alias'\n",
+                                                        fname, lineno, 0 );
                                         return -1;
 
                                 } else if ( argc > 4 ) {
@@ -188,8 +188,8 @@ rewrite_parse(
                                                         " rewriteContext"
                                                         " after aliased name"
                                                         " will be"
-                                                        " discarded\n%s",
-                                                        fname, lineno, "" );
+                                                        " discarded\n",
+                                                        fname, lineno, 0 );
                                 }
                                 
                                 aliased = rewrite_context_find( info, 
@@ -211,8 +211,8 @@ rewrite_parse(
                                 Debug( LDAP_DEBUG_ANY,
                                                 "[%s:%d] extra fields"
                                                 " in rewriteContext"
-                                                " will be discarded\n%s",
-                                                fname, lineno, "" );
+                                                " will be discarded\n",
+                                                fname, lineno, 0 );
                         }
                 }
                 rc = REWRITE_SUCCESS;
@@ -224,22 +224,22 @@ rewrite_parse(
                if ( argc < 3 ) {
                        Debug( LDAP_DEBUG_ANY,
                                        "[%s:%d] rewriteRule needs 'pattern'"
-                                       " 'subst' ['flags']\n%s",
-                                       fname, lineno, "" );
+                                       " 'subst' ['flags']\n",
+                                       fname, lineno, 0 );
                        return -1;
 
                } else if ( argc > 4 ) {
                        Debug( LDAP_DEBUG_ANY,
                                        "[%s:%d] extra fields in rewriteRule"
-                                       " will be discarded\n%s",
-                                       fname, lineno, "" );
+                                       " will be discarded\n",
+                                       fname, lineno, 0 );
                }
 
                if ( rewrite_int_curr_context == NULL ) {
                        Debug( LDAP_DEBUG_ANY,
                                        "[%s:%d] rewriteRule outside a"
-                                       " context; will add to default\n%s",
-                                       fname, lineno, "" );
+                                       " context; will add to default\n",
+                                       fname, lineno, 0 );
                        rewrite_int_curr_context = rewrite_context_find( info,
                                        REWRITE_DEFAULT_CONTEXT );
 
@@ -260,8 +260,8 @@ rewrite_parse(
                if ( argc < 3 ) {
                        Debug( LDAP_DEBUG_ANY,
                                        "[%s:%d] rewriteMap needs at least 'type'"
-                                       " and 'name' ['args']\n%s",
-                                       fname, lineno, "" );
+                                       " and 'name' ['args']\n",
+                                       fname, lineno, 0 );
                        return -1;
                }
 
@@ -275,8 +275,8 @@ rewrite_parse(
                if ( argc < 3 ) {
                        Debug( LDAP_DEBUG_ANY,
                                        "[%s:%d] rewriteParam needs 'name'"
-                                       " and 'value'\n%s",
-                                       fname, lineno, "" );
+                                       " and 'value'\n",
+                                       fname, lineno, 0 );
                        return -1;
                }
 
@@ -432,8 +432,8 @@ rewrite_parse_builtin_map(
         */     
        } else {
                free( map );
-               Debug( LDAP_DEBUG_ANY, "[%s:%d] unknown map type\n%s",
-                               fname, lineno, "" );
+               Debug( LDAP_DEBUG_ANY, "[%s:%d] unknown map type\n",
+                               fname, lineno );
                return -1;
        }
 
index da4bd3575af87d2b522d12c54012fe1f6414c073..2f2c5de243eee5a5112aac27a227570449982504 100644 (file)
@@ -106,8 +106,8 @@ map_ldap_parse(
 
        if ( argc < 1 ) {
                Debug( LDAP_DEBUG_ANY,
-                               "[%s:%d] ldap map needs URI\n%s",
-                               fname, lineno, "" );
+                               "[%s:%d] ldap map needs URI\n",
+                               fname, lineno, 0 );
                free( data );
                return NULL;
        }
index fb228fd11e54eb51cde1de11c4ce8693882089a2..da5438de5e14ee282dd36c796bb85c2ace0613ce 100644 (file)
@@ -55,15 +55,15 @@ rewrite_xmap_parse(
        assert( s != NULL );
        assert( currpos != NULL );
 
-       Debug( LDAP_DEBUG_ARGS, "rewrite_xmap_parse: %s\n%s%s",
-                       s, "", "" );
+       Debug( LDAP_DEBUG_ARGS, "rewrite_xmap_parse: %s\n",
+                       s, 0, 0 );
 
        *currpos = NULL;
 
        map = calloc( sizeof( struct rewrite_map ), 1 );
        if ( map == NULL ) {
                Debug( LDAP_DEBUG_ANY, "rewrite_xmap_parse:"
-                               " calloc failed\n%s%s%s", "", "", "" );
+                               " calloc failed\n", 0, 0, 0 );
                return NULL;
        }
 
index d7c2a48ccc044730c3de0f56e588f893e3cb04aa..59a74e5013a103cc6417438e8388fb4a57b64e26 100644 (file)
@@ -2632,7 +2632,7 @@ acl_string_expand(
        *dp = '\0';
        bv->bv_len = size;
 
-       Debug( LDAP_DEBUG_ACL, "=> acl_string_expand: pattern:  %.*s\n", (int)pat->bv_len, pat->bv_val, 0 );
+       Debug( LDAP_DEBUG_ACL, "=> acl_string_expand: pattern:  %.*s\n", (int)pat->bv_len, pat->bv_val );
        Debug( LDAP_DEBUG_ACL, "=> acl_string_expand: expanded: %s\n", bv->bv_val, 0, 0 );
 
        return 0;
index fd1c7809a3146b8b1bbe764b70719d4cd9927337..043ab4a6677bf24a2698298d150614cb3e0de38c 100644 (file)
@@ -1327,7 +1327,7 @@ chain_ldadd( CfEntryInfo *p, Entry *e, ConfigArgs *ca )
                Debug( LDAP_DEBUG_ANY, "slapd-chain: "
                        "first underlying database \"%s\" "
                        "cannot contain attribute \"%s\".\n",
-                       e->e_name.bv_val, ad->ad_cname.bv_val, 0 );
+                       e->e_name.bv_val, ad->ad_cname.bv_val );
                rc = LDAP_CONSTRAINT_VIOLATION;
                goto done;
 
index 3c9a15f011f08becafca8b27e8f814b903e484f5..eddfe5f812b705b9a90f87bb797347b274d278d5 100644 (file)
@@ -371,7 +371,7 @@ wt_dn2id(
                Debug( LDAP_DEBUG_ANY,
                           LDAP_XSTRING(wt_dn2id)
                           ": cursor open failed: %s (%d)\n",
-                          wiredtiger_strerror(rc), rc, 0 );
+                          wiredtiger_strerror(rc), rc );
                return rc;
        }
        cursor->set_key(cursor, dn->bv_val);
index da4651ec2b0bc52a80b70579ad2a15b2d0ac2caa..fee323ec75d3fe9637eae7c9856bd4f89e0fee3d 100644 (file)
@@ -207,7 +207,7 @@ static slap_daemon_st slap_daemon[SLAPD_MAX_DAEMON_THREADS];
         if (!events) { \
             Debug(LDAP_DEBUG_ANY, \
                 "daemon: SLAP_EVENT_INIT: ch_malloc of events failed, wanted %d bytes\n", \
-                sizeof(*events) * SLAP_EVENT_MAX(t), 0, 0); \
+                sizeof(*events) * SLAP_EVENT_MAX(t)); \
                 slapd_shutdown = 2; \
         } \
     } \
@@ -216,7 +216,7 @@ static slap_daemon_st slap_daemon[SLAPD_MAX_DAEMON_THREADS];
 # define SLAP_SOCK_INIT(t) do { \
     int kq_i; \
     size_t kq_nbytes; \
-    Debug(LDAP_DEBUG_ANY, "daemon: SLAP_SOCK_INIT: dtblsize=%d\n", dtblsize, 0, 0); \
+    Debug(LDAP_DEBUG_ANY, "daemon: SLAP_SOCK_INIT: dtblsize=%d\n", dtblsize); \
     slap_daemon[t].sd_nfds       = 0; \
     slap_daemon[t].sd_changeidx  = 0; \
     for (kq_i = 0;  kq_i < 2;  kq_i++) { \
@@ -228,7 +228,7 @@ static slap_daemon_st slap_daemon[SLAPD_MAX_DAEMON_THREADS];
         if (!kqc->sd_changes) { \
             Debug(LDAP_DEBUG_ANY, \
                   "daemon: SLAP_SOCK_INIT: ch_calloc of slap_daemon.sd_changes[%d] failed, wanted %d bytes, shutting down\n", \
-                  kq_i, kq_nbytes, 0); \
+                  kq_i, kq_nbytes); \
                   slapd_shutdown = 2; \
         } \
     } \
@@ -237,7 +237,7 @@ static slap_daemon_st slap_daemon[SLAPD_MAX_DAEMON_THREADS];
     if (!slap_daemon[t].sd_fdmodes) { \
         Debug(LDAP_DEBUG_ANY, \
             "daemon: SLAP_SOCK_INIT: ch_calloc of slap_daemon.sd_fdmodes failed, wanted %d bytes, shutting down\n", \
-            kq_nbytes, 0, 0); \
+            kq_nbytes); \
         slapd_shutdown = 2; \
     } \
     kq_nbytes = sizeof(*slap_daemon[t].sd_l) * dtblsize; \
@@ -245,12 +245,12 @@ static slap_daemon_st slap_daemon[SLAPD_MAX_DAEMON_THREADS];
     if (!slap_daemon[t].sd_l) { \
         Debug(LDAP_DEBUG_ANY, \
             "daemon: SLAP_SOCK_INIT: ch_calloc of slap_daemon.sd_l failed, wanted %d bytes, shutting down\n", \
-            kq_nbytes, 0, 0); \
+            kq_nbytes); \
         slapd_shutdown = 2; \
     } \
     slap_daemon[t].sd_kq = kqueue(); \
     if (slap_daemon[t].sd_kq < 0) { \
-        Debug(LDAP_DEBUG_ANY, "daemon: SLAP_SOCK_INIT: kqueue() failed, errno=%d, shutting down\n", errno, 0, 0); \
+        Debug(LDAP_DEBUG_ANY, "daemon: SLAP_SOCK_INIT: kqueue() failed, errno=%d, shutting down\n", errno); \
         slapd_shutdown = 2; \
     } \
 } while (0)
@@ -321,7 +321,7 @@ static slap_daemon_st slap_daemon[SLAPD_MAX_DAEMON_THREADS];
         if (!kqc->sd_changes) { \
             Debug(LDAP_DEBUG_ANY, \
                 "daemon: SLAP_KQUEUE_CHANGE: ch_realloc of slap_daemon.sd_kqc[%d].sd_changes failed, wanted %d bytes, shutting down\n", \
-                slap_daemon[t].sd_changeidx, kq_nbytes, 0); \
+                slap_daemon[t].sd_changeidx, kq_nbytes); \
             slapd_shutdown = 2; \
             break; /* Don't want to do the EV_SET if sd_changes is NULL */ \
         } \
@@ -476,7 +476,7 @@ static slap_daemon_st slap_daemon[SLAPD_MAX_DAEMON_THREADS];
        } else { \
                Debug( LDAP_DEBUG_ANY, \
                        "daemon: epoll_ctl(ADD,fd=%d) failed, errno=%d, shutting down\n", \
-                       s, errno, 0 ); \
+                       s, errno ); \
                slapd_shutdown = 2; \
        } \
 } while (0)
@@ -639,7 +639,7 @@ static slap_daemon_st slap_daemon[SLAPD_MAX_DAEMON_THREADS];
  * need to shutdown.
  */
 # define SLAP_SOCK_ADD(t, s, l)                do { \
-       Debug( LDAP_DEBUG_CONNS, "SLAP_SOCK_ADD(%d, %p)\n", (s), (l), 0 ); \
+       Debug( LDAP_DEBUG_CONNS, "SLAP_SOCK_ADD(%d, %p)\n", (s), (l) ); \
        SLAP_DEVPOLL_SOCK_IX(t,(s)) = slap_daemon[t].sd_nfds; \
        SLAP_DEVPOLL_SOCK_LX(t,(s)) = (l); \
        SLAP_DEVPOLL_SOCK_FD(t,(s)) = (s); \
@@ -652,7 +652,7 @@ static slap_daemon_st slap_daemon[SLAPD_MAX_DAEMON_THREADS];
 
 # define SLAP_SOCK_DEL(t,s)            do { \
        int fd, index = SLAP_DEVPOLL_SOCK_IX(t,(s)); \
-       Debug( LDAP_DEBUG_CONNS, "SLAP_SOCK_DEL(%d)\n", (s), 0, 0 ); \
+       Debug( LDAP_DEBUG_CONNS, "SLAP_SOCK_DEL(%d)\n", (s) ); \
        if ( index < 0 ) break; \
        if ( index < slap_daemon[t].sd_nfds - 1 ) { \
                struct pollfd pfd = slap_daemon[t].sd_pollfd[index]; \
@@ -701,7 +701,7 @@ static slap_daemon_st slap_daemon[SLAPD_MAX_DAEMON_THREADS];
        if ( slap_daemon[t].sd_dpfd == -1 ) { \
                Debug( LDAP_DEBUG_ANY, "daemon: " SLAP_EVENT_FNAME ": " \
                        "open(\"" SLAP_EVENT_FNAME "\") failed errno=%d\n", \
-                       errno, 0, 0 ); \
+                       errno ); \
                SLAP_SOCK_DESTROY(t); \
                return -1; \
        } \
@@ -3239,7 +3239,7 @@ slap_sig_shutdown( int sig )
        int i;
 
 #if 0
-       Debug(LDAP_DEBUG_TRACE, "slap_sig_shutdown: signal %d\n", sig, 0, 0);
+       Debug(LDAP_DEBUG_TRACE, "slap_sig_shutdown: signal %d\n", sig);
 #endif
 
        /*
index 813a9b721f64f5c23ed7ad28c61c3aa8205dabce..cf2a9b8bf5b67ca84dbc7642f1339b79816f45d4 100644 (file)
@@ -328,8 +328,8 @@ limits_parse(
        if ( argc < 3 ) {
                Debug( LDAP_DEBUG_ANY,
                        "%s : line %d: missing arg(s) in "
-                       "\"limits <pattern> <limits>\" line.\n%s",
-                       fname, lineno, "" );
+                       "\"limits <pattern> <limits>\" line.\n",
+                       fname, lineno, 0 );
                return( -1 );
        }
 
index 44f11d7e9e375b19f908af5c41cf21bfc5f27b7f..2a4c84d779d0d757d20387a6ca956647531fe79e 100644 (file)
@@ -116,17 +116,14 @@ do_modify(
                                        "replace")), tmp->sml_type.bv_val, 0 );
 
                if ( tmp->sml_values == NULL ) {
-                       Debug( LDAP_DEBUG_ARGS, "%s\n",
-                          "\t\tno values", NULL, NULL );
+                       Debug( LDAP_DEBUG_ARGS, "\t\tno values\n" );
                } else if ( BER_BVISNULL( &tmp->sml_values[ 0 ] ) ) {
-                       Debug( LDAP_DEBUG_ARGS, "%s\n",
-                          "\t\tzero values", NULL, NULL );
+                       Debug( LDAP_DEBUG_ARGS, "\t\tzero values\n" );
                } else if ( BER_BVISNULL( &tmp->sml_values[ 1 ] ) ) {
-                       Debug( LDAP_DEBUG_ARGS, "%s, length %ld\n",
-                          "\t\tone value", (long) tmp->sml_values[0].bv_len, NULL );
+                       Debug( LDAP_DEBUG_ARGS, "\t\tone value, length %ld\n",
+                          (long) tmp->sml_values[0].bv_len );
                } else {
-                       Debug( LDAP_DEBUG_ARGS, "%s\n",
-                          "\t\tmultiple values", NULL, NULL );
+                       Debug( LDAP_DEBUG_ARGS, "\t\tmultiple values\n" );
                }
        }