aboutsummaryrefslogtreecommitdiff
path: root/src/acl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/acl.c')
-rw-r--r--src/acl.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/acl.c b/src/acl.c
index 94dd561..412f3ac 100644
--- a/src/acl.c
+++ b/src/acl.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Pies
- Copyright (C) 2009-2013 Sergey Poznyakoff
+ Copyright (C) 2009-2016 Sergey Poznyakoff
GNU Pies is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -111,8 +111,8 @@ acl_free_entry (void *p)
pies_acl_t
pies_acl_create (const char *name, grecs_locus_t *locus)
{
- pies_acl_t acl = xmalloc (sizeof (acl[0]));
- acl->name = name ? xstrdup (name) : NULL;
+ pies_acl_t acl = grecs_malloc (sizeof (acl[0]));
+ acl->name = name ? grecs_strdup (name) : NULL;
grecs_locus_copy (&acl->locus, locus);
acl->list = grecs_list_create ();
acl->list->free_entry = acl_free_entry;
@@ -131,7 +131,7 @@ pies_acl_free (pies_acl_t acl)
static struct pies_sockaddr *
create_acl_sockaddr (int family, int len)
{
- struct pies_sockaddr *p = xzalloc (sizeof (*p));
+ struct pies_sockaddr *p = grecs_zalloc (sizeof (*p));
p->salen = len;
p->sa.sa_family = family;
return p;
@@ -369,18 +369,18 @@ _parse_group (struct acl_entry *entry, size_t argc, grecs_value_t **argv)
}
if (argv[0]->type == GRECS_TYPE_STRING)
{
- entry->names = xcalloc (2, sizeof (entry->names[0]));
- entry->names[0] = xstrdup (argv[0]->v.string);
+ entry->names = grecs_calloc (2, sizeof (entry->names[0]));
+ entry->names[0] = grecs_strdup (argv[0]->v.string);
entry->names[1] = NULL;
}
else
{
size_t i;
struct grecs_list_entry *ep;
- entry->names = xcalloc (argv[0]->v.list->count + 1,
- sizeof (entry->names[0]));
+ entry->names = grecs_calloc (argv[0]->v.list->count + 1,
+ sizeof (entry->names[0]));
for (i = 0, ep = argv[0]->v.list->head; ep; ep = ep->next, ++i)
- entry->names[i] = xstrdup (ep->data);
+ entry->names[i] = grecs_strdup (ep->data);
entry->names[i] = NULL;
}
argc--;
@@ -404,7 +404,7 @@ int
parse_acl_line (grecs_locus_t *locus, int allow, pies_acl_t acl,
grecs_value_t *value)
{
- struct acl_entry *entry = xzalloc (sizeof (*entry));
+ struct acl_entry *entry = grecs_zalloc (sizeof (*entry));
grecs_locus_copy (&entry->locus, locus);
entry->allow = allow;
@@ -742,7 +742,7 @@ pies_acl_install (pies_acl_t acl)
NULL,
acl_free);
if (!acl_table)
- xalloc_die ();
+ grecs_alloc_die ();
}
ret = grecs_symtab_lookup_or_install (acl_table, acl, &install);

Return to:

Send suggestions and report system problems to the System administrator.