]> andersk Git - openssh.git/blobdiff - ssh.c
- (dtucker) [logintest.c scp.c sftp-server.c sftp.c ssh-add.c ssh-agent.c
[openssh.git] / ssh.c
diff --git a/ssh.c b/ssh.c
index b9bd8c0d14a5ec5e6cf77d646884702312bf6abb..f0c284df03ee03eacac32e463ef0872ce91f85b3 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -40,7 +40,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: ssh.c,v 1.220 2004/06/20 17:36:59 djm Exp $");
+RCSID("$OpenBSD: ssh.c,v 1.222 2004/06/23 14:31:01 dtucker Exp $");
 
 #include <openssl/evp.h>
 #include <openssl/err.h>
@@ -76,11 +76,7 @@ RCSID("$OpenBSD: ssh.c,v 1.220 2004/06/20 17:36:59 djm Exp $");
 #include "scard.h"
 #endif
 
-#ifdef HAVE___PROGNAME
 extern char *__progname;
-#else
-char *__progname;
-#endif
 
 /* Flag indicating whether debug mode is on.  This can be set on the command line. */
 int debug_flag = 0;
@@ -807,17 +803,17 @@ x11_get_proto(char **_proto, char **_data)
         * for the local connection.
         */
        if (!got_data) {
-               u_int32_t rand = 0;
+               u_int32_t rnd = 0;
 
                logit("Warning: No xauth data; "
                    "using fake authentication data for X11 forwarding.");
                strlcpy(proto, SSH_X11_PROTO, sizeof proto);
                for (i = 0; i < 16; i++) {
                        if (i % 4 == 0)
-                               rand = arc4random();
+                               rnd = arc4random();
                        snprintf(data + 2 * i, sizeof data - 2 * i, "%02x",
-                           rand & 0xff);
-                       rand >>= 8;
+                           rnd & 0xff);
+                       rnd >>= 8;
                }
        }
 }
@@ -1304,9 +1300,11 @@ control_client(const char *path)
                        
                buffer_put_int(&m, num_env);
 
-               for (i = 0; environ[i] != NULL && num_env >= 0; i++, num_env--)
-                       if (env_permitted(environ[i]))
+               for (i = 0; environ[i] != NULL && num_env >= 0; i++)
+                       if (env_permitted(environ[i])) {
+                               num_env--;
                                buffer_put_cstring(&m, environ[i]);
+                       }
        }
 
        if (ssh_msg_send(sock, /* version */0, &m) == -1)
This page took 0.079739 seconds and 4 git commands to generate.