Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/openldap/dist Resolve conflicts from last import.



details:   https://anonhg.NetBSD.org/src/rev/c6274d6be9c3
branches:  trunk
changeset: 796290:c6274d6be9c3
user:      tron <tron%NetBSD.org@localhost>
date:      Wed May 28 10:12:43 2014 +0000

description:
Resolve conflicts from last import.

diffstat:

 external/bsd/openldap/dist/build/mkversion                  |    8 +-
 external/bsd/openldap/dist/clients/tools/common.c           |  231 ++-
 external/bsd/openldap/dist/contrib/ldapc++/LICENSE          |   47 -
 external/bsd/openldap/dist/contrib/slapd-modules/acl/README |    5 -
 external/bsd/openldap/dist/doc/guide/COPYRIGHT              |   64 -
 external/bsd/openldap/dist/doc/guide/LICENSE                |   47 -
 external/bsd/openldap/dist/include/Makefile.in              |    7 +-
 external/bsd/openldap/dist/include/ldap_queue.h             |    8 +-
 external/bsd/openldap/dist/include/portable.hin             |   20 +-
 external/bsd/openldap/dist/libraries/libldap/os-ip.c        |   80 +-
 external/bsd/openldap/dist/libraries/libldap/os-local.c     |   21 +-
 external/bsd/openldap/dist/libraries/libldap/tls_o.c        |   53 +-
 external/bsd/openldap/dist/libraries/libldap_r/thr_lwp.c    |  380 -----
 external/bsd/openldap/dist/libraries/liblutil/detach.c      |   18 +-
 external/bsd/openldap/dist/libraries/liblutil/fetch.c       |  136 -
 external/bsd/openldap/dist/libraries/liblutil/ldif.c        |  908 ------------
 external/bsd/openldap/dist/libraries/liblutil/md5.c         |    6 +-
 external/bsd/openldap/dist/libraries/liblutil/passwd.c      |   16 +-
 18 files changed, 302 insertions(+), 1753 deletions(-)

diffs (truncated from 2842 to 300 lines):

diff -r e5863d501e17 -r c6274d6be9c3 external/bsd/openldap/dist/build/mkversion
--- a/external/bsd/openldap/dist/build/mkversion        Wed May 28 09:58:17 2014 +0000
+++ b/external/bsd/openldap/dist/build/mkversion        Wed May 28 10:12:43 2014 +0000
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Create a version.c file
-# OpenLDAP: pkg/ldap/build/mkversion,v 1.14.2.5 2010/04/13 20:22:21 kurt Exp
+# $OpenLDAP$
 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
 ##
-## Copyright 1998-2010 The OpenLDAP Foundation.
+## Copyright 1998-2014 The OpenLDAP Foundation.
 ## All rights reserved.
 ##
 ## Redistribution and use in source and binary forms, with or without
@@ -54,7 +54,7 @@
 cat << __EOF__
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2010 The OpenLDAP Foundation.
+ * Copyright 1998-2014 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -67,7 +67,7 @@
  */
 
 static const char copyright[] =
-"Copyright 1998-2010 The OpenLDAP Foundation.  All rights reserved.\n"
+"Copyright 1998-2014 The OpenLDAP Foundation.  All rights reserved.\n"
 "COPYING RESTRICTIONS APPLY\n";
 
 $static $const char $SYMBOL[] =
diff -r e5863d501e17 -r c6274d6be9c3 external/bsd/openldap/dist/clients/tools/common.c
--- a/external/bsd/openldap/dist/clients/tools/common.c Wed May 28 09:58:17 2014 +0000
+++ b/external/bsd/openldap/dist/clients/tools/common.c Wed May 28 10:12:43 2014 +0000
@@ -1,10 +1,10 @@
-/*     $NetBSD: common.c,v 1.3 2010/12/12 15:46:28 adam Exp $  */
+/*     $NetBSD: common.c,v 1.4 2014/05/28 10:12:43 tron Exp $  */
 
 /* common.c - common routines for the ldap client tools */
-/* OpenLDAP: pkg/ldap/clients/tools/common.c,v 1.78.2.31 2010/04/15 22:16:49 quanah Exp */
+/* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2010 The OpenLDAP Foundation.
+ * Copyright 1998-2014 The OpenLDAP Foundation.
  * Portions Copyright 2003 Kurt D. Zeilenga.
  * Portions Copyright 2003 IBM Corporation.
  * All rights reserved.
@@ -68,6 +68,7 @@
 int            referrals = 0;
 int            verbose = 0;
 int            ldif = 0;
+ber_len_t      ldif_wrap = LDIF_LINE_WIDTH;
 char           *prog = NULL;
 
 /* connection */
