All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ivan Gyurdiev <ivg2@cornell.edu>
To: selinux@tycho.nsa.gov
Cc: dwalsh@redhat.com
Subject: Re: [ 2/9 ] [ SEMANAGE ] Restore sepol compatibility
Date: Thu, 29 Sep 2005 22:52:15 -0400	[thread overview]
Message-ID: <433CA85F.7010102@cornell.edu> (raw)
In-Reply-To: <433CA7CA.6000207@cornell.edu>

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

The attached patch restores compatibility with sepol broken in the 
previous patch. It also adds stddef.h in a few places. The idea here is 
to keep things from breaking, not to replace typedefs in this library 
(this is a later patch).

[-- Attachment #2: libsemanage.01.sepol_compat.diff --]
[-- Type: text/x-patch, Size: 3295 bytes --]

diff -Naur libsemanage/include/semanage/user_record.h libsemanage.new/include/semanage/user_record.h
--- libsemanage/include/semanage/user_record.h	2005-09-23 10:37:40.000000000 -0400
+++ libsemanage.new/include/semanage/user_record.h	2005-09-27 23:49:10.000000000 -0400
@@ -1,6 +1,8 @@
 #ifndef _SEMANAGE_USER_RECORD_H_
 #define _SEMANAGE_USER_RECORD_H_
 
+#include <stddef.h>
+
 struct semanage_user;
 struct semanage_user_key;
 typedef struct semanage_user* semanage_user_t;
diff -Naur libsemanage/src/boolean_record.c libsemanage.new/src/boolean_record.c
--- libsemanage/src/boolean_record.c	2005-09-23 10:38:06.000000000 -0400
+++ libsemanage.new/src/boolean_record.c	2005-09-29 16:48:45.000000000 -0400
@@ -1,7 +1,7 @@
 #include <sepol/boolean_record.h>
 
-typedef sepol_bool_t semanage_bool_t;
-typedef sepol_bool_key_t semanage_bool_key_t;
+typedef sepol_bool_t* semanage_bool_t;
+typedef sepol_bool_key_t* semanage_bool_key_t;
 
 /* Key */
 int semanage_bool_key_create(const char* name, semanage_bool_key_t* key) {
diff -Naur libsemanage/src/context_record.c libsemanage.new/src/context_record.c
--- libsemanage/src/context_record.c	2005-09-23 10:38:06.000000000 -0400
+++ libsemanage.new/src/context_record.c	2005-09-29 16:49:13.000000000 -0400
@@ -1,6 +1,6 @@
 #include <sepol/context_record.h>
 
-typedef sepol_context_t semanage_context_t;
+typedef sepol_context_t* semanage_context_t;
 
 /* User */
 const char* semanage_context_get_user(semanage_context_t con) {
diff -Naur libsemanage/src/iface_record.c libsemanage.new/src/iface_record.c
--- libsemanage/src/iface_record.c	2005-09-23 10:38:06.000000000 -0400
+++ libsemanage.new/src/iface_record.c	2005-09-29 16:48:32.000000000 -0400
@@ -1,8 +1,8 @@
 #include <sepol/iface_record.h>
 
-typedef sepol_context_t semanage_context_t;
-typedef sepol_iface_t semanage_iface_t;
-typedef sepol_iface_key_t semanage_iface_key_t;
+typedef sepol_context_t* semanage_context_t;
+typedef sepol_iface_t* semanage_iface_t;
+typedef sepol_iface_key_t* semanage_iface_key_t;
 
 /* Key */
 int semanage_iface_compare(semanage_iface_t iface, semanage_iface_key_t key) {
diff -Naur libsemanage/src/port_record.c libsemanage.new/src/port_record.c
--- libsemanage/src/port_record.c	2005-09-23 10:38:06.000000000 -0400
+++ libsemanage.new/src/port_record.c	2005-09-29 16:49:05.000000000 -0400
@@ -1,8 +1,8 @@
 #include <sepol/port_record.h>
 
-typedef sepol_context_t semanage_context_t;
-typedef sepol_port_t semanage_port_t;
-typedef sepol_port_key_t semanage_port_key_t;
+typedef sepol_context_t* semanage_context_t;
+typedef sepol_port_t* semanage_port_t;
+typedef sepol_port_key_t* semanage_port_key_t;
 
 /* Key */
 int semanage_port_compare(semanage_port_t port, semanage_port_key_t key) {
diff -Naur libsemanage/src/user_record.c libsemanage.new/src/user_record.c
--- libsemanage/src/user_record.c	2005-09-23 10:38:06.000000000 -0400
+++ libsemanage.new/src/user_record.c	2005-09-29 16:48:56.000000000 -0400
@@ -1,7 +1,8 @@
+#include <stddef.h>
 #include <sepol/user_record.h>
 
-typedef sepol_user_t semanage_user_t;
-typedef sepol_user_key_t semanage_user_key_t;
+typedef sepol_user_t* semanage_user_t;
+typedef sepol_user_key_t* semanage_user_key_t;
 
 /* Key */
 int semanage_user_key_create(const char* name, semanage_user_key_t* key) {

  reply	other threads:[~2005-09-30  2:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-30  2:49 [ 1/9 ] [ SEPOL ] Eliminate struct pointer typedefs Ivan Gyurdiev
2005-09-30  2:52 ` Ivan Gyurdiev [this message]
2005-09-30  2:55 ` [ 3/9 ] [ SEMANAGE ] Rename files Ivan Gyurdiev
2005-09-30  3:02 ` [ 4/9 ] [ SEMANAGE ] Database initialization Stage 1 Ivan Gyurdiev
2005-09-30 18:42   ` Ivan Gyurdiev
2005-09-30  3:04 ` [ 5/9 ] [ SEMANAGE ] Change database to singly-linked list Ivan Gyurdiev
2005-09-30  3:07 ` [ 6/9 ] [ SEMANAGE ] Database Initialization Stage 2 Ivan Gyurdiev
2005-09-30  3:14 ` [ 7/9 ] [ SEMANAGE ] Backend separation (Init 3) Ivan Gyurdiev
2005-09-30 13:45   ` Ivan Gyurdiev
2005-09-30  3:16 ` [ 8/9 ] [ SEMANAGE ] Eliminate struct pointer typedefs Ivan Gyurdiev
2005-09-30  3:26 ` [ 9/9 ] [ SEPOL ] User list function, Bugfixes Ivan Gyurdiev
2005-09-30  3:29 ` Memory leaks Ivan Gyurdiev
2005-09-30  6:01   ` Ivan Gyurdiev
2005-09-30  3:34 ` Linking to semanage Ivan Gyurdiev
2005-09-30  5:56   ` Ivan Gyurdiev

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=433CA85F.7010102@cornell.edu \
    --to=ivg2@cornell.edu \
    --cc=dwalsh@redhat.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.