mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-12-26 11:52:06 +00:00
- Make ssh-askpass support optional through autoconf
This commit is contained in:
parent
6d7b2cd1a3
commit
3d1b22c150
@ -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
|
||||
|
2
INSTALL
2
INSTALL
@ -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
|
||||
----------------
|
||||
|
21
Makefile.in
21
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
|
||||
{
|
||||
|
10
configure.in
10
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)
|
||||
|
11
ssh-add.c
11
ssh-add.c
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user