* @author Christian Grothoff
*/
#include "platform.h"
-#include "gnunet_common.h"
-#include "gnunet_configuration_lib.h"
-#include "gnunet_crypto_lib.h"
-#include "gnunet_directories.h"
-#include "gnunet_disk_lib.h"
-#include "gnunet_getopt_lib.h"
-#include "gnunet_os_lib.h"
+#include "gnunet_util_lib.h"
#include "gnunet_protocols.h"
+#include "gnunet_directories.h"
#include "gnunet_resolver_service.h"
-#include "gnunet_server_lib.h"
-#include "gnunet_service_lib.h"
#if HAVE_MALLINFO
#include <malloc.h>
* with a semicolon). The network must be given in dotted-decimal
* notation. The netmask can be given in CIDR notation (/16) or
* in dotted-decimal (/255.255.0.0).
- *
+ *
* @param routeList a string specifying the forbidden networks
* @return the converted list, NULL if the synatx is flawed
*/
* with a semicolon). The network must be given in colon-hex
* notation. The netmask must be given in CIDR notation (/16) or
* can be omitted to specify a single host.
- *
+ *
* @param routeListX a string specifying the forbidden networks
* @return the converted list, NULL if the synatx is flawed
*/
#ifndef WINDOWS
case AF_UNIX:
ret = GNUNET_OK; /* always OK for now */
- if (GNUNET_YES == sctx->match_uid)
+ if (GNUNET_YES == sctx->match_uid)
{
/* UID match required */
ret = (NULL != uc) && ( (0 == uc->uid) || (uc->uid == geteuid ()) );
}
else if ( (GNUNET_YES == sctx->match_gid) &&
- ( (NULL == uc) ||
+ ( (NULL == uc) ||
( (0 != uc->uid) &&
(uc->uid != geteuid ()) ) ) )
{
/* group match required and UID does not match */
- if (NULL == uc)
+ if (NULL == uc)
{
/* no credentials, group match not possible */
ret = GNUNET_NO;
if (GNUNET_OK != ret)
{
LOG (GNUNET_ERROR_TYPE_WARNING,
- _("Access from `%s' denied to service `%s'\n"),
+ _("Access from `%s' denied to service `%s'\n"),
GNUNET_a2s (addr, addrlen),
sctx->service_name);
}
* Parse an IPv4 access control list.
*
* @param ret location where to write the ACL (set)
- * @param sctx service context to use to get the configuration
+ * @param sctx service context to use to get the configuration
* @param option name of the ACL option to parse
- * @return GNUNET_SYSERR on parse error, GNUNET_OK on success (including
+ * @return GNUNET_SYSERR on parse error, GNUNET_OK on success (including
* no ACL configured)
*/
static int
if (!GNUNET_CONFIGURATION_have_value (sctx->cfg, sctx->service_name, option))
{
- *ret = NULL;
+ *ret = NULL;
return GNUNET_OK;
}
GNUNET_break (GNUNET_OK ==
* Parse an IPv6 access control list.
*
* @param ret location where to write the ACL (set)
- * @param sctx service context to use to get the configuration
+ * @param sctx service context to use to get the configuration
* @param option name of the ACL option to parse
- * @return GNUNET_SYSERR on parse error, GNUNET_OK on success (including
+ * @return GNUNET_SYSERR on parse error, GNUNET_OK on success (including
* no ACL configured)
*/
static int
#if HAVE_MALLINFO
{
char *counter;
-
+
if ( (GNUNET_YES ==
GNUNET_CONFIGURATION_have_value (sctx.cfg, service_name,
"GAUGER_HEAP")) &&
&counter)) )
{
struct mallinfo mi;
-
+
mi = mallinfo ();
GAUGER (service_name, counter, mi.usmblks, "blocks");
GNUNET_free (counter);
- }
+ }
}
#endif
GNUNET_SPEEDUP_stop_ ();
#if HAVE_MALLINFO
{
char *counter;
-
+
if ( (GNUNET_YES ==
GNUNET_CONFIGURATION_have_value (sctx->cfg, sctx->service_name,
"GAUGER_HEAP")) &&
&counter)) )
{
struct mallinfo mi;
-
+
mi = mallinfo ();
GAUGER (sctx->service_name, counter, mi.usmblks, "blocks");
GNUNET_free (counter);
- }
+ }
}
#endif
if (GNUNET_SCHEDULER_NO_TASK != sctx->shutdown_task)