Source-Changes-HG archive

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

[src/trunk]: src/external/ibm-public/postfix Adjust for new OpenLDAP



details:   https://anonhg.NetBSD.org/src/rev/0dd4b7fc18bf
branches:  trunk
changeset: 985226:0dd4b7fc18bf
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Aug 14 16:17:57 2021 +0000

description:
Adjust for new OpenLDAP
- use centralized library variables
- ldap_connect -> ldap_xconnect

diffstat:

 crypto/external/bsd/openssh/bin/sshd/Makefile |   6 +++---
 crypto/external/bsd/openssh/dist/ldapauth.c   |  12 ++++++------
 crypto/external/bsd/openssh/dist/ldapauth.h   |   4 ++--
 crypto/external/bsd/openssh/dist/sshd.c       |   6 +++---
 external/bsd/am-utils/bin/amd/Makefile        |  12 +++---------
 external/ibm-public/postfix/Makefile.inc      |  10 +++-------
 6 files changed, 20 insertions(+), 30 deletions(-)

diffs (169 lines):

diff -r 9c0bbaa71631 -r 0dd4b7fc18bf crypto/external/bsd/openssh/bin/sshd/Makefile
--- a/crypto/external/bsd/openssh/bin/sshd/Makefile     Sat Aug 14 16:16:32 2021 +0000
+++ b/crypto/external/bsd/openssh/bin/sshd/Makefile     Sat Aug 14 16:17:57 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.23 2021/03/05 17:47:15 christos Exp $
+#      $NetBSD: Makefile,v 1.24 2021/08/14 16:17:57 christos Exp $
 
 .include <bsd.own.mk>
 
@@ -54,8 +54,8 @@
 
 .if (${USE_LDAP} != "no")
 SRCS+= ldapauth.c
-LDADD+=        -lldap -lssl -llber
-DPADD+=        ${LIBLDAP} ${LIBSSL} ${LIBLBER}
+LDADD+=        ${LIBLDAP_LDADD}
+DPADD+=        ${LIBLDAP_DPADD}
 .endif
 
 LDADD+=        -lcrypt -lutil
diff -r 9c0bbaa71631 -r 0dd4b7fc18bf crypto/external/bsd/openssh/dist/ldapauth.c
--- a/crypto/external/bsd/openssh/dist/ldapauth.c       Sat Aug 14 16:16:32 2021 +0000
+++ b/crypto/external/bsd/openssh/dist/ldapauth.c       Sat Aug 14 16:17:57 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ldapauth.c,v 1.7 2017/04/18 18:41:46 christos Exp $    */
+/*     $NetBSD: ldapauth.c,v 1.8 2021/08/14 16:17:57 christos Exp $    */
 
 /*
  *
@@ -21,7 +21,7 @@
  *
  */
 #include "includes.h"
-__RCSID("$NetBSD: ldapauth.c,v 1.7 2017/04/18 18:41:46 christos Exp $");
+__RCSID("$NetBSD: ldapauth.c,v 1.8 2021/08/14 16:17:57 christos Exp $");
 
 #ifdef WITH_LDAP_PUBKEY
 #include <stdarg.h>
@@ -124,7 +124,7 @@
 }
 
 /* init && bind */