@@ -240,6 +241,10 @@
 void
 tool_destroy( void )
 {
+       static int destroyed;
+       if ( destroyed++ )
+               return;
+
 #ifdef HAVE_CYRUS_SASL
        sasl_done();
 #endif
@@ -254,20 +259,47 @@
 
        if ( pr_cookie.bv_val != NULL ) {
                ber_memfree( pr_cookie.bv_val );
-               pr_cookie.bv_val = NULL;
-               pr_cookie.bv_len = 0;
+               BER_BVZERO( &pr_cookie );
        }
 
        if ( binddn != NULL ) {
                ber_memfree( binddn );
+               binddn = NULL;
        }
 
        if ( passwd.bv_val != NULL ) {
                ber_memfree( passwd.bv_val );
+               BER_BVZERO( &passwd );
        }
 
        if ( infile != NULL ) {
                ber_memfree( infile );
+               infile = NULL;
+       }
+
+       if ( assertion ) {
+               ber_memfree( assertion );
+               assertion = NULL;
+       }
+
+       if ( authzid ) {
+               ber_memfree( authzid );
+               authzid = NULL;
+       }
+
+       if ( proxydn ) {
+               ber_memfree( proxydn );
+               proxydn = NULL;
+       }
+
+       if ( preread_attrs ) {
+               ber_memfree( preread_attrs );
+               preread_attrs = NULL;
+       }
+
+       if ( postread_attrs ) {
+               ber_memfree( postread_attrs );
+               postread_attrs = NULL;
        }
 }
 
@@ -311,8 +343,9 @@
 N_("  -n         show what would be done but don't actually do it\n"),
 N_("  -N         do not use reverse DNS to canonicalize SASL host name\n"),
 N_("  -O props   SASL security properties\n"),
-N_("  -o <opt>[=<optparam] general options\n"),
+N_("  -o <opt>[=<optparam>] general options\n"),
 N_("             nettimeout=<timeout> (in seconds, or \"none\" or \"max\")\n"),
+N_("             ldif-wrap=<width> (in columns, or \"no\" for no wrapping)\n"),
 N_("  -p port    port on LDAP server\n"),
 N_("  -Q         use SASL Quiet mode\n"),
 N_("  -R realm   SASL realm\n"),
@@ -336,6 +369,8 @@
                        fputs( _(*cpp), stderr );
                }
        }
+
+       tool_destroy();
 }
 
 void tool_perror(
@@ -379,7 +414,7 @@
                case 'c':       /* continuous operation mode */
                        contoper++;
                        break;
-               case 'C':
+               case 'C':       /* referrals: obsolete */
                        referrals++;
                        break;
                case 'd':
@@ -427,7 +462,7 @@
                                assertctl = 1 + crit;
 
                                assert( assertion == NULL );
-                               assertion = cvalue;
+                               assertion = ber_strdup( cvalue );
 
                        } else if ( strcasecmp( control, "authzid" ) == 0 ) {
                                if( authzid != NULL ) {
@@ -450,7 +485,7 @@
                                }
 
                                assert( authzid == NULL );
-                               authzid = cvalue;
+                               authzid = ber_strdup( cvalue );
 
 #ifdef LDAP_CONTROL_OBSOLETE_PROXY_AUTHZ
                        } else if ( strcasecmp( control, "proxydn" ) == 0 ) {
@@ -472,7 +507,7 @@
                                }
 
                                assert( proxydn == NULL );
-                               proxydn = cvalue;
+                               proxydn = ber_strdup( cvalue );
 #endif /* LDAP_CONTROL_OBSOLETE_PROXY_AUTHZ */
 
                        } else if ( ( strcasecmp( control, "relax" ) == 0 ) ||
@@ -542,7 +577,7 @@
                                }
 
                                preread = 1 + crit;
