*/
#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>
#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;
* 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;
}
}
}
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)