- More reformatting merged from OpenBSD CVS
- Merged OpenBSD CVS changes:
- [channels.c]
report from mrwizard@psu.edu via djm@ibs.com.au
- [channels.c]
set SO_REUSEADDR and SO_LINGER for forwarded ports.
chip@valinux.com via damien@ibs.com.au
- [nchan.c]
it's not an error() if shutdown_write failes in nchan.
- [readconf.c]
remove dead #ifdef-0-code
- [readconf.c servconf.c]
strcasecmp instead of tolower
- [scp.c]
progress meter overflow fix from damien@ibs.com.au
- [ssh-add.1 ssh-add.c]
SSH_ASKPASS support
- [ssh.1 ssh.c]
postpone fork_after_authentication until command execution,
request/patch from jahakala@cc.jyu.fi via damien@ibs.com.au
plus: use daemon() for backgrounding
diff --git a/ssh-agent.c b/ssh-agent.c
index 70c2a7f..90c64ea 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-agent.c,v 1.22 1999/11/24 00:26:03 deraadt Exp $ */
+/* $OpenBSD: ssh-agent.c,v 1.23 1999/11/24 19:53:51 markus Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -9,7 +9,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh-agent.c,v 1.22 1999/11/24 00:26:03 deraadt Exp $");
+RCSID("$OpenBSD: ssh-agent.c,v 1.23 1999/11/24 19:53:51 markus Exp $");
#include "ssh.h"
#include "rsa.h"
@@ -189,10 +189,12 @@
/* Check if we have the key. */
for (i = 0; i < num_identities; i++)
if (BN_cmp(identities[i].key->n, n) == 0) {
- /* We have this key. Free the old key. Since we
- don\'t want to leave empty slots in the middle
- of the array, we actually free the key there
- and copy data from the last entry. */
+ /*
+ * We have this key. Free the old key. Since we
+ * don\'t want to leave empty slots in the middle of
+ * the array, we actually free the key there and copy
+ * data from the last entry.
+ */
RSA_free(identities[i].key);
xfree(identities[i].comment);
if (i < num_identities - 1)
@@ -291,8 +293,10 @@
/* Check if we already have the key. */
for (i = 0; i < num_identities; i++)
if (BN_cmp(identities[i].key->n, k->n) == 0) {
- /* We already have this key. Clear and free the
- new data and return success. */
+ /*
+ * We already have this key. Clear and free the new
+ * data and return success.
+ */
RSA_free(k);
xfree(identities[num_identities].comment);
@@ -511,11 +515,7 @@
__progname);
exit(1);
}
-#if defined(__GNU_LIBRARY__)
- while ((ch = getopt(ac, av, "+cks")) != -1) {
-#else
while ((ch = getopt(ac, av, "cks")) != -1) {
-#endif /* defined(__GNU_LIBRARY__) */
switch (ch) {
case 'c':
if (s_flag)
@@ -579,8 +579,10 @@
snprintf(socket_name, sizeof socket_name, "%s/agent.%d", socket_dir,
parent_pid);
- /* Create socket early so it will exist before command gets run
- from the parent. */
+ /*
+ * Create socket early so it will exist before command gets run from
+ * the parent.
+ */
sock = socket(AF_UNIX, SOCK_STREAM, 0);
if (sock < 0) {
perror("socket");
@@ -597,9 +599,10 @@
perror("listen");
cleanup_exit(1);
}
- /* Fork, and have the parent execute the command, if any, or
- present the socket data. The child continues as the
- authentication agent. */
+ /*
+ * Fork, and have the parent execute the command, if any, or present
+ * the socket data. The child continues as the authentication agent.
+ */
pid = fork();
if (pid == -1) {
perror("fork");