From: Christian Grothoff Date: Fri, 23 Jun 2017 12:12:48 +0000 (+0200) Subject: kill short zone remenants X-Git-Tag: gnunet-0.11.0rc0~222 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=17a49aabbb796839236cde428f82ae69a1665bcb;p=oweals%2Fgnunet.git kill short zone remenants --- diff --git a/contrib/gnunet-gns-import.sh b/contrib/gnunet-gns-import.sh index 635360803..7b46379d6 100755 --- a/contrib/gnunet-gns-import.sh +++ b/contrib/gnunet-gns-import.sh @@ -48,10 +48,6 @@ gnunet-identity -C sks-zone $options #### Integrate those with the respective subsystems #### -# Zone for shortening by gns-proxy, -# (remove this entry to disable shortening) -gnunet-identity -e short-zone -s gns-short $options - # Default zone for 'gnunet-gns' lookups gnunet-identity -e master-zone -s gns-master $options @@ -76,23 +72,16 @@ gnunet-identity -e sks-zone -s fs-sks $options # Get the public keys as strings (so we can create PKEY records) MASTER=`gnunet-identity -d $options | grep master-zone | awk '{print $3}'` -SHORT=`gnunet-identity -d $options | grep short-zone | awk '{print $3}'` PRIVATE=`gnunet-identity -d $options | grep private-zone | awk '{print $3}'` PIN=DWJASSPE33MRN8T6Q0PENRNBTQY0E6ZYGTRCDP5DGPBF2CRJMJEG -# Link short and private zones into master zone +# Link private zone into master zone if (gnunet-namestore -z master-zone -D -n private -t PKEY | grep "PKEY: $PRIVATE" 1>/dev/null) then echo "Private zone link exists, skipping" else gnunet-namestore -z master-zone -a -e never -n private -p -t PKEY -V $PRIVATE $options fi -if (gnunet-namestore -z master-zone -D -n short -t PKEY | grep "PKEY: $SHORT" 1>/dev/null) -then - echo "Shorten zone link exists, skipping" -else - gnunet-namestore -z master-zone -a -e never -n short -p -t PKEY -V $SHORT $options -fi # Link GNUnet's FCFS zone into master zone under label "pin" if (gnunet-namestore -z master-zone -D -n pin -t PKEY | grep "PKEY: $PIN" 1>/dev/null) diff --git a/src/gns/gnunet-gns-import.c b/src/gns/gnunet-gns-import.c index 49f6e495f..3b9b0a081 100644 --- a/src/gns/gnunet-gns-import.c +++ b/src/gns/gnunet-gns-import.c @@ -59,11 +59,6 @@ static char *master_zone_pkey; */ static struct GNUNET_CRYPTO_EcdsaPrivateKey master_pk; -/** - * String version of PKEY for short-zone. - */ -static char *short_zone_pkey; - /** * String version of PKEY for private-zone. */ @@ -79,11 +74,6 @@ static char *pin_zone_pkey = "72QC35CO20UJN1E91KPJFNT9TG4CLKAPB4VK9S3Q758S9MLBRK */ static int found_private_rec = GNUNET_NO; -/** - * Set to GNUNET_YES if short record was found; - */ -static int found_short_rec = GNUNET_NO; - /** * Set to GNUNET_YES if pin record was found; */ @@ -219,8 +209,6 @@ zone_iterator (void *cls, { if (0 == strcmp (rname, "private")) check_pkey (rd_len, rd, private_zone_pkey, &found_private_rec); - else if (0 == strcmp (rname, "short")) - check_pkey (rd_len, rd, short_zone_pkey, &found_short_rec); else if (0 == strcmp (rname, "pin")) check_pkey (rd_len, rd, pin_zone_pkey, &found_pin_rec); } @@ -242,16 +230,6 @@ zone_iteration_error (void *cls) return; } } - if (!found_short_rec) - { - if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, &st, &code, - "gnunet-namestore", - "gnunet-namestore", "-z", "master-zone", "-a", "-e", "never", "-n", "short", "-p", "-t", "PKEY", "-V", short_zone_pkey, NULL)) - { - ret = 9; - return; - } - } if (!found_pin_rec) { if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, &st, &code, @@ -274,7 +252,7 @@ zone_iteration_finished (void *cls) /** - * Get master-zone, short-zone and private-zone keys. + * Get master-zone and private-zone keys. * * This function is initially called for all egos and then again * whenever a ego's identifier changes or if it is deleted. At the @@ -316,7 +294,6 @@ get_ego (void *cls, if (NULL == ego) { if (NULL == master_zone_pkey || - NULL == short_zone_pkey || NULL == private_zone_pkey) { ret = 11; @@ -340,8 +317,6 @@ get_ego (void *cls, master_zone_pkey = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk); master_pk = *GNUNET_IDENTITY_ego_get_private_key (ego); } - else if (NULL == short_zone_pkey && 0 == strcmp ("short-zone", identifier)) - short_zone_pkey = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk); else if (NULL == private_zone_pkey && 0 == strcmp ("private-zone", identifier)) private_zone_pkey = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk); } @@ -357,8 +332,6 @@ shutdown_task (void *cls) { GNUNET_free_non_null (master_zone_pkey); master_zone_pkey = NULL; - GNUNET_free_non_null (short_zone_pkey); - short_zone_pkey = NULL; GNUNET_free_non_null (private_zone_pkey); private_zone_pkey = NULL; if (NULL != list_it) @@ -409,11 +382,6 @@ run (void *cls, char *const *args, const char *cfgfile, "gnunet-identity", "-C", "master-zone", NULL)) return; - if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, &st, &code, - "gnunet-identity", - "gnunet-identity", "-C", "short-zone", NULL)) - return; - if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, &st, &code, "gnunet-identity", "gnunet-identity", "-C", "private-zone", NULL)) @@ -424,11 +392,6 @@ run (void *cls, char *const *args, const char *cfgfile, "gnunet-identity", "-C", "sks-zone", NULL)) return; - if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, &st, &code, - "gnunet-identity", - "gnunet-identity", "-e", "short-zone", "-s", "gns-short", NULL)) - return; - if (0 != run_process_and_wait (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, &st, &code, "gnunet-identity", "gnunet-identity", "-e", "master-zone", "-s", "gns-master", NULL))