projects
/
debian
/
amanda
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 2.5.2p1
[debian/amanda]
/
common-src
/
rsh-security.c
diff --git
a/common-src/rsh-security.c
b/common-src/rsh-security.c
index 4c626ac54fc18c6a631157e3ffdab51e42759bb1..c98aed744d5cadd2bcdfde852afc9f87f405f77f 100644
(file)
--- a/
common-src/rsh-security.c
+++ b/
common-src/rsh-security.c
@@
-25,7
+25,7
@@
*/
/*
*/
/*
- * $Id: rsh-security.c,v 1.31
.2.1 2006/10/25 19:13:11
martinea Exp $
+ * $Id: rsh-security.c,v 1.31
2006/08/21 20:17:10
martinea Exp $
*
* rsh-security.c - security and transport over rsh or a rsh-like command.
*
*
* rsh-security.c - security and transport over rsh or a rsh-like command.
*
@@
-45,14
+45,6
@@
#ifdef RSH_SECURITY
#ifdef RSH_SECURITY
-/*#define RSH_DEBUG*/
-
-#ifdef RSH_DEBUG
-#define rshprintf(x) dbprintf(x)
-#else
-#define rshprintf(x)
-#endif
-
/*
* Path to the rsh binary. This should be configurable.
*/
/*
* Path to the rsh binary. This should be configurable.
*/
@@
-103,6
+95,8
@@
const security_driver_t rsh_security_driver = {
tcpm_stream_read_sync,
tcpm_stream_read_cancel,
tcpm_close_connection,
tcpm_stream_read_sync,
tcpm_stream_read_cancel,
tcpm_close_connection,
+ NULL,
+ NULL
};
static int newhandle = 1;
};
static int newhandle = 1;
@@
-126,14
+120,13
@@
rsh_connect(
void * datap)
{
struct sec_handle *rh;
void * datap)
{
struct sec_handle *rh;
- struct hostent *he;
char *amandad_path=NULL, *client_username=NULL;
assert(fn != NULL);
assert(hostname != NULL);
char *amandad_path=NULL, *client_username=NULL;
assert(fn != NULL);
assert(hostname != NULL);
-
rshprintf(
("%s: rsh: rsh_connect: %s\n", debug_prefix_time(NULL),
- hostname));
+
auth_debug(1,
("%s: rsh: rsh_connect: %s\n", debug_prefix_time(NULL),
+
hostname));
rh = alloc(SIZEOF(*rh));
security_handleinit(&rh->sech, &rsh_security_driver);
rh = alloc(SIZEOF(*rh));
security_handleinit(&rh->sech, &rsh_security_driver);
@@
-142,14
+135,13
@@
rsh_connect(
rh->ev_timeout = NULL;
rh->rc = NULL;
rh->ev_timeout = NULL;
rh->rc = NULL;
-
- if (
(he = gethostbyname(hostname)) == NULL
) {
+ rh->hostname = NULL;
+ if (
try_resolving_hostname(hostname, &rh->hostname)
) {
security_seterror(&rh->sech,
"%s: could not resolve hostname", hostname);
(*fn)(arg, &rh->sech, S_ERROR);
return;
}
security_seterror(&rh->sech,
"%s: could not resolve hostname", hostname);
(*fn)(arg, &rh->sech, S_ERROR);
return;
}
- rh->hostname = stralloc(he->h_name); /* will be replaced */
rh->rs = tcpma_stream_client(rh, newhandle++);
if (rh->rs == NULL)
rh->rs = tcpma_stream_client(rh, newhandle++);
if (rh->rs == NULL)