summaryrefslogtreecommitdiffabout
path: root/src
Side-by-side diff
Diffstat (limited to 'src') (more/less context) (ignore whitespace changes)
-rw-r--r--src/Makefile.am2
-rw-r--r--src/acl.c2
-rw-r--r--src/acl.h2
-rw-r--r--src/cmdline.opt2
-rw-r--r--src/comp.c65
-rw-r--r--src/ctl.c2
-rw-r--r--src/depmap.c22
-rw-r--r--src/diag.c2
-rw-r--r--src/inetd-bi.c2
-rw-r--r--src/inetd.c2
-rw-r--r--src/inetd.in2
-rw-r--r--src/limits.c2
-rw-r--r--src/meta1parse.c2
-rw-r--r--src/pies.c2
-rw-r--r--src/pies.h2
-rw-r--r--src/piesctl-cl.opt2
-rw-r--r--src/piesctl.c2
-rw-r--r--src/pp-setup2
-rw-r--r--src/prog.h2
-rw-r--r--src/progman.c2
-rw-r--r--src/socket.c2
-rw-r--r--src/sysdep.c2
-rw-r--r--src/sysvinit.c2
-rw-r--r--src/telinit.opt2
-rw-r--r--src/userprivs.c2
-rw-r--r--src/utmp.c2
26 files changed, 65 insertions, 70 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 8759451..16f8a75 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GNU Pies.
-# Copyright (C) 2008-2017 Sergey Poznyakoff
+# Copyright (C) 2008-2019 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
diff --git a/src/acl.c b/src/acl.c
index 0086932..098edf4 100644
--- a/src/acl.c
+++ b/src/acl.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Pies
- Copyright (C) 2009-2017 Sergey Poznyakoff
+ Copyright (C) 2009-2019 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
diff --git a/src/acl.h b/src/acl.h
index e786a84..6a68421 100644
--- a/src/acl.h
+++ b/src/acl.h
@@ -1,5 +1,5 @@
/* This file is part of GNU Pies
- Copyright (C) 2009-2017 Sergey Poznyakoff
+ Copyright (C) 2009-2019 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
diff --git a/src/cmdline.opt b/src/cmdline.opt
index 57f5b90..ff560be 100644
--- a/src/cmdline.opt
+++ b/src/cmdline.opt
@@ -1,5 +1,5 @@
/* This file is part of GNU Pies. -*- c -*-
- Copyright (C) 2008-2017 Sergey Poznyakoff
+ Copyright (C) 2008-2019 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
diff --git a/src/comp.c b/src/comp.c
index fcd0a14..c3e998a 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Pies.
- Copyright (C) 2016-2017 Sergey Poznyakoff
+ Copyright (C) 2016-2019 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
@@ -50,7 +50,7 @@ component_link (struct component *comp, struct component *ref)
if (!ref)
{
struct complist *list = &comp_list[comp->listidx];
-
+
comp->prev = NULL;
comp->next = list->head;
if (list->head)
@@ -68,7 +68,7 @@ component_link (struct component *comp, struct component *ref)
comp->prev = ref;
comp->next = ref->next;
-
+
if ((x = ref->next))
x->prev = comp;
else
@@ -89,7 +89,7 @@ component_unlink (struct component *comp)
{
struct complist *list = &comp_list[comp->listidx];
struct component *x;
-
+
if ((x = comp->prev))
x->next = comp->next;
else
@@ -98,7 +98,7 @@ component_unlink (struct component *comp)
x->prev = comp->prev;
else
list->tail = comp->prev;
-}
+}
int
component_list_is_empty (void)
@@ -129,7 +129,7 @@ component_lookup_index (const char *tag)
return i;
return -1;
}
-
+
struct component *
component_create (const char *name)
{
@@ -208,10 +208,10 @@ static int
argvcmp (char **a, char **b)
{
size_t i;
-
+
if (!a != !b)
return 1;
-
+
for (i = 0; a[i]; i++)
if (!b[i] || strcmp (b[i], a[i]))
return 1;
@@ -250,7 +250,7 @@ redirector_cmp (struct redirector const *a, struct redirector const *b)
return 0;
}
-
+
static int
component_match (struct component *comp, struct component *ref)
{
@@ -258,7 +258,7 @@ component_match (struct component *comp, struct component *ref)
#define EQ(memb) MATCH (comp->memb != ref->memb)
#define FN(memb,fun) MATCH (fun (comp->memb, ref->memb))
#define FNP(memb,fun) MATCH (fun (&comp->memb, &ref->memb))
-
+
EQ (mode);
FN (tag, safe_strcmp);
FN (program, safe_strcmp);
@@ -299,7 +299,7 @@ complist_find_match (int idx, struct component *ref)
{
struct complist *list = &comp_list[idx];
struct component *comp;
-
+
for (comp = list->head; comp && component_match (comp, ref);
comp = comp->next)
;
@@ -331,7 +331,7 @@ component_merge (struct component *comp, struct component *ref)
pies_acl_free (comp->list_acl);
comp->list_acl = ref->list_acl;
ref->list_acl = NULL;
-
+
pies_acl_free (comp->adm_acl);
comp->adm_acl = ref->adm_acl;
ref->adm_acl = NULL;
@@ -396,13 +396,13 @@ static void
report_cyclic_dependency (pies_depmap_t dp, size_t idx)
{
size_t i;
-
+
i = idx;
do
{
size_t n;
pies_depmap_pos_t pos;
-
+
logmsg_printf (LOG_NOTICE, "%s -> ", comp_array[i]->tag);
comp_array[i]->flags |= CF_REMOVE;
for (n = depmap_first (depmap, depmap_col, i, &pos);
@@ -422,7 +422,7 @@ report_cyclic_dependency (pies_depmap_t dp, size_t idx)
}
while (i != idx);
logmsg_printf (LOG_NOTICE, "%s\n", comp_array[idx]->tag);
-}
+}
void
comp_array_remove (size_t i)
@@ -440,7 +440,7 @@ component_build_depmap (void)
{
size_t i;
pies_depmap_t dp;
-
+
free (depmap);
depmap = depmap_alloc (comp_count);
for (i = 0; i < comp_count; )
@@ -465,7 +465,7 @@ component_build_depmap (void)
}
depmap_set (depmap, i, tgt);
}
-
+
if (comp->depend)
for (ep = comp->depend->head; ep; ep = ep->next)
{
@@ -480,7 +480,7 @@ component_build_depmap (void)
}
depmap_set (depmap, tgt, i);
}
-
+
i++;
}
@@ -494,7 +494,7 @@ component_build_depmap (void)
report_cyclic_dependency (dp, i);
}
-
+
for (i = 0; i < comp_count;)
if (comp_array[i]->flags & CF_REMOVE)
{
@@ -503,7 +503,7 @@ component_build_depmap (void)
}
else
i++;
-
+
free (dp);
}
@@ -552,7 +552,7 @@ component_config_commit (void)
progman_foreach (mark_prog, NULL);
pies_schedule_children (PIES_CHLD_GC);
}
-
+
/* Build dependency map */
component_build_depmap ();
@@ -603,7 +603,7 @@ component_verify (struct component *comp, grecs_locus_t *locus)
else if (!comp->argv)
COMPERR (grecs_error,
"%s", _("missing command line"));
-
+
if (ISCF_TCPMUX (comp->flags))
{
comp->mode = pies_comp_inetd;
@@ -616,7 +616,7 @@ component_verify (struct component *comp, grecs_locus_t *locus)
COMPERR (grecs_error,
"%s", _("\"internal\" used without \"service\""));
}
-
+
if (comp->pass_fd_socket && comp->mode != pies_comp_pass_fd)
COMPERR (grecs_error,
"%s", _("pass-fd-socket ignored: wrong mode"));
@@ -627,7 +627,7 @@ component_verify (struct component *comp, grecs_locus_t *locus)
COMPERR (grecs_error,
"%s", _("socket ignored: wrong mode"));
break;
-
+
case pies_comp_pass_fd:
if (!comp->pass_fd_socket)
COMPERR (grecs_error,
@@ -646,7 +646,7 @@ component_verify (struct component *comp, grecs_locus_t *locus)
"file name or chdir must be specified"));
}
/* Fall through */
-
+
case pies_comp_accept:
if (!comp->socket_url)
{
@@ -655,7 +655,7 @@ component_verify (struct component *comp, grecs_locus_t *locus)
return 1;
}
break;
-
+
case pies_comp_inetd:
if (ISCF_TCPMUX (comp->flags))
{
@@ -714,7 +714,7 @@ component_verify (struct component *comp, grecs_locus_t *locus)
default:
break;
}
-
+
for (i = RETR_OUT; i <= RETR_ERR; i++)
{
if (comp->redir[i].type == redir_file
@@ -733,7 +733,7 @@ component_verify (struct component *comp, grecs_locus_t *locus)
comp->redir[i].v.file);
}
}
-
+
return header;
#undef COMPERR
}
@@ -747,7 +747,7 @@ component_finish (struct component *comp, grecs_locus_t *locus)
comp->depend->cmp = list_str_cmp;
if (comp->privs.groups)
comp->privs.groups->cmp = list_str_cmp;
-
+
if (component_verify (comp, locus))
{
component_free (comp);
@@ -817,7 +817,7 @@ component_trace (size_t idx, enum pies_depmap_direction dir)
pies_depmap_pos_t pos;
size_t n;
int delim = ':';
-
+
logmsg_printf (LOG_NOTICE, "%s", comp_array[idx]->tag);
for (n = depmap_first (depmap, dir, idx, &pos);
n != (size_t)-1;
@@ -886,8 +886,3 @@ component_foreach (int (*filter) (struct component *, void *), void *data)
}
return rc;
}
-
-
-
-
-
diff --git a/src/ctl.c b/src/ctl.c
index 475fda6..a78cdbf 100644
--- a/src/ctl.c
+++ b/src/ctl.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Pies.
- Copyright (C) 2007-2017 Sergey Poznyakoff
+ Copyright (C) 2007-2019 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
diff --git a/src/depmap.c b/src/depmap.c
index cb50548..d2bf536 100644
--- a/src/depmap.c
+++ b/src/depmap.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Pies.
- Copyright (C) 2008-2013, 2016-2017 Sergey Poznyakoff
+ Copyright (C) 2008-2019 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
@@ -50,14 +50,14 @@ TC (unsigned *R, int n)
{
ccol = cword;
rowj = R;
-
+
while (rowj < relend)
{
if (*ccol & mask)
{
rp = rowi;
rend = (unsigned *) ((char *) rowj + rowsize);
-
+
while (rowj < rend)
*rowj++ |= *rp++;
}
@@ -65,10 +65,10 @@ TC (unsigned *R, int n)
{
rowj = (unsigned *) ((char *) rowj + rowsize);
}
-
+
ccol = (unsigned *) ((char *) ccol + rowsize);
}
-
+
mask <<= 1;
if (mask == 0)
{
@@ -85,12 +85,12 @@ struct pies_depmap
size_t rowlen; /* Length of a row in words */
unsigned r[1]; /* Data rows */
};
-
+
pies_depmap_t
depmap_alloc (size_t count)
{
size_t size = (count + BITS_PER_WORD - 1) / BITS_PER_WORD;
- pies_depmap_t dmap = grecs_zalloc (sizeof (*dmap) - 1
+ pies_depmap_t dmap = grecs_zalloc (sizeof (*dmap) - 1
+ count * size * sizeof (unsigned));
dmap->nrows = count;
dmap->rowlen = size;
@@ -102,7 +102,7 @@ static inline size_t
depmap_row_size (pies_depmap_t dpm)
{
return dpm->rowlen * sizeof (unsigned);
-}
+}
pies_depmap_t
depmap_copy (pies_depmap_t dpm)
@@ -158,9 +158,9 @@ depmap_next (pies_depmap_t dmap, pies_depmap_pos_t pos)
pos->coord[pos->dir]++)
if (depmap_isset (dmap, pos->coord[0], pos->coord[1]))
break;
-
+
return pos->coord[pos->dir] == dmap->nrows ?
- (size_t) -1 : pos->coord[pos->dir];
+ (size_t) -1 : pos->coord[pos->dir];
}
size_t
@@ -188,7 +188,7 @@ depmap_remove (pies_depmap_t dmap, size_t n)
if (n < dmap->nrows - 1)
{
size_t i, j;
-
+
/* Remove nth row */
memmove (depmap_rowptr (dmap, n), depmap_rowptr (dmap, n + 1),
(dmap->nrows - n - 1) * depmap_row_size (dmap));
diff --git a/src/diag.c b/src/diag.c
index 4558398..78e2741 100644
--- a/src/diag.c
+++ b/src/diag.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Pies.
- Copyright (C) 2009-2013, 2017 Sergey Poznyakoff
+ Copyright (C) 2009-2019 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
diff --git a/src/inetd-bi.c b/src/inetd-bi.c
index a6b23a3..dace111 100644
--- a/src/inetd-bi.c
+++ b/src/inetd-bi.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Pies.
- Copyright (C) 2009-2010, 2013, 2017 Sergey Poznyakoff
+ Copyright (C) 2009-2019 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
diff --git a/src/inetd.c b/src/inetd.c
index 23dc2a5..6214775 100644
--- a/src/inetd.c
+++ b/src/inetd.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Pies.
- Copyright (C) 2009-2011, 2013, 2016-2017 Sergey Poznyakoff
+ Copyright (C) 2009-2019 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
diff --git a/src/inetd.in b/src/inetd.in
index bbed7f1..add5a7c 100644
--- a/src/inetd.in
+++ b/src/inetd.in
@@ -1,6 +1,6 @@
#! /bin/sh
# This file is part of GNU Pies.
-# Copyright (C) 2008-2010, 2013, 2017 Sergey Poznyakoff
+# Copyright (C) 2008-2019 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
diff --git a/src/limits.c b/src/limits.c
index 9664c1b..cb2697f 100644
--- a/src/limits.c
+++ b/src/limits.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Pies.
- Copyright (C) 2008-2010, 2013, 2016-2017 Sergey Poznyakoff
+ Copyright (C) 2008-2019 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
diff --git a/src/meta1parse.c b/src/meta1parse.c
index bf7bea2..6cf97ca 100644
--- a/src/meta1parse.c
+++ b/src/meta1parse.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Pies.
- Copyright (C) 2016-2017 Sergey Poznyakoff
+ Copyright (C) 2016-2019 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
diff --git a/src/pies.c b/src/pies.c
index cf26050..89c0b7e 100644
--- a/src/pies.c
+++ b/src/pies.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Pies.
- Copyright (C) 2008-2011, 2013-2017 Sergey Poznyakoff
+ Copyright (C) 2008-2019 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
diff --git a/src/pies.h b/src/pies.h
index e7e5d71..a7f6567 100644
--- a/src/pies.h
+++ b/src/pies.h
@@ -1,5 +1,5 @@
/* This file is part of GNU Pies.
- Copyright (C) 2008-2011, 2013-2017 Sergey Poznyakoff
+ Copyright (C) 2008-2019 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
diff --git a/src/piesctl-cl.opt b/src/piesctl-cl.opt
index 37d9da8..f7eaf2a 100644
--- a/src/piesctl-cl.opt
+++ b/src/piesctl-cl.opt
@@ -1,5 +1,5 @@
/* This file is part of GNU Pies. -*- c -*-
- Copyright (C) 2008-2017 Sergey Poznyakoff
+ Copyright (C) 2008-2019 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
diff --git a/src/piesctl.c b/src/piesctl.c
index 44bd263..f2e774b 100644
--- a/src/piesctl.c
+++ b/src/piesctl.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Pies.
- Copyright (C) 2015-2017 Sergey Poznyakoff
+ Copyright (C) 2015-2019 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
diff --git a/src/pp-setup b/src/pp-setup
index c3fce62..3621d9c 100644
--- a/src/pp-setup
+++ b/src/pp-setup
@@ -1,6 +1,6 @@
divert(-1) dnl -*- m4 -*-
# This file is part of GNU Pies.
-# Copyright (C) 2007-2010, 2013, 2017 Sergey Poznyakoff
+# Copyright (C) 2007-2019 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
diff --git a/src/prog.h b/src/prog.h
index 39f65a5..9a3960f 100644
--- a/src/prog.h
+++ b/src/prog.h
@@ -1,5 +1,5 @@
/* This file is part of GNU Pies.
- Copyright (C) 2008-2013, 2017 Sergey Poznyakoff
+ Copyright (C) 2008-2019 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
diff --git a/src/progman.c b/src/progman.c
index a502766..1b09cd5 100644
--- a/src/progman.c
+++ b/src/progman.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Pies.
- Copyright (C) 2007-2017 Sergey Poznyakoff
+ Copyright (C) 2007-2019 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
diff --git a/src/socket.c b/src/socket.c
index e32781d..aa01543 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Pies.
- Copyright (C) 2007-2010, 2013, 2016-2017 Sergey Poznyakoff
+ Copyright (C) 2007-2019 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
diff --git a/src/sysdep.c b/src/sysdep.c
index a3dcbe9..24edb49 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Pies.
- Copyright (C) 2014, 2017 Sergey Poznyakoff
+ Copyright (C) 2014-2019 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
diff --git a/src/sysvinit.c b/src/sysvinit.c
index a33fab7..3ba986b 100644
--- a/src/sysvinit.c
+++ b/src/sysvinit.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Pies.
- Copyright (C) 2013-2017 Sergey Poznyakoff
+ Copyright (C) 2013-2019 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
diff --git a/src/telinit.opt b/src/telinit.opt
index 2064da0..72e433c 100644
--- a/src/telinit.opt
+++ b/src/telinit.opt
@@ -1,5 +1,5 @@
/* This file is part of GNU Pies. -*- c -*-
- Copyright (C) 2016-2017 Sergey Poznyakoff
+ Copyright (C) 2016-2019 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
diff --git a/src/userprivs.c b/src/userprivs.c
index 0a2b5bf..8ef75af 100644
--- a/src/userprivs.c
+++ b/src/userprivs.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Pies.
- Copyright (C) 2007-2011, 2013, 2016-2017 Sergey Poznyakoff
+ Copyright (C) 2007-2019 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
diff --git a/src/utmp.c b/src/utmp.c
index a31d9fb..4a1e746 100644
--- a/src/utmp.c
+++ b/src/utmp.c
@@ -1,5 +1,5 @@
/* This file is part of GNU Pies.
- Copyright (C) 2013, 2017 Sergey Poznyakoff
+ Copyright (C) 2013-2019 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

Return to:

Send suggestions and report system problems to the System administrator.