Commit e123ed6b authored by Pavel Vainerman's avatar Pavel Vainerman

added path validation for ssh config (eterbug #12807)

parent 07ec7086
...@@ -30,12 +30,6 @@ Openssh portable (etersoft edition) ...@@ -30,12 +30,6 @@ Openssh portable (etersoft edition)
%prep %prep
%setup %setup
confdir=""
[ -r "/etc/openssh/ssh_config" ] && confdir="/openssh"
[ -r "/etc/ssh/ssh_config" ] && confdir="/ssh"
[ -r "/etc/ssh_config" ] && confdir="/"
%__subst "s|-DSSHDIR=\\\\\"\$(sysconfdir)\\\\\"|-DSSHDIR=\\\\\"\$(sysconfdir)${confdir}\\\\\"|g" Makefile.in
# fix build with openssl 1.1 # fix build with openssl 1.1
if [ -s %_libdir/libssl.so.1.1 ] ; then if [ -s %_libdir/libssl.so.1.1 ] ; then
...@@ -43,16 +37,24 @@ if [ -s %_libdir/libssl.so.1.1 ] ; then ...@@ -43,16 +37,24 @@ if [ -s %_libdir/libssl.so.1.1 ] ; then
fi fi
%build %build
[ -r "/etc/openssh/ssh_config" ] && confdir="/openssh"
[ -r "/etc/ssh/ssh_config" ] && confdir="/ssh"
[ -r "/etc/ssh_config" ] && confdir="/"
%__subst "s|-DSSHDIR=\\\\\"\$(sysconfdir)\\\\\"|-DSSHDIR=\\\\\"\$(sysconfdir)${confdir}\\\\\"|g" Makefile.in
with_kerberos= with_kerberos=
%if_enabled kerberos5 %if_enabled kerberos5
with_kerberos="--with-kerberos5" with_kerberos="--with-kerberos5"
%endif %endif
%autoreconf %autoreconf
%configure --without-zlib-version-check ${with_kerberos} %configure --without-zlib-version-check ${with_kerberos}
%make_build || %make %make_build || %make
# check ssh config path
grep "/etc${confdir}/ssh_config" nxssh
%install %install
mkdir -p %buildroot%_bindir mkdir -p %buildroot%_bindir
install -m755 nxssh nxsshd nxssh-keygen %buildroot%_bindir/ install -m755 nxssh nxsshd nxssh-keygen %buildroot%_bindir/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment