diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | INSTALL | 2 | ||||
-rw-r--r-- | Makefile.in | 21 | ||||
-rw-r--r-- | acconfig.h | 5 | ||||
-rw-r--r-- | configure.in | 10 | ||||
-rw-r--r-- | ssh-add.c | 11 |
6 files changed, 38 insertions, 12 deletions
@@ -20,6 +20,7 @@ * readconf.h is only included if necessary - [mpaux.c] clear temp buffer - [servconf.c] print _all_ bad options found in configfile + - Make ssh-askpass support optional through autoconf 19991111 - Added (untested) Entropy Gathering Daemon (EGD) support @@ -71,6 +71,8 @@ sure of what you are doing, it is best to leave this alone. support and to specify a EGD pool socket. You will need to use this if your Unix does not support the /dev/urandom device (or similar). +--without-askpass will disable X11 password requestor support in ssh-add + 3. Configuration ---------------- diff --git a/Makefile.in b/Makefile.in index bd7950a5..8de0bdcb 100644 --- a/Makefile.in +++ b/Makefile.in @@ -64,27 +64,30 @@ install: all install -d $(mandir) install -d $(mandir)/man1 install -d $(mandir)/man8 - install -d $(libdir) - install -d $(libdir)/ssh install -s -c ssh $(bindir)/ssh - ln -sf ssh $(bindir)/slogin install -s -c scp $(bindir)/scp install -s -c ssh-add $(bindir)/ssh-add - if [ -z "@GNOME_ASKPASS@" ] ; then \ - install -m755 -c ssh-askpass $(libdir)/ssh/ssh-askpass; \ - else \ - install -m755 -c gnome-ssh-askpass $(libdir)/ssh/ssh-askpass; \ - fi install -s -c ssh-agent $(bindir)/ssh-agent install -s -c ssh-keygen $(bindir)/ssh-keygen install -s -c sshd $(sbindir)/sshd install -m644 -c ssh.1 $(mandir)/man1/ssh.1 - ln -sf ssh.1 $(mandir)/man1/slogin.1 install -m644 -c scp.1 $(mandir)/man1/scp.1 install -m644 -c ssh-add.1 $(mandir)/man1/ssh-add.1 install -m644 -c ssh-agent.1 $(mandir)/man1/ssh-agent.1 install -m644 -c ssh-keygen.1 $(mandir)/man1/ssh-keygen.1 install -m644 -c sshd.8 $(mandir)/man8/sshd.8 + ln -sf ssh $(bindir)/slogin + ln -sf ssh.1 $(mandir)/man1/slogin.1 + + if [ ! -z "@DISABLE_EXTERNAL_ASKPASS@" ] ; then \ + install -d $(libdir) \ + install -d $(libdir)/ssh \ + if [ -z "@GNOME_ASKPASS@" ] ; then \ + install -m755 -c ssh-askpass $(libdir)/ssh/ssh-askpass; \ + else \ + install -m755 -c gnome-ssh-askpass $(libdir)/ssh/ssh-askpass; \ + fi \ + fi distclean: clean rm -f Makefile config.h core *~ @@ -21,8 +21,11 @@ /* Define is libutil has login() function */ #undef HAVE_LIBUTIL_LOGIN +/* Define if you *don't* want to use an external ssh-askpass */ +#undef DISABLE_EXTERNAL_ASKPASS + +/* ******************* Shouldn't need to edit below this line ************** */ -/* Shouldn't need to edit below this line *************************** */ #ifndef SHUT_RDWR enum { diff --git a/configure.in b/configure.in index e679df45..ada1a2e9 100644 --- a/configure.in +++ b/configure.in @@ -108,4 +108,14 @@ if test -z "$RANDOM_POOL" -a -z "$EGD_POOL"; then AC_MSG_ERROR([No random device found, and no EGD random pool specified]) fi +dnl Check whether use wants to disable the external ssh-askpass +AC_ARG_WITH(askpass, + [ --without-askpass Disable external ssh-askpass support], + [ + AC_DEFINE(DISABLE_EXTERNAL_ASKPASS) + DISABLE_EXTERNAL_ASKPASS=yes + AC_SUBST(DISABLE_EXTERNAL_ASKPASS) + ] +) + AC_OUTPUT(Makefile) @@ -14,7 +14,7 @@ Adds an identity to the authentication server, or removes an identity. */ #include "includes.h" -RCSID("$Id: ssh-add.c,v 1.5 1999/11/08 23:28:04 damien Exp $"); +RCSID("$Id: ssh-add.c,v 1.6 1999/11/12 04:46:08 damien Exp $"); #include "rsa.h" #include "ssh.h" @@ -60,12 +60,14 @@ add_file(AuthenticationConnection *ac, const char *filename) RSA *public_key; char *saved_comment, *comment, *pass; int first; +#ifndef DISABLE_EXTERNAL_ASKPASS int pipes[2]; char buf[BUFSIZE]; int tmp; pid_t child; FILE *pipef; - +#endif /* !DISABLE_EXTERNAL_ASKPASS */ + key = RSA_new(); public_key = RSA_new(); if (!load_public_key(filename, public_key, &saved_comment)) @@ -86,6 +88,7 @@ add_file(AuthenticationConnection *ac, const char *filename) /* Ask for a passphrase. */ if (getenv("DISPLAY") && !isatty(fileno(stdin))) { +#ifndef DISABLE_EXTERNAL_ASKPASS if (pipe(pipes) ==-1) { fprintf(stderr, "Creating pipes failed: %s\n", strerror(errno)); @@ -152,6 +155,10 @@ add_file(AuthenticationConnection *ac, const char *filename) return; } } +#else /* !DISABLE_EXTERNAL_ASKPASS */ + xfree(saved_comment); + return; +#endif /* !DISABLE_EXTERNAL_ASKPASS */ } else { |