xauth location in openssh-1.2pre17

David Agraz dagraz at jahoopa.com
Fri Dec 10 06:52:42 EST 1999


The current configuration only works if xauth can be
found at /usr/X11R6/bin/xauth, which creates some problems
when running sshd on an openwin system.

Contained below are patches to find the path of xauth in configure,
and set the path in config.h.  (also contained is a patch for
configure for those without autoconf)

Also-- added #include "bsd-daemon" to includes.h, which quiets a
compiler warning in sshd.c.

hope this helps,

-dagraz

--- configure.in.orig   Thu Dec  9 14:16:45 1999
+++ configure.in        Thu Dec  9 14:14:42 1999
@@ -287,4 +287,8 @@
        [AC_DEFINE(HAVE_MD5_PASSWORDS)]
 )
 
+dnl Check for the path to xauth
+AC_PATH_PROG(xauth_path, xauth)
+AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path")
+
 AC_OUTPUT(Makefile)

--- includes.h.orig     Thu Dec  9 14:16:16 1999
+++ includes.h  Thu Dec  9 14:15:50 1999
@@ -77,11 +77,7 @@
 #include "bsd-strlcat.h"
 #include "bsd-mktemp.h"
 #include "bsd-snprintf.h"
-
-/* Define this to be the path of the xauth program. */
-#ifndef XAUTH_PATH
-#define XAUTH_PATH "/usr/X11R6/bin/xauth"
-#endif /* XAUTH_PATH */
+#include "bsd-daemon.h"
 
 /* Define this to be the path of the rsh program. */
 #ifndef _PATH_RSH

--- config.h.in.orig    Thu Dec  9 14:17:04 1999
+++ config.h.in Thu Dec  9 13:11:24 1999
@@ -175,6 +175,9 @@
 /* Define if you have the z library (-lz).  */
 #undef HAVE_LIBZ
 
+/* Path to xauth */
+#undef XAUTH_PATH
+
 /* ******************* Shouldn't need to edit below this line
************** */
 
 #include <sys/types.h> /* For u_intXX_t */

--- acconfig.h.orig     Thu Dec  9 14:17:11 1999
+++ acconfig.h  Thu Dec  9 12:46:14 1999
@@ -73,6 +73,9 @@
 /* Define if you have /dev/ptc */
 #undef HAVE_DEV_PTS_AND_PTC
 
+/* Path to xauth */
+#undef XAUTH_PATH
+
 @BOTTOM@
 
 /* ******************* Shouldn't need to edit below this line
************** */

--- configure.orig      Thu Dec  9 14:16:54 1999
+++ configure   Thu Dec  9 14:14:49 1999
@@ -2282,6 +2282,46 @@
 fi
 
 
+# Extract the first word of "xauth", so it can be a program name with
args.
+set dummy xauth; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2289: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_xauth_path'+set}'`\" = set";
then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$xauth_path" in
+  /*)
+  ac_cv_path_xauth_path="$xauth_path" # Let the user override the
test with a path.
+  ;;
+  ?:/*)                         
+  ac_cv_path_xauth_path="$xauth_path" # Let the user override the
test with a dos path.
+  ;;
+  *)
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_xauth_path="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac
+fi
+xauth_path="$ac_cv_path_xauth_path"
+if test -n "$xauth_path"; then
+  echo "$ac_t""$xauth_path" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+cat >> confdefs.h <<EOF
+#define XAUTH_PATH "$xauth_path"
+EOF
+
+
 trap '' 1 2 15
 cat > confcache <<\EOF
 # This file is a shell script that caches the results of configure
@@ -2426,6 +2466,7 @@
 s%@GNOME_ASKPASS@%$GNOME_ASKPASS%g
 s%@RANDOM_POOL@%$RANDOM_POOL%g
 s%@LIBWRAP@%$LIBWRAP%g
+s%@xauth_path@%$xauth_path%g
 
 CEOF
 EOF


_____________________________________________________
Sent by Jahoopa Free Email!
Find us on the web at http://www.jahoopa.com
Join today!






More information about the openssh-unix-dev mailing list