diff options
author | Damien Miller <djm@mindrot.org> | 1999-11-12 15:46:08 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 1999-11-12 15:46:08 +1100 |
commit | 3d1b22c150bfacb300d6d58b1f71f13cef46ef22 (patch) | |
tree | a9d424e7535ce8eb3cb348826122815d6223620f | |
parent | 6d7b2cd1a32efa2a40c97361065d357a2e60b716 (diff) |
- Make ssh-askpass support optional through autoconf
-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 @@ | |||
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 | ||
24 | 19991111 | 25 | 19991111 |
25 | - Added (untested) Entropy Gathering Daemon (EGD) support | 26 | - Added (untested) Entropy Gathering Daemon (EGD) support |
@@ -71,6 +71,8 @@ sure of what you are doing, it is best to leave this alone. | |||
71 | support and to specify a EGD pool socket. You will need to use this if your | 71 | support and to specify a EGD pool socket. You will need to use this if your |
72 | Unix does not support the /dev/urandom device (or similar). | 72 | Unix 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 | ||
75 | 3. Configuration | 77 | 3. 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 | ||
89 | distclean: clean | 92 | distclean: 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 |
27 | enum | 30 | enum |
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]) |
109 | fi | 109 | fi |
110 | 110 | ||
111 | dnl Check whether use wants to disable the external ssh-askpass | ||
112 | AC_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 | |||
111 | AC_OUTPUT(Makefile) | 121 | AC_OUTPUT(Makefile) |
@@ -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" |
17 | RCSID("$Id: ssh-add.c,v 1.5 1999/11/08 23:28:04 damien Exp $"); | 17 | RCSID("$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 | { |