scp : Problems with pathing
Tim Rice
tim at multitalents.net
Sat Apr 13 14:41:29 EST 2002
On Mon, 1 Apr 2002, Tuc wrote:
> > On Sun, Mar 31, 2002 at 12:01:46PM -0500, Tuc wrote:
> > > >
> > > > On Sat, Mar 30, 2002 at 10:33:05AM -0800, Tim Rice wrote:
> > > > > So the path you want, "_PATH_STDPATH" will not be used.
> > > > > I'm not sure what to do about it. I have no BSD here.
> > > >
> > > > BSD/OS uses the path from /etc/login.conf
Please try the attached patch.
If you do not have autoconf 2.52 or later, e-mail me and I'll send
you configure.
--
Tim Rice Multitalents (707) 887-1469
tim at multitalents.net
-------------- next part --------------
--- configure.ac.old Fri Apr 12 10:26:23 2002
+++ configure.ac Fri Apr 12 20:57:56 2002
@@ -1981,17 +1981,28 @@
)
fi
+dnl BSD systems use /etc/login.conf so --with-default-path= has no effect
+if test $ac_cv_func_login_getcapbool = "yes" -a \
+ $ac_cv_header_login_cap_h = "yes" ; then
+ USES_LOGIN_CONF=yes
+fi
# Whether to mess with the default path
SERVER_PATH_MSG="(default)"
AC_ARG_WITH(default-path,
[ --with-default-path=PATH Specify default \$PATH environment for server],
[
- if test "x$withval" != "xno" ; then
+ if test "$USES_LOGIN_CONF" = "yes" ; then
+ AC_MSG_WARN([
+--with-default-path=PATH has no effect on this system.
+Edit /etc/login.conf instead.])
+ elif test "x$withval" != "xno" ; then
user_path="$withval"
SERVER_PATH_MSG="$withval"
fi
],
- [
+ [ if test "$USES_LOGIN_CONF" = "yes" ; then
+ AC_MSG_WARN([Make sure the path to scp is in /etc/login.conf])
+ else
AC_TRY_RUN(
[
/* find out what STDPATH is */
@@ -2041,10 +2052,12 @@
AC_MSG_RESULT(Adding $t_bindir to USER_PATH so scp will work)
fi
fi
- ]
+ fi ]
)
-AC_DEFINE_UNQUOTED(USER_PATH, "$user_path")
-AC_SUBST(user_path)
+if test "$USES_LOGIN_CONF" != "yes" ; then
+ AC_DEFINE_UNQUOTED(USER_PATH, "$user_path")
+ AC_SUBST(user_path)
+fi
# Whether to force IPv4 by default (needed on broken glibc Linux)
IPV4_HACK_MSG="no"
More information about the openssh-unix-dev
mailing list