2 This file is part of GNUnet.
3 (C) 2006, 2007, 2008, 2009 Christian Grothoff (and other contributing authors)
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 2, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
22 * @file src/util/configuration.c
23 * @brief configuration management
25 * @author Christian Grothoff
29 #include "gnunet_common.h"
30 #include "gnunet_configuration_lib.h"
31 #include "gnunet_crypto_lib.h"
32 #include "gnunet_disk_lib.h"
33 #include "gnunet_os_lib.h"
34 #include "gnunet_strings_lib.h"
38 * @brief configuration entry
44 * This is a linked list.
46 struct ConfigEntry *next;
54 * current, commited value
61 * @brief configuration section
66 * This is a linked list.
68 struct ConfigSection *next;
71 * entries in the section
73 struct ConfigEntry *entries;
83 * @brief configuration data
85 struct GNUNET_CONFIGURATION_Handle
88 * Configuration sections.
90 struct ConfigSection *sections;
93 * Modification indication since last save
94 * GNUNET_NO if clean, GNUNET_YES if dirty,
95 * GNUNET_SYSERR on error (i.e. last save failed)
103 * Used for diffing a configuration object against
108 const struct GNUNET_CONFIGURATION_Handle *cfgDefault;
109 struct GNUNET_CONFIGURATION_Handle *cfgDiff;
115 * Create a GNUNET_CONFIGURATION_Handle.
117 * @return fresh configuration object
119 struct GNUNET_CONFIGURATION_Handle *
120 GNUNET_CONFIGURATION_create ()
122 return GNUNET_malloc (sizeof (struct GNUNET_CONFIGURATION_Handle));
127 * Destroy configuration object.
129 * @param cfg configuration to destroy
132 GNUNET_CONFIGURATION_destroy (struct GNUNET_CONFIGURATION_Handle *cfg)
134 struct ConfigSection *sec;
136 while (NULL != (sec = cfg->sections))
137 GNUNET_CONFIGURATION_remove_section (cfg, sec->name);
143 * Parse a configuration file, add all of the options in the
144 * file to the configuration environment.
146 * @param cfg configuration to update
147 * @param filename name of the configuration file
148 * @return GNUNET_OK on success, GNUNET_SYSERR on error
151 GNUNET_CONFIGURATION_parse (struct GNUNET_CONFIGURATION_Handle *cfg,
152 const char *filename)
166 fn = GNUNET_STRINGS_filename_expand (filename);
168 return GNUNET_SYSERR;
169 dirty = cfg->dirty; /* back up value! */
170 if (NULL == (fp = FOPEN (fn, "r")))
172 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "fopen", fn);
174 return GNUNET_SYSERR;
178 section = GNUNET_strdup ("");
179 memset (line, 0, 256);
181 while (NULL != fgets (line, 255, fp))
184 for (i = 0; i < 255; i++)
187 if (line[0] == '\n' || line[0] == '#' || line[0] == '%' ||
191 for (i = 0; (i < 255 && line[i] != 0); i++)
192 if (line[i] != ' ' && line[i] != '\n' && line[i] != '\r')
196 /* remove tailing whitespace */
197 for (i = strlen (line) - 1; (i >= 0) && (isspace ( (unsigned char) line[i])); i--)
199 if (1 == sscanf (line, "@INLINE@ %191[^\n]", value))
202 if (GNUNET_OK != GNUNET_CONFIGURATION_parse (cfg, value))
203 ret = GNUNET_SYSERR; /* failed to parse included config */
205 else if (1 == sscanf (line, "[%99[^]]]", value))
208 GNUNET_free (section);
209 section = GNUNET_strdup (value);
211 else if (2 == sscanf (line, " %63[^= ] = %191[^\n]", tag, value))
215 i = strlen (value) - 1;
216 while ((i >= 0) && (isspace ( (unsigned char) value[i])))
223 while ((value[i] != '\0') && (value[i] != '"'))
233 GNUNET_CONFIGURATION_set_value_string (cfg,
234 section, tag, &value[i]);
236 else if (1 == sscanf (line, " %63[^= ] =[^\n]", tag))
239 GNUNET_CONFIGURATION_set_value_string (cfg, section, tag, "");
244 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
246 ("Syntax error in configuration file `%s' at line %u.\n"),
252 GNUNET_assert (0 == fclose (fp));
253 /* restore dirty flag - anything we set in the meantime
256 GNUNET_free (section);
262 * Test if there are configuration options that were
263 * changed since the last save.
265 * @param cfg configuration to inspect
266 * @return GNUNET_NO if clean, GNUNET_YES if dirty, GNUNET_SYSERR on error (i.e. last save failed)
269 GNUNET_CONFIGURATION_is_dirty (const struct GNUNET_CONFIGURATION_Handle *cfg)
276 * Write configuration file.
278 * @param cfg configuration to write
279 * @param filename where to write the configuration
280 * @return GNUNET_OK on success, GNUNET_SYSERR on error
283 GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg,
284 const char *filename)
286 struct ConfigSection *sec;
287 struct ConfigEntry *ent;
294 fn = GNUNET_STRINGS_filename_expand (filename);
296 return GNUNET_SYSERR;
297 if (GNUNET_OK != GNUNET_DISK_directory_create_for_file (fn))
300 return GNUNET_SYSERR;
302 if (NULL == (fp = FOPEN (fn, "w")))
304 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "fopen", fn);
306 return GNUNET_SYSERR;
313 if (0 > fprintf (fp, "[%s]\n", sec->name))
321 if (ent->val != NULL)
323 val = GNUNET_malloc (strlen (ent->val) * 2 + 1);
324 strcpy (val, ent->val);
325 while (NULL != (pos = strstr (val, "\n")))
327 memmove (&pos[2], &pos[1], strlen (&pos[1]));
331 if (0 > fprintf (fp, "%s = %s\n", ent->key, val))
343 if (0 > fprintf (fp, "\n"))
351 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "fprintf", filename);
352 GNUNET_assert (0 == fclose (fp));
355 cfg->dirty = GNUNET_SYSERR; /* last write failed */
356 return GNUNET_SYSERR;
358 cfg->dirty = GNUNET_NO; /* last write succeeded */
364 * Iterate over all options in the configuration.
366 * @param cfg configuration to inspect
367 * @param iter function to call on each option
368 * @param iter_cls closure for iter
371 GNUNET_CONFIGURATION_iterate (const struct GNUNET_CONFIGURATION_Handle *cfg,
372 GNUNET_CONFIGURATION_Iterator iter,
375 struct ConfigSection *spos;
376 struct ConfigEntry *epos;
378 spos = cfg->sections;
381 epos = spos->entries;
384 iter (iter_cls, spos->name, epos->key, epos->val);
393 * Iterate over all sections in the configuration.
395 * @param cfg configuration to inspect
396 * @param iter function to call on each section
397 * @param iter_cls closure for iter
400 GNUNET_CONFIGURATION_iterate_sections (const struct GNUNET_CONFIGURATION_Handle *cfg,
401 GNUNET_CONFIGURATION_Section_Iterator iter,
404 struct ConfigSection *spos;
405 struct ConfigSection *next;
407 next = cfg->sections;
412 iter (iter_cls, spos->name);
417 * Remove the given section and all options in it.
419 * @param cfg configuration to inspect
420 * @param section name of the section to remove
422 void GNUNET_CONFIGURATION_remove_section (struct GNUNET_CONFIGURATION_Handle *cfg,
425 struct ConfigSection *spos;
426 struct ConfigSection *prev;
427 struct ConfigEntry *ent;
430 spos = cfg->sections;
433 if (0 == strcmp (section,
437 cfg->sections = spos->next;
439 prev->next = spos->next;
440 while (NULL != (ent = spos->entries))
442 spos->entries = ent->next;
443 GNUNET_free (ent->key);
444 GNUNET_free_non_null (ent->val);
446 cfg->dirty = GNUNET_YES;
448 GNUNET_free (spos->name);
459 * Copy a configuration value to the given target configuration.
460 * Overwrites existing entries.
462 * @param cls the destination configuration (struct GNUNET_CONFIGURATION_Handle*)
463 * @param section section for the value
464 * @param option option name of the value
465 * @param value value to copy
468 copy_entry (void *cls,
469 const char *section, const char *option, const char *value)
471 struct GNUNET_CONFIGURATION_Handle *dst = cls;
472 GNUNET_CONFIGURATION_set_value_string (dst, section, option, value);
477 * Duplicate an existing configuration object.
479 * @param cfg configuration to duplicate
480 * @return duplicate configuration
482 struct GNUNET_CONFIGURATION_Handle *
483 GNUNET_CONFIGURATION_dup (const struct GNUNET_CONFIGURATION_Handle *cfg)
485 struct GNUNET_CONFIGURATION_Handle *ret;
487 ret = GNUNET_CONFIGURATION_create ();
488 GNUNET_CONFIGURATION_iterate (cfg, ©_entry, ret);
497 * @param section FIXME
498 * @return matching entry, NULL if not found
500 static struct ConfigSection *
501 findSection (const struct GNUNET_CONFIGURATION_Handle *cfg,
504 struct ConfigSection *pos;
507 while ((pos != NULL) && (0 != strcasecmp (section, pos->name)))
514 * Find an entry from a configuration.
516 * @param cfg handle to the configuration
517 * @param section section the option is in
518 * @param key the option
519 * @return matching entry, NULL if not found
521 static struct ConfigEntry *
522 findEntry (const struct GNUNET_CONFIGURATION_Handle *cfg,
523 const char *section, const char *key)
525 struct ConfigSection *sec;
526 struct ConfigEntry *pos;
528 sec = findSection (cfg, section);
532 while ((pos != NULL) && (0 != strcasecmp (key, pos->key)))
539 * A callback function, compares entries from two configurations
540 * (default against a new configuration) and write the diffs in a
541 * diff-configuration object (the callback object).
543 * @param cls the diff configuration (struct DiffHandle*)
544 * @param section section for the value (of the default conf.)
545 * @param option option name of the value (of the default conf.)
546 * @param value value to copy (of the default conf.)
549 compareEntries (void *cls,
550 const char *section, const char *option, const char *value)
552 struct DiffHandle *dh = cls;
553 struct ConfigEntry *entNew;
555 entNew = findEntry (dh->cfgDefault, section, option);
556 if ( (entNew != NULL) &&
557 (strcmp (entNew->val, value) == 0) )
559 GNUNET_CONFIGURATION_set_value_string (dh->cfgDiff,
567 * Write only configuration entries that have been changed to configuration file
568 * @param cfgDefault default configuration
569 * @param cfgNew new configuration
570 * @param filename where to write the configuration diff between default and new
571 * @return GNUNET_OK on success, GNUNET_SYSERR on error
574 GNUNET_CONFIGURATION_write_diffs (const struct GNUNET_CONFIGURATION_Handle
576 const struct GNUNET_CONFIGURATION_Handle *cfgNew,
577 const char *filename)
580 struct DiffHandle diffHandle;
582 diffHandle.cfgDiff = GNUNET_CONFIGURATION_create ();
583 diffHandle.cfgDefault = cfgDefault;
584 GNUNET_CONFIGURATION_iterate (cfgNew, compareEntries, &diffHandle);
585 ret = GNUNET_CONFIGURATION_write (diffHandle.cfgDiff, filename);
586 GNUNET_CONFIGURATION_destroy (diffHandle.cfgDiff);
592 * Set a configuration value that should be a string.
594 * @param cfg configuration to update
595 * @param section section of interest
596 * @param option option of interest
597 * @param value value to set
600 GNUNET_CONFIGURATION_set_value_string (struct GNUNET_CONFIGURATION_Handle
603 const char *option, const char *value)
605 struct ConfigSection *sec;
606 struct ConfigEntry *e;
608 e = findEntry (cfg, section, option);
611 GNUNET_free_non_null (e->val);
612 e->val = GNUNET_strdup (value);
615 sec = findSection (cfg, section);
618 sec = GNUNET_malloc (sizeof (struct ConfigSection));
619 sec->name = GNUNET_strdup (section);
620 sec->next = cfg->sections;
623 e = GNUNET_malloc (sizeof (struct ConfigEntry));
624 e->key = GNUNET_strdup (option);
625 e->val = GNUNET_strdup (value);
626 e->next = sec->entries;
632 * Set a configuration value that should be a number.
634 * @param cfg configuration to update
635 * @param section section of interest
636 * @param option option of interest
637 * @param number value to set
640 GNUNET_CONFIGURATION_set_value_number (struct GNUNET_CONFIGURATION_Handle
641 *cfg, const char *section,
643 unsigned long long number)
646 GNUNET_snprintf (s, 64, "%llu", number);
647 GNUNET_CONFIGURATION_set_value_string (cfg, section, option, s);
652 * Get a configuration value that should be a number.
654 * @param cfg configuration to inspect
655 * @param section section of interest
656 * @param option option of interest
657 * @param number where to store the numeric value of the option
658 * @return GNUNET_OK on success, GNUNET_SYSERR on error
661 GNUNET_CONFIGURATION_get_value_number (const struct
662 GNUNET_CONFIGURATION_Handle *cfg,
665 unsigned long long *number)
667 struct ConfigEntry *e;
669 e = findEntry (cfg, section, option);
671 return GNUNET_SYSERR;
672 if (1 != SSCANF (e->val, "%llu", number))
673 return GNUNET_SYSERR;
679 * Get a configuration value that should be a relative time.
681 * @param cfg configuration to inspect
682 * @param section section of interest
683 * @param option option of interest
684 * @param time set to the time value stored in the configuration
685 * @return GNUNET_OK on success, GNUNET_SYSERR on error
688 GNUNET_CONFIGURATION_get_value_time (const struct GNUNET_CONFIGURATION_Handle
689 *cfg, const char *section,
691 struct GNUNET_TIME_Relative *time)
693 unsigned long long num;
696 ret = GNUNET_CONFIGURATION_get_value_number (cfg, section, option, &num);
697 if (ret == GNUNET_OK)
698 time->rel_value = (uint64_t) num;
704 * Get a configuration value that should be a string.
706 * @param cfg configuration to inspect
707 * @param section section of interest
708 * @param option option of interest
709 * @param value will be set to a freshly allocated configuration
710 * value, or NULL if option is not specified
711 * @return GNUNET_OK on success, GNUNET_SYSERR on error
714 GNUNET_CONFIGURATION_get_value_string (const struct
715 GNUNET_CONFIGURATION_Handle *cfg,
717 const char *option, char **value)
719 struct ConfigEntry *e;
721 e = findEntry (cfg, section, option);
722 if ((e == NULL) || (e->val == NULL))
725 return GNUNET_SYSERR;
727 *value = GNUNET_strdup (e->val);
733 * Get a configuration value that should be in a set of
736 * @param cfg configuration to inspect
737 * @param section section of interest
738 * @param option option of interest
739 * @param choices NULL-terminated list of legal values
740 * @param value will be set to an entry in the legal list,
741 * or NULL if option is not specified and no default given
742 * @return GNUNET_OK on success, GNUNET_SYSERR on error
745 GNUNET_CONFIGURATION_get_value_choice (const struct
746 GNUNET_CONFIGURATION_Handle *cfg,
749 const char **choices,
752 struct ConfigEntry *e;
755 e = findEntry (cfg, section, option);
757 return GNUNET_SYSERR;
759 while (choices[i] != NULL)
761 if (0 == strcasecmp (choices[i], e->val))
765 if (choices[i] == NULL)
767 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
768 _("Configuration value '%s' for '%s'"
769 " in section '%s' is not in set of legal choices\n"),
770 e->val, option, section);
771 return GNUNET_SYSERR;
779 * Test if we have a value for a particular option
780 * @param cfg configuration to inspect
781 * @param section section of interest
782 * @param option option of interest
783 * @return GNUNET_YES if so, GNUNET_NO if not.
786 GNUNET_CONFIGURATION_have_value (const struct GNUNET_CONFIGURATION_Handle
787 *cfg, const char *section,
790 struct ConfigEntry *e;
791 if ((NULL == (e = findEntry (cfg, section, option))) || (e->val == NULL))
798 * Expand an expression of the form "$FOO/BAR" to "DIRECTORY/BAR"
799 * where either in the "PATHS" section or the environtment
800 * "FOO" is set to "DIRECTORY".
802 * @param cfg configuration to use for path expansion
803 * @param orig string to $-expand (will be freed!)
804 * @return $-expanded string
807 GNUNET_CONFIGURATION_expand_dollar (const struct GNUNET_CONFIGURATION_Handle
819 while ((orig[i] != '/') && (orig[i] != '\\') && (orig[i] != '\0'))
830 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg,
834 if (NULL == (env = getenv (&orig[1])))
836 orig[i] = DIR_SEPARATOR;
839 prefix = GNUNET_strdup (env);
841 result = GNUNET_malloc (strlen (prefix) + strlen (post) + 2);
842 strcpy (result, prefix);
843 if ((strlen (prefix) == 0) ||
844 ((prefix[strlen (prefix) - 1] != DIR_SEPARATOR) && (strlen (post) > 0)))
845 strcat (result, DIR_SEPARATOR_STR);
846 strcat (result, post);
847 GNUNET_free (prefix);
854 * Get a configuration value that should be a string.
856 * @param cfg configuration to inspect
857 * @param section section of interest
858 * @param option option of interest
859 * @param value will be set to a freshly allocated configuration
860 * value, or NULL if option is not specified
861 * @return GNUNET_OK on success, GNUNET_SYSERR on error
864 GNUNET_CONFIGURATION_get_value_filename (const struct
865 GNUNET_CONFIGURATION_Handle *cfg,
867 const char *option, char **value)
872 GNUNET_CONFIGURATION_get_value_string (cfg, section, option, &tmp))
875 return GNUNET_SYSERR;
877 tmp = GNUNET_CONFIGURATION_expand_dollar (cfg, tmp);
878 *value = GNUNET_STRINGS_filename_expand (tmp);
881 return GNUNET_SYSERR;
887 * Get a configuration value that should be in a set of
888 * "GNUNET_YES" or "GNUNET_NO".
890 * @param cfg configuration to inspect
891 * @param section section of interest
892 * @param option option of interest
893 * @return GNUNET_YES, GNUNET_NO or GNUNET_SYSERR
896 GNUNET_CONFIGURATION_get_value_yesno (const struct GNUNET_CONFIGURATION_Handle
897 *cfg, const char *section,
900 static const char *yesno[] = { "YES", "NO", NULL };
904 ret = GNUNET_CONFIGURATION_get_value_choice (cfg,
905 section, option, yesno, &val);
906 if (ret == GNUNET_SYSERR)
915 * Iterate over the set of filenames stored in a configuration value.
917 * @param cfg configuration to inspect
918 * @param section section of interest
919 * @param option option of interest
920 * @param cb function to call on each filename
921 * @param cb_cls closure for cb
922 * @return number of filenames iterated over, -1 on error
925 GNUNET_CONFIGURATION_iterate_value_filenames (const struct
926 GNUNET_CONFIGURATION_Handle
927 *cfg, const char *section,
929 GNUNET_FileNameCallback cb,
939 GNUNET_CONFIGURATION_get_value_string (cfg, section, option, &list))
941 GNUNET_assert (list != NULL);
946 while (pos[0] == ' ')
948 if (strlen (pos) == 0)
951 while ((end[0] != ' ') && (end[0] != '\0'))
959 memmove (end, &end[1], strlen (&end[1]) + 1);
961 /* illegal, but just keep it */
964 /* illegal, but just ignore that there was a '/' */
972 if (strlen (pos) > 0)
975 if ((cb != NULL) && (GNUNET_OK != cb (cb_cls, pos)))
997 escape_name (const char *value)
1003 escaped = GNUNET_malloc (strlen (value) * 2 + 1);
1004 memset (escaped, 0, strlen (value) * 2 + 1);
1007 while (rpos[0] != '\0')
1030 * @param cls string we compare with (const char*)
1031 * @param fn filename we are currently looking at
1032 * @return GNUNET_OK if the names do not match, GNUNET_SYSERR if they do
1035 test_match (void *cls, const char *fn)
1037 const char *of = cls;
1038 return (0 == strcmp (of, fn)) ? GNUNET_SYSERR : GNUNET_OK;
1043 * Append a filename to a configuration value that
1044 * represents a list of filenames
1046 * @param cfg configuration to update
1047 * @param section section of interest
1048 * @param option option of interest
1049 * @param value filename to append
1050 * @return GNUNET_OK on success,
1051 * GNUNET_NO if the filename already in the list
1052 * GNUNET_SYSERR on error
1055 GNUNET_CONFIGURATION_append_value_filename (struct GNUNET_CONFIGURATION_Handle
1057 const char *section,
1066 == GNUNET_CONFIGURATION_iterate_value_filenames (cfg,
1071 return GNUNET_NO; /* already exists */
1073 GNUNET_CONFIGURATION_get_value_string (cfg, section, option, &old))
1074 old = GNUNET_strdup ("");
1075 escaped = escape_name (value);
1076 nw = GNUNET_malloc (strlen (old) + strlen (escaped) + 2);
1078 if (strlen (old) > 0)
1080 strcat (nw, escaped);
1081 GNUNET_CONFIGURATION_set_value_string (cfg, section, option, nw);
1084 GNUNET_free (escaped);
1090 * Remove a filename from a configuration value that
1091 * represents a list of filenames
1093 * @param cfg configuration to update
1094 * @param section section of interest
1095 * @param option option of interest
1096 * @param value filename to remove
1097 * @return GNUNET_OK on success,
1098 * GNUNET_NO if the filename is not in the list,
1099 * GNUNET_SYSERR on error
1102 GNUNET_CONFIGURATION_remove_value_filename (struct GNUNET_CONFIGURATION_Handle
1104 const char *section,
1115 GNUNET_CONFIGURATION_get_value_string (cfg, section, option, &list))
1117 match = escape_name (value);
1121 while (pos[0] == ' ')
1123 if (strlen (pos) == 0)
1126 while ((end[0] != ' ') && (end[0] != '\0'))
1137 /* illegal, but just keep it */
1140 /* illegal, but just ignore that there was a '/' */
1148 if (0 == strcmp (pos, match))
1151 memmove (pos, &end[1], strlen (&end[1]) + 1);
1159 GNUNET_CONFIGURATION_set_value_string (cfg,
1160 section, option, list);
1162 GNUNET_free (match);
1171 GNUNET_free (match);
1177 * Load configuration (starts with defaults, then loads
1178 * system-specific configuration).
1180 * @param cfg configuration to update
1181 * @param filename name of the configuration file, NULL to load defaults
1182 * @return GNUNET_OK on success, GNUNET_SYSERR on error
1185 GNUNET_CONFIGURATION_load (struct GNUNET_CONFIGURATION_Handle *cfg,
1186 const char *filename)
1191 ipath = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_DATADIR);
1193 return GNUNET_SYSERR;
1195 GNUNET_asprintf (&baseconfig,
1196 "%s%s%s", ipath, DIR_SEPARATOR_STR, "defaults.conf");
1197 GNUNET_free (ipath);
1199 GNUNET_CONFIGURATION_parse (cfg, baseconfig)) ||
1200 (!((filename == NULL) ||
1201 (GNUNET_OK == GNUNET_CONFIGURATION_parse (cfg, filename)))))
1203 GNUNET_free (baseconfig);
1204 return (filename == NULL) ? GNUNET_OK : GNUNET_SYSERR;
1206 GNUNET_free (baseconfig);
1207 if ( ((GNUNET_YES != GNUNET_CONFIGURATION_have_value (cfg,
1209 "DEFAULTCONFIG"))) &&
1210 (filename != NULL) )
1211 GNUNET_CONFIGURATION_set_value_string (cfg,
1215 if ((GNUNET_YES == GNUNET_CONFIGURATION_have_value (cfg,
1218 (GNUNET_YES == GNUNET_CONFIGURATION_get_value_yesno (cfg,
1221 GNUNET_CRYPTO_random_disable_entropy_gathering ();
1227 /* end of configuration.c */