[apparmor] [patch 17/26] Add the ability to mediate signals.
Seth Arnold
seth.arnold at canonical.com
Fri Apr 18 23:38:24 UTC 2014
On Tue, Apr 15, 2014 at 10:22:24AM -0700, john.johansen at canonical.com wrote:
> Add signal rules and make sure the parser encodes support for them
> if the supported feature set reports supporting them.
Acked-by: Seth Arnold <seth.arnold at canonical.com>
Would it make more sense to put "exists" as entry 0 in the following
tables? It is exercised by sending signal 0, so it'd make more sense to me
to pick the userspace number here.
Thanks
> +/* Signal names mapped to and internal ordering */
> +static struct signal_map { const char *name; int num; } signal_map[] = {
> + {"hup", 1},
> + {"int", 2},
> + {"quit", 3},
> + {"ill", 4},
> + {"trap", 5},
> + {"abrt", 6},
> + {"bus", 7},
> + {"fpe", 8},
> + {"kill", 9},
> + {"usr1", 10},
> + {"segv", 11},
> + {"usr2", 12},
> + {"pipe", 13},
> + {"alrm", 14},
> + {"term", 15},
> + {"stkflt", 16},
> + {"chld", 17},
> + {"cont", 18},
> + {"stop", 19},
> + {"stp", 20},
> + {"ttin", 21},
> + {"ttou", 22},
> + {"urg", 23},
> + {"xcpu", 24},
> + {"xfsz", 25},
> + {"vtalrm", 26},
> + {"prof", 27},
> + {"winch", 28},
> + {"io", 29},
> + {"pwr", 30},
> + {"sys", 31},
> + {"emt", 32},
> + {"exists", 35},
> +
> + /* terminate */
> + {NULL, 0}
> +};
> +
> +/* this table is ordered post sig_map[sig] mapping */
> +static const char *const sig_names[MAXMAPPED_SIG + 1] = {
> + "unknown",
> + "hup",
> + "int",
> + "quit",
> + "ill",
> + "trap",
> + "abrt",
> + "bus",
> + "fpe",
> + "kill",
> + "usr1",
> + "segv",
> + "usr2",
> + "pipe",
> + "alrm",
> + "term",
> + "stkflt",
> + "chld",
> + "cont",
> + "stop",
> + "stp",
> + "ttin",
> + "ttou",
> + "urg",
> + "xcpu",
> + "xfsz",
> + "vtalrm",
> + "prof",
> + "winch",
> + "io",
> + "pwr",
> + "sys",
> + "emt",
> + "lost",
> + "unused",
> +
> + "exists", /* always last existance test mapped to MAXMAPPED_SIG */
> +};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20140418/f4581262/attachment.pgp>
More information about the AppArmor
mailing list