aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
m---------grecs0
-rw-r--r--lib/parsetime.c2
-rw-r--r--src/acl.c8
-rw-r--r--src/meta1gram.y4
-rw-r--r--src/meta1lex.l2
-rw-r--r--src/pies.h2
-rw-r--r--src/progman.c13
-rw-r--r--src/sysvinit.c28
8 files changed, 17 insertions, 42 deletions
diff --git a/grecs b/grecs
-Subproject 13232cb8c0d7f099c0d57445f2995c60928b916
+Subproject 481198f01233e5e06e4f2ba2cb0d4a7c1b9acc7
diff --git a/lib/parsetime.c b/lib/parsetime.c
index 7fce266..feac307 100644
--- a/lib/parsetime.c
+++ b/lib/parsetime.c
@@ -92,7 +92,7 @@ parse_time_interval(const char *str, time_t *pint, const char **endp)
str = p;
if (*str) {
- if (rc = time_multiplier(str, &mul, &len))
+ if ((rc = time_multiplier(str, &mul, &len)))
break;
str += len;
} else
diff --git a/src/acl.c b/src/acl.c
index fb6adfb..94dd561 100644
--- a/src/acl.c
+++ b/src/acl.c
@@ -137,7 +137,7 @@ create_acl_sockaddr (int family, int len)
return p;
}
-/* allow|deny [all|authenticated|group <grp: list>]
+/* allow|deny [all|authenticated|group <grp: list>|user <usr: list>]
[acl <name: string>] [from <addr: list>] */
static int
@@ -560,12 +560,12 @@ deny_cb (enum grecs_callback_command cmd,
struct grecs_keyword acl_keywords[] = {
/* TRANSLATORS: only words within angle brackets are translatable */
- { "allow", N_("[all|authenticated|user <usr: list>|group <grp: list>] [from <addr: list>]"),
+ { "allow", N_("[all|authenticated|user <usr: list>|group <grp: list>] [acl <name: string>] [from <addr: list>]"),
N_("Allow access"),
grecs_type_string, GRECS_MULT, NULL, 0,
allow_cb },
/* TRANSLATORS: only words within angle brackets are translatable */
- { "deny", N_("[all|authenticated|user <usr: list>|group <grp: list>] [from <addr: list>]"),
+ { "deny", N_("[all|authenticated|user <usr: list>|group <grp: list>] [acl <name: string>] [from <addr: list>]"),
N_("Deny access"),
grecs_type_string, GRECS_MULT, NULL, 0,
deny_cb },
@@ -573,8 +573,6 @@ struct grecs_keyword acl_keywords[] = {
};
-
-
/* ACL verification */
#define S_UN_NAME(sa, salen) \
diff --git a/src/meta1gram.y b/src/meta1gram.y
index a5eb5f3..2f774d2 100644
--- a/src/meta1gram.y
+++ b/src/meta1gram.y
@@ -23,7 +23,7 @@
#include "grecs-locus.h"
#include "meta1lex.h"
#include "meta1gram.h"
-
+
#define META1_QUEUE_DIR() \
(meta1_queue_dir ? meta1_queue_dir : "/var/spool/meta1")
@@ -224,7 +224,7 @@ opt_sc : /* empty */
%%
int
-yyerror (char *s)
+yyerror (char const *s)
{
grecs_error (&yylloc, 0, "%s", s);
return 0;
diff --git a/src/meta1lex.l b/src/meta1lex.l
index bbe54a0..2aca914 100644
--- a/src/meta1lex.l
+++ b/src/meta1lex.l
@@ -1,4 +1,6 @@
/* MeTA1 configuration lexer for GNU Pies. -*- c -*- */
+%option nounput
+%option noinput
%top {
/* MeTA1 configuration lexer for GNU Pies.
Copyright (C) 2008, 2009, 2010, 2011, 2013 Sergey Poznyakoff
diff --git a/src/pies.h b/src/pies.h
index 3919703..69d324d 100644
--- a/src/pies.h
+++ b/src/pies.h
@@ -433,7 +433,7 @@ void free_limits (limits_record_t rec);
void meta1_parser_set_debug (void);
int meta1lex (void);
-int meta1error (char *s);
+int meta1error (char const *s);
int meta1parse (void);
diff --git a/src/progman.c b/src/progman.c
index 1ec5a8d..4864531 100644
--- a/src/progman.c
+++ b/src/progman.c
@@ -68,17 +68,6 @@ prog_lookup_by_pid (pid_t pid)
return prog;
}
-static struct prog *
-prog_lookup_by_socket (int fd)
-{
- struct prog *prog;
-
- for (prog = proghead; prog; prog = prog->next)
- if (IS_COMPONENT (prog) && prog->v.p.socket == fd)
- break;
- return prog;
-}
-
struct prog *
prog_lookup_by_tag (const char *tag)
{
@@ -680,7 +669,7 @@ add_env (const char *name, const char *value)
envsize = i + 4;
new_env = xcalloc (envsize, sizeof new_env[0]);
- for (i = 0; new_env[i] = environ[i]; i++)
+ for (i = 0; (new_env[i] = environ[i]); i++)
;
environ = new_env;
}
diff --git a/src/sysvinit.c b/src/sysvinit.c
index 614940c..4fd4559 100644
--- a/src/sysvinit.c
+++ b/src/sysvinit.c
@@ -24,16 +24,18 @@ enum boot_state
boot,
single,
normal,
- max_boot_state
};
static char *boot_state_name[] = {
- "sysinit",
- "boot",
- "single",
- "normal"
+ [sysinit] = "sysinit",
+ [boot] = "boot",
+ [single] = "single",
+ [normal] = "normal"
};
+#define max_boot_state sizeof(boot_state_name) / sizeof (boot_state_name[0])
+
+
static char boot_state_str[] = "#*s ";
static const char valid_runlevels[] = "0123456789S";
@@ -400,22 +402,6 @@ sysvinit_setenv (char const *data, int size)
static void create_fifo (void);
static int
-sysvinit_stop_filter (struct prog *prog, void *data)
-{
- switch (prog->v.p.status)
- {
- case status_enabled:
- case status_listener:
- prog_stop (prog, SIGTERM);
- prog->v.p.status = status_disabled; /* See FIXME, progman.c:2364 */
- break;
- default:
- break;
- }
- return 0;
-}
-
-static int
sysvinit_fifo_handler (int fd, void *data)
{
static size_t size;

Return to:

Send suggestions and report system problems to the System administrator.