From: <ew...@us...> - 2007-10-19 19:58:30
|
Revision: 2661 http://selinux.svn.sourceforge.net/selinux/?rev=2661&view=rev Author: ewalsh Date: 2007-10-19 12:58:28 -0700 (Fri, 19 Oct 2007) Log Message: ----------- Author: Eamon Walsh Email: ew...@ty... Subject: libselinux: add "event" type to X contexts backend Date: Fri, 19 Oct 2007 15:39:38 -0400 Here is a revised version of the patch that adds not one but two backends, one for X event names and one for X "selections" which are the clipboard objects used in cut & paste. This is so the X Flask module can support labeling these objects based on their names. Signed-off-by: Eamon Walsh <ew...@ty...> Acked-by: Stephen Smalley <sd...@ty...> Modified Paths: -------------- trunk/libselinux/include/selinux/label.h trunk/libselinux/src/label_x.c Modified: trunk/libselinux/include/selinux/label.h =================================================================== --- trunk/libselinux/include/selinux/label.h 2007-10-15 16:49:14 UTC (rev 2660) +++ trunk/libselinux/include/selinux/label.h 2007-10-19 19:58:28 UTC (rev 2661) @@ -111,6 +111,8 @@ #define SELABEL_X_PROP 1 #define SELABEL_X_EXT 2 #define SELABEL_X_CLIENT 3 +#define SELABEL_X_EVENT 4 +#define SELABEL_X_SELN 5 #ifdef __cplusplus Modified: trunk/libselinux/src/label_x.c =================================================================== --- trunk/libselinux/src/label_x.c 2007-10-15 16:49:14 UTC (rev 2660) +++ trunk/libselinux/src/label_x.c 2007-10-19 19:58:28 UTC (rev 2661) @@ -65,9 +65,13 @@ data->spec_arr[data->nspec].type = SELABEL_X_EXT; else if (!strcmp(type, "client")) data->spec_arr[data->nspec].type = SELABEL_X_CLIENT; + else if (!strcmp(type, "event")) + data->spec_arr[data->nspec].type = SELABEL_X_EVENT; + else if (!strcmp(type, "selection")) + data->spec_arr[data->nspec].type = SELABEL_X_SELN; else { selinux_log(SELINUX_WARNING, - "%s: line %d has invalid file type %s\n", + "%s: line %d has invalid object type %s\n", path, lineno, type); return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |