Procházet zdrojové kódy

add optional LDAP support (means it directly can read SSH public keys from an LDAP server)

Ralf S. Engelschall před 22 roky
rodič
revize
32d9c467fc
1 změnil soubory, kde provedl 17 přidání a 1 odebrání
  1. 17 1
      openssh/openssh.spec

+ 17 - 1
openssh/openssh.spec

@@ -27,6 +27,9 @@
 %define       V_base        3.7.1
 %define       V_portable    p2
 %define       V_watchdog    3.7.1p1
+%define       V_ldap_base   3.7.1p2
+%define       V_ldap_vers1  v2.01
+%define       V_ldap_vers2  v201
 
 #   package information
 Name:         openssh
@@ -38,7 +41,7 @@ Distribution: OpenPKG [CORE]
 Group:        Security
 License:      BSD
 Version:      %{V_base}%{V_portable}
-Release:      20031009
+Release:      20031030
 
 #   package options
 %option       with_fsl      yes
@@ -48,6 +51,7 @@ Release:      20031009
 %option       with_x11      no
 %option       with_chroot   no
 %option       with_watchdog no
+%option       with_ldap     no
 
 #   list of sources
 Source0:      ftp://ftp.openssh.com/pub/OpenBSD/OpenSSH/portable/openssh-%{version}.tar.gz
@@ -61,6 +65,7 @@ Source7:      ssh-keyman.1
 Source8:      ssh-keyman.pod
 Patch0:       openssh.patch
 Patch1:       http://www.sc.isc.tohoku.ac.jp/~hgot/sources/openssh-%{V_watchdog}-watchdog.patch.tgz
+Patch2:       http://ldappubkey.gcu-squad.org/%{V_ldap_vers1}/ldappubkey-ossh%{V_ldap_base}-%{V_ldap_vers2}.patch
 
 #   build information
 Prefix:       %{l_prefix}
@@ -89,6 +94,10 @@ PreReq:       skey
 BuildPreReq:  X11
 PreReq:       X11
 %endif
+%if "%{with_ldap}" == "yes"
+BuildPreReq:  openldap
+PreReq:       openldap
+%endif
 AutoReq:      no
 AutoReqProv:  no
 
@@ -114,6 +123,9 @@ AutoReqProv:  no
     %{l_gzip} -d -c %{SOURCE openssh-%{V_watchdog}-watchdog.patch.tgz} | %{l_tar} xf -
     %{l_patch} -p0 <openssh-%{V_watchdog}-watchdog.patch
 %endif
+%if "%{with_ldap}" == "yes"
+    %{l_gzip} -d -c %{SOURCE ldappubkey-ossh%{V_ldap_base}-%{V_ldap_vers2}.patch} | %{l_patch} -p0
+%endif
 
 %build
     #   configure package
@@ -125,6 +137,10 @@ AutoReqProv:  no
 %if "%{with_pam}" == "yes"
     cflags="$cflags -I`%{l_prefix}/etc/rc --query pam_incdir`"
     ldflags="$ldflags -L`%{l_prefix}/etc/rc --query pam_libdir`"
+%endif
+%if "%{with_ldap}" == "yes"
+    cflags="$cflags -DWITH_LDAP_PUBKEY"
+    ldflags="$ldflags -lldap -llber -lcrypto -lssl"
 %endif
     CC="%{l_cc}" \
     CFLAGS="%{l_cflags -O} %{l_cppflags} $cflags" \