Subject: pkg/11150: patch-aa for inhibit login_cap spport of openssh2.2.0p1 pkg
To: None <gnats-bugs@gnats.netbsd.org>
From: None <kamahara@cc.kshosen.ac.jp>
List: netbsd-bugs
Date: 10/06/2000 00:10:25
>Number:         11150
>Category:       pkg
>Synopsis:       patch-aa for inhibit login_cap spport of openssh2.2.0p1 pkg
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 06 00:10:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     KAMAHARA Junzo
>Release:        NetBSD/i386 1.5ALPHA2
>Organization:
Kobe Univ. of Mercantile Marine
>Environment:
NetBSD halley 1.5_ALPHA2 NetBSD 1.5_ALPHA2 (CHIHARU) #0: Sun Oct  1 22:34:11 JST
 2000     kamahara@ipcbsd01:/usr/src/sys/arch/i386/compile/CHIHARU i386

>Description:
For OpenSSH 2.2.0p1 there are patch-aa ( http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/security/openssh/patches/patch-aa?rev=1.11&content-type=text/x-cvsweb-markup )
which inhibits the login_cap support, but the cause of wrong is
the mistake of the configure.in (see Fix).
NetBSD currently supports login_cap, so I thinks openssh pkg should
enable login_cap. Then I makes below patch which notices creating
the small login.conf contains only default entry.
This patch is applied to original openssh2.2.0p1 distribution.

>How-To-Repeat:

>Fix:
diff -u --new-file openssh-2.2.0p1.org/Makefile.in openssh-2.2.0p1/Makefile.in
--- openssh-2.2.0p1.org/Makefile.in     Wed Aug 23 09:46:23 2000
+++ openssh-2.2.0p1/Makefile.in Fri Oct  6 13:07:47 2000
@@ -115,7 +115,7 @@
 distprep: catman-do
        autoreconf

-install: manpages $(TARGETS) install-files host-key
+install: manpages $(TARGETS) install-files host-key login-conf

 install-files:
        ./mkinstalldirs $(DESTDIR)$(bindir)
@@ -166,6 +166,12 @@
 host-key-force: ssh-keygen
        ./ssh-keygen -b 1024 -f $(DESTDIR)$(sysconfdir)/ssh_host_key -N ""
        ./ssh-keygen -d -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key -N ""
+
+login-conf:
+        if [ ! -f /etc/login.conf ] ; then \
+                echo "=========================================" ; \
+                echo "ATTENTION!" ; \
+                echo "/etc/login.conf was not found." ; \
+                echo "You should create /etc/login.conf contains" ; \
+                echo "only below line." ; \
+                echo "" ; \
+                echo "default:" ; \
+                echo "=========================================" ; \
+        fi ;

 uninstallall:  uninstall
        -rm -f $(DESTDIR)$(sysconfdir)/ssh_config
diff -u --new-file openssh-2.2.0p1.org/configure openssh-2.2.0p1/configure
--- openssh-2.2.0p1.org/configure       Sat Sep  2 08:08:44 2000
+++ openssh-2.2.0p1/configure   Fri Oct  6 13:10:34 2000
@@ -4569,7 +4569,7 @@
 #include <pwd.h>

 int main() {
- struct passwd p s; p.pw_class = NULL;
+ struct passwd p; p.pw_class = 0;
 ; return 0; }
 EOF
 if { (eval echo configure:4576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5;
 }; then
diff -u --new-file openssh-2.2.0p1.org/configure.in openssh-2.2.0p1/configure.in
--- openssh-2.2.0p1.org/configure.in    Thu Aug 31 07:20:05 2000
+++ openssh-2.2.0p1/configure.in        Fri Oct  6 13:10:29 2000
@@ -762,7 +762,7 @@
 #include <sys/types.h>
 #include <pwd.h>
                ],
-               [ struct passwd p s; p.pw_class = NULL; ],
+               [ struct passwd p; p.pw_class = 0; ],
                [ ac_cv_have_pw_class_in_struct_passwd="yes" ],
                [ ac_cv_have_pw_class_in_struct_passwd="no" ]
        )

>Release-Note:
>Audit-Trail:
>Unformatted: