[or-cvs] [tor/release-0.2.2] Merge remote branch 'sebastian/bug2314' into maint-0.2.2
arma at torproject.org
arma at torproject.org
Sat Jan 15 22:31:47 UTC 2011
commit bb5f99d4dfe119f82556ba4d9385d667a8414935
Merge: 40ef908 9ecf133
Author: Nick Mathewson <nickm at torproject.org>
Date: Mon Jan 3 12:47:14 2011 -0500
Merge remote branch 'sebastian/bug2314' into maint-0.2.2
changes/bug2314 | 4 ++++
src/common/crypto.c | 3 ++-
src/or/cpuworker.c | 2 +-
src/or/eventdns.c | 8 +++++---
src/or/ntmain.c | 6 +++---
src/test/test_util.c | 1 +
6 files changed, 16 insertions(+), 8 deletions(-)
diff --combined src/common/crypto.c
index 7e4ec32,52bd365..6516261
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@@ -1,7 -1,7 +1,7 @@@
/* Copyright (c) 2001, Matej Pfajfar.
* Copyright (c) 2001-2004, Roger Dingledine.
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
- * Copyright (c) 2007-2010, The Tor Project, Inc. */
+ * Copyright (c) 2007-2011, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
@@@ -1959,14 -1959,15 +1959,15 @@@ seed_weak_rng(void
int
crypto_seed_rng(int startup)
{
- char buf[ADD_ENTROPY];
int rand_poll_status = 0;
/* local variables */
#ifdef MS_WINDOWS
+ unsigned char buf[ADD_ENTROPY];
static int provider_set = 0;
static HCRYPTPROV provider;
#else
+ char buf[ADD_ENTROPY];
static const char *filenames[] = {
"/dev/srandom", "/dev/urandom", "/dev/random", NULL
};
diff --combined src/or/cpuworker.c
index 29dfc90,fecad14..7cbc191
--- a/src/or/cpuworker.c
+++ b/src/or/cpuworker.c
@@@ -1,6 -1,6 +1,6 @@@
/* Copyright (c) 2003-2004, Roger Dingledine.
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
- * Copyright (c) 2007-2010, The Tor Project, Inc. */
+ * Copyright (c) 2007-2011, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
@@@ -250,7 -250,7 +250,7 @@@ cpuworker_main(void *data
for (;;) {
ssize_t r;
- if ((r = recv(fd, &question_type, 1, 0)) != 1) {
+ if ((r = recv(fd, (void *)&question_type, 1, 0)) != 1) {
// log_fn(LOG_ERR,"read type failed. Exiting.");
if (r == 0) {
log_info(LD_OR,
diff --combined src/or/ntmain.c
index b01d4ca,984acc7..06ca2df
--- a/src/or/ntmain.c
+++ b/src/or/ntmain.c
@@@ -1,6 -1,6 +1,6 @@@
/* Copyright (c) 2001-2004, Roger Dingledine.
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
- * Copyright (c) 2007-2010, The Tor Project, Inc. */
+ * Copyright (c) 2007-2011, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#define MAIN_PRIVATE
@@@ -518,7 -518,7 +518,7 @@@ nt_service_install(int argc, char **arg
SERVICE_DESCRIPTIONA sdBuff;
char *command;
char *errmsg;
- const char *user_acct = GENSRV_USERACCT;
+ const char *user_acct = NULL;
const char *password = "";
int i;
OSVERSIONINFOEX info;
@@@ -562,13 -562,12 +562,12 @@@
is_win2k_or_worse = 1;
}
- if (user_acct == GENSRV_USERACCT) {
+ if (!user_acct) {
if (is_win2k_or_worse) {
/* On Win2k, there is no LocalService account, so we actually need to
* fall back on NULL (the system account). */
printf("Running on Win2K or earlier, so the LocalService account "
"doesn't exist. Falling back to SYSTEM account.\n");
- user_acct = NULL;
} else {
/* Genericity is apparently _so_ last year in Redmond, where some
* accounts are accounts that you can look up, and some accounts
@@@ -577,6 -576,7 +576,7 @@@
*/
printf("Running on a Post-Win2K OS, so we'll assume that the "
"LocalService account exists.\n");
+ user_acct = GENSRV_USERACCT;
}
} else if (0 && service_fns.LookupAccountNameA_fn(NULL, // On this system
user_acct,
diff --combined src/test/test_util.c
index 0b4beff,d28fc9c..b1fafc8
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@@ -1,6 -1,6 +1,6 @@@
/* Copyright (c) 2001-2004, Roger Dingledine.
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
- * Copyright (c) 2007-2010, The Tor Project, Inc. */
+ * Copyright (c) 2007-2011, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#include "orconfig.h"
@@@ -1200,6 -1200,7 +1200,7 @@@ static voi
test_util_load_win_lib(void *ptr)
{
HANDLE h = load_windows_system_library("advapi32.dll");
+ (void) ptr;
tt_assert(h);
done:
More information about the tor-commits
mailing list