bug?: building RPM of 2.5.1p1 uses wrong pam.d/ssh file for RH6 vs RH7

Steve Tell tell at telltronics.org
Wed Feb 21 18:06:25 EST 2001


(I'm using RedHat 6.2 and openssl-0.9.5a-3)

After rebuilding binary RPMs using openssh-2.5.1p1-1.src.rpm, I was unable
to ssh in to a system upgraded to the new openssh-server-2.5.1p1.rpm 
After the failure, /var/log/messages on the destination indicated lots of
PAM errors of the form "sshd[22814]: PAM 
[dlerror: /lib/security/pam_stack.so: can not open shared object file: No
such file or directory]"


I traced the problem to the fact that /etc/pam.d/ssh was copied from the
RedHat 7 version, contrib/redhat/sshd.pam-7.x, instead of the one for
RedHat 6.2 and eariler, sshd.pam-7.x   Replacing the file fixed that
particular system, but the rpm itself contains the wrong file.


It would appear that the conditional in openssh.spec that is supposed to
select the redhat version is reversed:
	If "--define rh7" is specified, the 6.2 file, "sshd.pam" is used,
	else specified, then the file for 7.0, "sshd.pam-7.x" is used

The patch below fixes this by swapping if/else parts of the conditional.  
OTOH, if the conditional is thought to be correct without this patch, then
the name of the define (and the documents comments) could really use to be
made more clear...


Steve
--
Steve Tell  tell at telltronics.org 


*** openssh.spec	Mon Feb 19 05:51:50 2001
--- /usr/src/redhat/SPECS/openssh.spec	Wed Feb 21 01:36:49 2001
***************
*** 190,198 ****
  install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
  install -d $RPM_BUILD_ROOT%{_libexecdir}/openssh
  %if %{redhat7}
- install -m644 contrib/redhat/sshd.pam $RPM_BUILD_ROOT/etc/pam.d/sshd
- %else
  install -m644 contrib/redhat/sshd.pam-7.x $RPM_BUILD_ROOT/etc/pam.d/sshd
  %endif
  install -m755 contrib/redhat/sshd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/sshd
  
--- 190,198 ----
  install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
  install -d $RPM_BUILD_ROOT%{_libexecdir}/openssh
  %if %{redhat7}
  install -m644 contrib/redhat/sshd.pam-7.x $RPM_BUILD_ROOT/etc/pam.d/sshd
+ %else
+ install -m644 contrib/redhat/sshd.pam $RPM_BUILD_ROOT/etc/pam.d/sshd
  %endif
  install -m755 contrib/redhat/sshd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/sshd
  






More information about the openssh-unix-dev mailing list