All of lore.kernel.org
 help / color / mirror / Atom feed
* [ SEMANAGE ] Stub kernel booleans API
@ 2005-11-14 21:38 Ivan Gyurdiev
  2005-11-15 11:25 ` Stephen Smalley
  0 siblings, 1 reply; 3+ messages in thread
From: Ivan Gyurdiev @ 2005-11-14 21:38 UTC (permalink / raw)
  To: selinux; +Cc: Stephen Smalley

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

I'm not sure if I'll be layering those on top of dbase... maybe..
 

[-- Attachment #2: libsemanage.stub_kernel_booleans.diff --]
[-- Type: text/x-patch, Size: 3061 bytes --]

diff -Naurp --exclude CVS --exclude ChangeLog --exclude VERSION old/libsemanage/include/semanage/booleans_kernel.h new/libsemanage/include/semanage/booleans_kernel.h
--- old/libsemanage/include/semanage/booleans_kernel.h	1969-12-31 19:00:00.000000000 -0500
+++ new/libsemanage/include/semanage/booleans_kernel.h	2005-11-14 16:24:18.000000000 -0500
@@ -0,0 +1,40 @@
+/* Copyright (C) 2005 Red Hat, Inc. */
+
+#ifndef _SEMANAGE_BOOLEANS_KERNEL_H_
+#define _SEMANAGE_BOOLEANS_KERNEL_H_
+
+#include <stddef.h>
+#include <semanage/handle.h> 
+#include <semanage/boolean_record.h>
+
+extern int semanage_bool_set_kernel(
+	semanage_handle_t* handle,
+	semanage_bool_key_t* key,
+	semanage_bool_t* data);
+
+extern int semanage_bool_query_kernel(
+	semanage_handle_t* handle,
+	semanage_bool_key_t* key,
+	semanage_bool_t** response);
+
+extern int semanage_bool_exists_kernel(
+	semanage_handle_t* handle,
+	semanage_bool_key_t* key,
+	int* response);
+
+extern int semanage_bool_count_kernel(
+	semanage_handle_t* handle,
+	unsigned int* response);
+
+extern int semanage_bool_iterate_kernel(
+	semanage_handle_t* handle,
+	int (*handler) (semanage_bool_t* record,
+	                void* varg),
+	void* handler_arg);
+
+extern int semanage_bool_list_kernel(
+	semanage_handle_t* handle,
+	semanage_bool_t*** records,
+	size_t* size);
+
+#endif
diff -Naurp --exclude CVS --exclude ChangeLog --exclude VERSION old/libsemanage/src/booleans_kernel.c new/libsemanage/src/booleans_kernel.c
--- old/libsemanage/src/booleans_kernel.c	1969-12-31 19:00:00.000000000 -0500
+++ new/libsemanage/src/booleans_kernel.c	2005-11-14 16:28:22.000000000 -0500
@@ -0,0 +1,78 @@
+/* Copyright (C) 2005 Red Hat, Inc. */
+
+#include "boolean_internal.h"
+
+#include <stddef.h>
+#include <semanage/booleans_kernel.h>
+#include "debug.h"
+#include "handle.h"
+
+int semanage_bool_set_kernel(
+	semanage_handle_t* handle,
+	semanage_bool_key_t* key,
+	semanage_bool_t* data) {
+
+	/* Stub */
+	handle = NULL;
+	key = NULL;
+	data = NULL;
+	return STATUS_ERR;
+}
+
+int semanage_bool_query_kernel(
+	semanage_handle_t* handle,
+	semanage_bool_key_t* key,
+	semanage_bool_t** response) {
+	
+	/* Stub */
+	handle = NULL;
+	key = NULL;
+	response = NULL;
+	return STATUS_ERR;
+}
+
+int semanage_bool_exists_kernel(
+	semanage_handle_t* handle,
+	semanage_bool_key_t* key,
+	int* response) {
+
+	/* Stub */
+	handle = NULL;
+	key = NULL;
+	response = NULL;
+	return STATUS_ERR;
+}
+
+int semanage_bool_count_kernel(
+	semanage_handle_t* handle,
+	unsigned int* response) {
+
+	/* Stub */
+	handle = NULL;
+	response = NULL;
+	return STATUS_ERR;
+}
+
+int semanage_bool_iterate_kernel(
+	semanage_handle_t* handle,
+	int (*handler) (semanage_bool_t* record,
+	                void* varg),
+	void* handler_arg) {
+
+	/* Stub */
+	handle = NULL;
+	handler = NULL;
+	handler_arg = NULL;
+	return STATUS_ERR;
+}
+
+int semanage_bool_list_kernel(
+	semanage_handle_t* handle,
+	semanage_bool_t*** records,
+	size_t* count) {
+
+	handle = NULL;
+	records = NULL;
+	count = NULL;
+	return STATUS_ERR;
+}

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ SEMANAGE ] Stub kernel booleans API
  2005-11-14 21:38 [ SEMANAGE ] Stub kernel booleans API Ivan Gyurdiev
@ 2005-11-15 11:25 ` Stephen Smalley
  2005-11-15 15:42   ` Ivan Gyurdiev
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Smalley @ 2005-11-15 11:25 UTC (permalink / raw)
  To: Ivan Gyurdiev; +Cc: SELinux-dev, selinux

On Mon, 2005-11-14 at 16:38 -0500, Ivan Gyurdiev wrote:
> I'm not sure if I'll be layering those on top of dbase... maybe..

I don't think "kernel" is what you want here, as the real distinction is
between persistent local modifications to booleans and
runtime/active/current modifications to booleans.  The booleans
themselves may be kernel or userspace policy constructs in either case.

-- 
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ SEMANAGE ] Stub kernel booleans API
  2005-11-15 11:25 ` Stephen Smalley
@ 2005-11-15 15:42   ` Ivan Gyurdiev
  0 siblings, 0 replies; 3+ messages in thread
From: Ivan Gyurdiev @ 2005-11-15 15:42 UTC (permalink / raw)
  To: Stephen Smalley; +Cc: SELinux-dev, selinux


>> I'm not sure if I'll be layering those on top of dbase... maybe..
>>     
>
> I don't think "kernel" is what you want here, as the real distinction is
> between persistent local modifications to booleans and
> runtime/active/current modifications to booleans.  The booleans
> themselves may be kernel or userspace policy constructs in either case.
>   
I like "runtime" or "active" - pick one... will resend patch.


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-11-15 15:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-14 21:38 [ SEMANAGE ] Stub kernel booleans API Ivan Gyurdiev
2005-11-15 11:25 ` Stephen Smalley
2005-11-15 15:42   ` Ivan Gyurdiev

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.