aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2021-06-03 18:20:16 +0300
committerSergey Poznyakoff <gray@gnu.org>2021-06-03 18:35:42 +0300
commit5468d4012f55f7332c7c7df6dabb4fa1e157a3b5 (patch)
tree343896d13ad4d814609567d00a30a14cfd90d24e /src
parentd0aca5ad26a6fb86b1d8797823966f1aeb41b303 (diff)
downloadpies-5468d4012f55f7332c7c7df6dabb4fa1e157a3b5.tar.gz
pies-5468d4012f55f7332c7c7df6dabb4fa1e157a3b5.tar.bz2
Fix reloading of the configuration files.
* lib/envop.c (environ_free): Free the env block itself. (envop_cmp): New function. * lib/envop.h (envop_cmp): New proto. * src/comp.c (argvcmp): Fix segmentation fault that occurred when both a and b were NULL. (component_match): Compare command, envop, and umask.
Diffstat (limited to 'src')
-rw-r--r--src/comp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/comp.c b/src/comp.c
index 91663e4..1e75f6d 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -218,8 +218,10 @@ argvcmp (char **a, char **b)
{
size_t i;
- if (!a != !b)
- return 1;
+ if (!a)
+ return !!b;
+ else if (!b)
+ return !!a;
for (i = 0; a[i]; i++)
if (!b[i] || strcmp (b[i], a[i]))
@@ -271,8 +273,10 @@ component_match (struct component *comp, struct component *ref)
EQ (mode);
FN (tag, safe_strcmp);
FN (program, safe_strcmp);
+ FN (command, safe_strcmp);
EQ (argc);
FN (argv, argvcmp);
+ FN (envop, envop_cmp);
FN (dir, safe_strcmp);
FN (prereq, grecs_list_compare);
FN (depend, grecs_list_compare);
@@ -280,6 +284,7 @@ component_match (struct component *comp, struct component *ref)
EQ (max_instances);
FN (rmfile, safe_strcmp);
FNP (privs, pies_privs_cmp);
+ EQ (umask);
FN (limits, limits_cmp);
FN (runlevels, safe_strcmp);
EQ (max_rate);

Return to:

Send suggestions and report system problems to the System administrator.