-int ldap_connect(ldap_opt_t * ldap) {
+int ldap_xconnect(ldap_opt_t * ldap) {
     int version = LDAP_VERSION3;
 
     if (!ldap->servers)
@@ -154,7 +154,7 @@
     if ( (ldap->tls == -1) || (ldap->tls == 1) ) {
         if (ldap_start_tls_s(ldap->ld, NULL, NULL ) != LDAP_SUCCESS) {
             /* failed then reinit the initial connect */
-            ldap_perror(ldap->ld, "ldap_connect: (TLS) ldap_start_tls()");
+            ldap_perror(ldap->ld, "ldap_xconnect: (TLS) ldap_start_tls()");
             if (ldap->tls == 1)
                 return FAILURE;
 
@@ -378,7 +378,7 @@
     /* XXX TODO: setup some conf value for retrying */
     if (!(l->flags & FLAG_CONNECTED))
         for (i = 0 ; i < 2 ; i++)
-            if (ldap_connect(l) == 0)
+            if (ldap_xconnect(l) == 0)
                 break;
 
     /* quick check for attempts to be evil */
@@ -445,7 +445,7 @@
     /* XXX TODO: setup some conf value for retrying */
     if (!(l->flags & FLAG_CONNECTED)) 
         for (i = 0 ; i < 2 ; i++)
-            if (ldap_connect(l) == 0)
+            if (ldap_xconnect(l) == 0)
                  break;
 
     /* quick check for attempts to be evil */
diff -r 9c0bbaa71631 -r 0dd4b7fc18bf crypto/external/bsd/openssh/dist/ldapauth.h
--- a/crypto/external/bsd/openssh/dist/ldapauth.h       Sat Aug 14 16:16:32 2021 +0000
+++ b/crypto/external/bsd/openssh/dist/ldapauth.h       Sat Aug 14 16:17:57 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ldapauth.h,v 1.5 2017/04/18 18:41:46 christos Exp $    */
+/*     $NetBSD: ldapauth.h,v 1.6 2021/08/14 16:17:57 christos Exp $    */
 
 /*
  *
@@ -112,7 +112,7 @@
 
 /* function headers */
 void ldap_close(ldap_opt_t *);
-int ldap_connect(ldap_opt_t *);
+int ldap_xconnect(ldap_opt_t *);
 char * ldap_parse_groups(const char *);
 char * ldap_parse_servers(const char *);
 void ldap_options_print(ldap_opt_t *);
diff -r 9c0bbaa71631 -r 0dd4b7fc18bf crypto/external/bsd/openssh/dist/sshd.c
--- a/crypto/external/bsd/openssh/dist/sshd.c   Sat Aug 14 16:16:32 2021 +0000
+++ b/crypto/external/bsd/openssh/dist/sshd.c   Sat Aug 14 16:17:57 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sshd.c,v 1.42 2021/04/19 14:40:15 christos Exp $       */
+/*     $NetBSD: sshd.c,v 1.43 2021/08/14 16:17:57 christos Exp $       */
 /* $OpenBSD: sshd.c,v 1.572 2021/04/03 06:18:41 djm Exp $ */
 
 /*
@@ -45,7 +45,7 @@
  */
 
 #include "includes.h"
-__RCSID("$NetBSD: sshd.c,v 1.42 2021/04/19 14:40:15 christos Exp $");
+__RCSID("$NetBSD: sshd.c,v 1.43 2021/08/14 16:17:57 christos Exp $");
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/ioctl.h>
@@ -1713,7 +1713,7 @@
        if (options.lpk.on) {
            if (options.lpk.l_conf && (ldap_parse_lconf(&options.lpk) < 0) )
                error("[LDAP] could not parse %s", options.lpk.l_conf);
-           if (ldap_connect(&options.lpk) < 0)
+           if (ldap_xconnect(&options.lpk) < 0)
                error("[LDAP] could not initialize ldap connection");
        }
 #endif
diff -r 9c0bbaa71631 -r 0dd4b7fc18bf external/bsd/am-utils/bin/amd/Makefile
--- a/external/bsd/am-utils/bin/amd/Makefile    Sat Aug 14 16:16:32 2021 +0000
+++ b/external/bsd/am-utils/bin/amd/Makefile    Sat Aug 14 16:17:57 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.13 2019/10/13 07:28:05 mrg Exp $
+#      $NetBSD: Makefile,v 1.14 2021/08/14 16:17:57 christos Exp $
 
 .include "${.CURDIR}/../Makefile.inc"
 
@@ -28,14 +28,8 @@
 .if (${USE_LDAP} != "no")
 SRCS+= info_ldap.c
 
-LDADD+=        -lldap
-DPADD+=        ${LIBLDAP}
-.if (${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != ""))
-LDADD+=        -llber
-DPADD+=        ${LIBLBER}
-DPADD+=        ${LIBSSL} ${LIBCRYPTO}
-LDADD+=        -lssl -lcrypto
-.endif
+LDADD+=        ${LIBLDAP_LDADD}
+DPADD+=        ${LIBLDAP_DPADD}
 .endif
 
 .if (${USE_YP} != "no")
diff -r 9c0bbaa71631 -r 0dd4b7fc18bf external/ibm-public/postfix/Makefile.inc
--- a/external/ibm-public/postfix/Makefile.inc  Sat Aug 14 16:16:32 2021 +0000
+++ b/external/ibm-public/postfix/Makefile.inc  Sat Aug 14 16:17:57 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.27 2021/04/12 03:57:06 mrg Exp $
+#      $NetBSD: Makefile.inc,v 1.28 2021/08/14 16:17:57 christos Exp $
 
 .include <bsd.own.mk>
 
@@ -58,12 +58,8 @@
 
 # Automatically link in libldap for a program.
 . if defined(PROG)
-LDADD+=                -lldap -llber
-DPADD+=                ${LIBLDAP} ${LIBLBER}
-.  if (${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != ""))
-DPADD+=                ${LIBSSL} ${LIBCRYPTO}
-LDADD+=                -lssl -lcrypto
-.  endif
+LDADD+=                ${LIBLDAP_LDADD}
+DPADD+=                ${LIBLDAP_DPADD}
 . endif
 .endif # USE_LDAP != no
 



Home | Main Index | Thread Index | Old Index