[or-cvs] r16383: Break compatibility with Domenik's Vidalia extension. (tor/branches/121-hs-authorization/src/or)

kloesing at seul.org kloesing at seul.org
Mon Aug 4 15:48:26 UTC 2008


Author: kloesing
Date: 2008-08-04 11:48:25 -0400 (Mon, 04 Aug 2008)
New Revision: 16383

Modified:
   tor/branches/121-hs-authorization/src/or/rendservice.c
   tor/branches/121-hs-authorization/src/or/routerparse.c
Log:
Break compatibility with Domenik's Vidalia extension.

Modified: tor/branches/121-hs-authorization/src/or/rendservice.c
===================================================================
--- tor/branches/121-hs-authorization/src/or/rendservice.c	2008-08-04 15:46:46 UTC (rev 16382)
+++ tor/branches/121-hs-authorization/src/or/rendservice.c	2008-08-04 15:48:25 UTC (rev 16383)
@@ -348,24 +348,17 @@
       service->clients = smartlist_create();
       type_names_split = smartlist_create();
       smartlist_split_string(type_names_split, line->value, " ", 0, 0);
-      /* BEGIN of hack to keep Domenik's Vidalia extension running. */
-      if (smartlist_len(type_names_split) == 1) {
-        auth_type = strdup("2");
-        client_names = smartlist_get(type_names_split, 0);
-      } else {
-        /* END of hack to keep Domenik's Vidalia extension running. */
-        if (smartlist_len(type_names_split) != 2) {
-          log_warn(LD_CONFIG, "HiddenServiceAuthorizeClient must be formatted "
-                   "as 'HiddenServiceAuthorizeClient auth-type client-name,"
-                   "client-name,...'.");
-          SMARTLIST_FOREACH(type_names_split, char *, cp, tor_free(cp));
-          smartlist_free(type_names_split);
-          rend_service_free(service);
-          return -1;
-        }
-        auth_type = smartlist_get(type_names_split, 0);
-        client_names = smartlist_get(type_names_split, 1);
+      if (smartlist_len(type_names_split) != 2) {
+        log_warn(LD_CONFIG, "HiddenServiceAuthorizeClient must be formatted "
+                 "as 'HiddenServiceAuthorizeClient auth-type client-name,"
+                 "client-name,...'.");
+        SMARTLIST_FOREACH(type_names_split, char *, cp, tor_free(cp));
+        smartlist_free(type_names_split);
+        rend_service_free(service);
+        return -1;
       }
+      auth_type = smartlist_get(type_names_split, 0);
+      client_names = smartlist_get(type_names_split, 1);
       smartlist_free(type_names_split);
       if (strlen(auth_type) != 1 || strspn(auth_type, "12") != 1) {
         log_warn(LD_CONFIG, "HiddenServiceAuthorizeClient contains "
@@ -664,9 +657,8 @@
             return -1;
           }
           written = tor_snprintf(buf + written, sizeof(buf) - written,
-                                 "service-address %s.onion\n"
                                  "client-key\n%s",
-                                 service_id, client_key_out);
+                                 client_key_out);
           if (written < 0) {
             log_warn(LD_BUG, "Could not write client entry.");
             strmap_free(parsed_clients, rend_authorized_client_free);

Modified: tor/branches/121-hs-authorization/src/or/routerparse.c
===================================================================
--- tor/branches/121-hs-authorization/src/or/routerparse.c	2008-08-04 15:46:46 UTC (rev 16382)
+++ tor/branches/121-hs-authorization/src/or/routerparse.c	2008-08-04 15:48:25 UTC (rev 16383)
@@ -359,7 +359,6 @@
 static token_rule_t client_keys_token_table[] = {
   T1_START("client-name", C_CLIENT_NAME, CONCAT_ARGS, NO_OBJ),
   T1("descriptor-cookie", C_DESCRIPTOR_COOKIE, EQ(1), NO_OBJ),
-  T01("service-address", C_SERVICE_ADDRESS, EQ(1), NO_OBJ),
   T01("client-key", C_CLIENT_KEY, NO_ARGS, NEED_KEY_1024),
   END_OF_TABLE
 };



More information about the tor-commits mailing list