-                               preread_attrs = cvalue;
+                               preread_attrs = ber_strdup( cvalue );
 
                        } else if ( strcasecmp( control, "postread" ) == 0 ) {
                                if( postread ) {
@@ -551,7 +586,7 @@
                                }
 
                                postread = 1 + crit;
-                               postread_attrs = cvalue;
+                               postread_attrs = ber_strdup( cvalue );
 
 #ifdef LDAP_CONTROL_X_CHAINING_BEHAVIOR
                        } else if ( strcasecmp( control, "chaining" ) == 0 ) {
@@ -599,6 +634,19 @@
                                }
 #endif /* LDAP_CONTROL_X_CHAINING_BEHAVIOR */
 
+#ifdef LDAP_CONTROL_X_SESSION_TRACKING
+                       } else if ( strcasecmp( control, "sessiontracking" ) == 0 ) {
+                               if ( sessionTracking ) {
+                                       fprintf( stderr, "%s: session tracking can be only specified once\n", prog );
+                                       exit( EXIT_FAILURE );
+                               }
+                               sessionTracking = 1;
+                               if( crit ) {
+                                       fprintf( stderr, "sessiontracking: critical flag not allowed\n" );
+                                       usage();
+                               }
+#endif /* LDAP_CONTROL_X_SESSION_TRACKING */
+
                        /* this shouldn't go here, really; but it's a feature... */
                        } else if ( strcasecmp( control, "abandon" ) == 0 ) {
                                abcan = Intr_Abandon;
@@ -618,15 +666,6 @@
                                        gotintr = abcan;
                                }
 
-#ifdef LDAP_CONTROL_X_SESSION_TRACKING
-                       } else if ( strcasecmp( control, "sessiontracking" ) == 0 ) {
-                               if ( sessionTracking ) {
-                                       fprintf( stderr, "%s: session tracking can be only specified once\n", prog );
-                                       exit( EXIT_FAILURE );
-                               }
-                               sessionTracking = 1;
-#endif /* LDAP_CONTROL_X_SESSION_TRACKING */
-
                        } else if ( tool_is_oid( control ) ) {
                                LDAPControl     *tmpctrls, ctrl;
 
@@ -638,6 +677,8 @@
                                }
                                unknown_ctrls = tmpctrls;
                                ctrl.ldctl_oid = control;
+                               /* don't free it */
+                               control = NULL;
                                ctrl.ldctl_value.bv_val = NULL;
                                ctrl.ldctl_value.bv_len = 0;
                                ctrl.ldctl_iscritical = crit;
@@ -672,6 +713,10 @@
                                        control );
                                usage();
                        }
+                       if ( control ) {
+                               ber_memfree( control );  
+                               control = NULL;
+                       }
                        break;
                case 'f':       /* read from file */
                        if( infile != NULL ) {
@@ -753,11 +798,30 @@
                                                prog, (long)nettimeout.tv_sec );
                                        exit( EXIT_FAILURE );
                                }
+
+                       } else if ( strcasecmp( control, "ldif-wrap" ) == 0 ) {
+                               if ( cvalue == 0 ) {
+                                       ldif_wrap = LDIF_LINE_WIDTH;
+
+                               } else if ( strcasecmp( cvalue, "no" ) == 0 ) {
+                                       ldif_wrap = LDIF_LINE_WIDTH_MAX;
+
+                               } else {
+                                       unsigned int u;
+                                       if ( lutil_atou( &u, cvalue ) ) {
+                                               fprintf( stderr,
+                                                       _("Unable to parse ldif-wrap=\"%s\"\n"), cvalue );
+                                               exit( EXIT_FAILURE );
+                                       }
+                                       ldif_wrap = (ber_len_t)u;
+                               }
+
                        } else {
                                fprintf( stderr, "Invalid general option name: %s\n",
                                        control );
                                usage();
                        }
+                       ber_memfree(control);
                        break;
                case 'O':
 #ifdef HAVE_CYRUS_SASL
@@ -1069,6 +1133,12 @@
                }
 #endif
        }
+
+       if ( ( pw_file || want_bindpw ) && !BER_BVISNULL( &passwd ) ) {
+               fprintf( stderr, "%s: -%c incompatible with -w\n",
+                       prog, ( pw_file ? 'y' : 'W' ) );
+               exit( EXIT_FAILURE );
+       }
 }
 
 
@@ -1261,23 +1331,24 @@
 
                if( private_setup ) private_setup( ld );
 
-               /* referrals */
+               /* referrals: obsolete */
                if( ldap_set_option( ld, LDAP_OPT_REFERRALS,



Home | Main Index | Thread Index | Old Index