All of lore.kernel.org
 help / color / mirror / Atom feed
From: KaiGai Kohei <kaigai@ak.jp.nec.com>
To: SE-Linux <selinux@tycho.nsa.gov>
Subject: [libselinux] add db_language support on label_db.c
Date: Thu, 06 Jan 2011 16:14:48 +0900	[thread overview]
Message-ID: <4D256BE8.2010704@ak.jp.nec.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 228 bytes --]

The attached patch add support db_language object class
to the selabel_lookup(_raw) interfaces.
It is needed to inform object manager initial label of
procedural language object.

Thanks,
-- 
KaiGai Kohei <kaigai@ak.jp.nec.com>

[-- Attachment #2: libselinux-selabel.1.patch --]
[-- Type: text/x-patch, Size: 941 bytes --]

diff --git a/libselinux/include/selinux/label.h b/libselinux/include/selinux/label.h
index 0435365..1a54307 100644
--- a/libselinux/include/selinux/label.h
+++ b/libselinux/include/selinux/label.h
@@ -128,6 +128,7 @@ void selabel_stats(struct selabel_handle *handle);
 #define SELABEL_DB_PROCEDURE	7
 #define SELABEL_DB_BLOB		8
 #define SELABEL_DB_TUPLE	9
+#define SELABEL_DB_LANGUAGE	10
 
 #ifdef __cplusplus
 }
diff --git a/libselinux/src/label_db.c b/libselinux/src/label_db.c
index e1bfab7..7afacf0 100644
--- a/libselinux/src/label_db.c
+++ b/libselinux/src/label_db.c
@@ -138,6 +138,8 @@ process_line(const char *path, char *line_buf, unsigned int line_num,
 		spec->type = SELABEL_DB_BLOB;
 	else if (!strcmp(type, "db_tuple"))
 		spec->type = SELABEL_DB_TUPLE;
+	else if (!strcmp(type, "db_language"))
+		spec->type = SELABEL_DB_LANGUAGE;
 	else {
 		selinux_log(SELINUX_WARNING,
 			    "%s:  line %d has invalid object type %s\n",

             reply	other threads:[~2011-01-06  7:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-06  7:14 KaiGai Kohei [this message]
2011-01-27  4:19 ` [libselinux] add db_language support on label_db.c KaiGai Kohei
2011-03-21 21:50   ` Kohei KaiGai
2011-03-23 12:57 ` Stephen Smalley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D256BE8.2010704@ak.jp.nec.com \
    --to=kaigai@ak.jp.nec.com \
    --cc=selinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.