summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--INSTALL2
-rw-r--r--Makefile.in21
-rw-r--r--acconfig.h5
-rw-r--r--configure.in10
-rw-r--r--ssh-add.c11
6 files changed, 38 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index f224a77cd..1ecaed30b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,6 +20,7 @@
20 * readconf.h is only included if necessary 20 * readconf.h is only included if necessary
21 - [mpaux.c] clear temp buffer 21 - [mpaux.c] clear temp buffer
22 - [servconf.c] print _all_ bad options found in configfile 22 - [servconf.c] print _all_ bad options found in configfile
23 - Make ssh-askpass support optional through autoconf
23 24
2419991111 2519991111
25 - Added (untested) Entropy Gathering Daemon (EGD) support 26 - Added (untested) Entropy Gathering Daemon (EGD) support
diff --git a/INSTALL b/INSTALL
index 54d48e25c..ef96cf454 100644
--- a/INSTALL
+++ b/INSTALL
@@ -71,6 +71,8 @@ sure of what you are doing, it is best to leave this alone.
71support and to specify a EGD pool socket. You will need to use this if your 71support and to specify a EGD pool socket. You will need to use this if your
72Unix does not support the /dev/urandom device (or similar). 72Unix does not support the /dev/urandom device (or similar).
73 73
74--without-askpass will disable X11 password requestor support in ssh-add
75
74 76
753. Configuration 773. Configuration
76---------------- 78----------------
diff --git a/Makefile.in b/Makefile.in
index bd7950a51..8de0bdcb8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -64,27 +64,30 @@ install: all
64 install -d $(mandir) 64 install -d $(mandir)
65 install -d $(mandir)/man1 65 install -d $(mandir)/man1
66 install -d $(mandir)/man8 66 install -d $(mandir)/man8
67 install -d $(libdir)
68 install -d $(libdir)/ssh
69 install -s -c ssh $(bindir)/ssh 67 install -s -c ssh $(bindir)/ssh
70 ln -sf ssh $(bindir)/slogin
71 install -s -c scp $(bindir)/scp 68 install -s -c scp $(bindir)/scp
72 install -s -c ssh-add $(bindir)/ssh-add 69 install -s -c ssh-add $(bindir)/ssh-add
73 if [ -z "@GNOME_ASKPASS@" ] ; then \
74 install -m755 -c ssh-askpass $(libdir)/ssh/ssh-askpass; \
75 else \
76 install -m755 -c gnome-ssh-askpass $(libdir)/ssh/ssh-askpass; \
77 fi
78 install -s -c ssh-agent $(bindir)/ssh-agent 70 install -s -c ssh-agent $(bindir)/ssh-agent
79 install -s -c ssh-keygen $(bindir)/ssh-keygen 71 install -s -c ssh-keygen $(bindir)/ssh-keygen
80 install -s -c sshd $(sbindir)/sshd 72 install -s -c sshd $(sbindir)/sshd
81 install -m644 -c ssh.1 $(mandir)/man1/ssh.1 73 install -m644 -c ssh.1 $(mandir)/man1/ssh.1
82 ln -sf ssh.1 $(mandir)/man1/slogin.1
83 install -m644 -c scp.1 $(mandir)/man1/scp.1 74 install -m644 -c scp.1 $(mandir)/man1/scp.1
84 install -m644 -c ssh-add.1 $(mandir)/man1/ssh-add.1 75 install -m644 -c ssh-add.1 $(mandir)/man1/ssh-add.1
85 install -m644 -c ssh-agent.1 $(mandir)/man1/ssh-agent.1 76 install -m644 -c ssh-agent.1 $(mandir)/man1/ssh-agent.1
86 install -m644 -c ssh-keygen.1 $(mandir)/man1/ssh-keygen.1 77 install -m644 -c ssh-keygen.1 $(mandir)/man1/ssh-keygen.1
87 install -m644 -c sshd.8 $(mandir)/man8/sshd.8 78 install -m644 -c sshd.8 $(mandir)/man8/sshd.8
79 ln -sf ssh $(bindir)/slogin
80 ln -sf ssh.1 $(mandir)/man1/slogin.1
81
82 if [ ! -z "@DISABLE_EXTERNAL_ASKPASS@" ] ; then \
83 install -d $(libdir) \
84 install -d $(libdir)/ssh \
85 if [ -z "@GNOME_ASKPASS@" ] ; then \
86 install -m755 -c ssh-askpass $(libdir)/ssh/ssh-askpass; \
87 else \
88 install -m755 -c gnome-ssh-askpass $(libdir)/ssh/ssh-askpass; \
89 fi \
90 fi
88 91
89distclean: clean 92distclean: clean
90 rm -f Makefile config.h core *~ 93 rm -f Makefile config.h core *~
diff --git a/acconfig.h b/acconfig.h
index 56075fd9f..007a9b0cc 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -21,8 +21,11 @@
21/* Define is libutil has login() function */ 21/* Define is libutil has login() function */
22#undef HAVE_LIBUTIL_LOGIN 22#undef HAVE_LIBUTIL_LOGIN
23 23
24/* Define if you *don't* want to use an external ssh-askpass */
25#undef DISABLE_EXTERNAL_ASKPASS
26
27/* ******************* Shouldn't need to edit below this line ************** */
24 28
25/* Shouldn't need to edit below this line *************************** */
26#ifndef SHUT_RDWR 29#ifndef SHUT_RDWR
27enum 30enum
28{ 31{
diff --git a/configure.in b/configure.in
index e679df45b..ada1a2e96 100644
--- a/configure.in
+++ b/configure.in
@@ -108,4 +108,14 @@ if test -z "$RANDOM_POOL" -a -z "$EGD_POOL"; then
108 AC_MSG_ERROR([No random device found, and no EGD random pool specified]) 108 AC_MSG_ERROR([No random device found, and no EGD random pool specified])
109fi 109fi
110 110
111dnl Check whether use wants to disable the external ssh-askpass
112AC_ARG_WITH(askpass,
113 [ --without-askpass Disable external ssh-askpass support],
114 [
115 AC_DEFINE(DISABLE_EXTERNAL_ASKPASS)
116 DISABLE_EXTERNAL_ASKPASS=yes
117 AC_SUBST(DISABLE_EXTERNAL_ASKPASS)
118 ]
119)
120
111AC_OUTPUT(Makefile) 121AC_OUTPUT(Makefile)
diff --git a/ssh-add.c b/ssh-add.c
index fb237ce2e..9ec34180f 100644
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -14,7 +14,7 @@ Adds an identity to the authentication server, or removes an identity.
14*/ 14*/
15 15
16#include "includes.h" 16#include "includes.h"
17RCSID("$Id: ssh-add.c,v 1.5 1999/11/08 23:28:04 damien Exp $"); 17RCSID("$Id: ssh-add.c,v 1.6 1999/11/12 04:46:08 damien Exp $");
18 18
19#include "rsa.h" 19#include "rsa.h"
20#include "ssh.h" 20#include "ssh.h"
@@ -60,12 +60,14 @@ add_file(AuthenticationConnection *ac, const char *filename)
60 RSA *public_key; 60 RSA *public_key;
61 char *saved_comment, *comment, *pass; 61 char *saved_comment, *comment, *pass;
62 int first; 62 int first;
63#ifndef DISABLE_EXTERNAL_ASKPASS
63 int pipes[2]; 64 int pipes[2];
64 char buf[BUFSIZE]; 65 char buf[BUFSIZE];
65 int tmp; 66 int tmp;
66 pid_t child; 67 pid_t child;
67 FILE *pipef; 68 FILE *pipef;
68 69#endif /* !DISABLE_EXTERNAL_ASKPASS */
70
69 key = RSA_new(); 71 key = RSA_new();
70 public_key = RSA_new(); 72 public_key = RSA_new();
71 if (!load_public_key(filename, public_key, &saved_comment)) 73 if (!load_public_key(filename, public_key, &saved_comment))
@@ -86,6 +88,7 @@ add_file(AuthenticationConnection *ac, const char *filename)
86 /* Ask for a passphrase. */ 88 /* Ask for a passphrase. */
87 if (getenv("DISPLAY") && !isatty(fileno(stdin))) 89 if (getenv("DISPLAY") && !isatty(fileno(stdin)))
88 { 90 {
91#ifndef DISABLE_EXTERNAL_ASKPASS
89 if (pipe(pipes) ==-1) 92 if (pipe(pipes) ==-1)
90 { 93 {
91 fprintf(stderr, "Creating pipes failed: %s\n", strerror(errno)); 94 fprintf(stderr, "Creating pipes failed: %s\n", strerror(errno));
@@ -152,6 +155,10 @@ add_file(AuthenticationConnection *ac, const char *filename)
152 return; 155 return;
153 } 156 }
154 } 157 }
158#else /* !DISABLE_EXTERNAL_ASKPASS */
159 xfree(saved_comment);
160 return;
161#endif /* !DISABLE_EXTERNAL_ASKPASS */
155 } 162 }
156 else 163 else
157 { 164 {