reducing size of libselinux(ver 2)
Subsystems (2)
PATCH 1/1 reducing size of libselinux(ver 2)
Hello.
I would like to submit patch again
to reduce size of libselinux for embedded devices, as we discussed before.
http://marc.info/?t=117609454600002&r=1&w=2
This patch is for policyrep branch.
It provides build option "EMBEDDED" for libselinux, like
$ make EMBEDDED=y What happens by EMBEDDED=y is following: 1) Dependency to libsepol is removed. * You can remove libsepol for embedded devices. * Automatic downgrade of policy format is not supported when sepol is not used. 2) Files related to userspace AVC are removed 3) Files related to booleans are removed
Above behavior can be customized below in Makefile. +ifeq ($(EMBEDDED),y)
+ override DISABLE_AVC=y
+ override DISABLE_BOOL=y
+ override DISABLE_SEPOL=y
+endif
Regards,
Signature · 124 lines
Yuichi Nakamura
Hitachi Software
Makefile | 33 ++++++++++++++++++++++++++++++---
load_policy.c | 24 ++++++++++++++++++++++++
2 files changed, 54 insertions(+), 3 deletions(-)
Index: libselinux/src/Makefile
===================================================================
--- libselinux/src/Makefile (revision 2429)
+++ libselinux/src/Makefile (working copy)
@@ -18,10 +18,37 @@
SWIGSO=_selinux.so
SWIGFILES=$(SWIGSO) selinux.py
LIBSO=$(TARGET).$(LIBVERSION)
-OBJS= $(patsubst %.c,%.o,$(filter-out $(SWIGCOUT),$(wildcard *.c)))
-LOBJS= $(patsubst %.c,%.lo,$(filter-out $(SWIGCOUT),$(wildcard *.c)))
+
+LSEPOL=-lsepol
+DISABLE_AVC ?= n
+DISABLE_SEPOL ?= n
+DISABLE_BOOL ?= n
+
+ifeq ($(EMBEDDED),y)
+ override DISABLE_AVC=y
+ override DISABLE_BOOL=y
+ override DISABLE_SEPOL=y
+endif
+
+SRCS=$(filter-out $(SWIGCOUT),$(wildcard *.c))
+ifeq ($(DISABLE_AVC),y)
+ UNUSED_SRCS=avc.c avc_internal.c avc_sidtab.c
+ SRCS= $(filter-out $(UNUSED_SRCS), $(filter-out $(SWIGCOUT),$(wildcard *.c)))
+endif
+ifeq ($(DISABLE_BOOL),y)
+ UNUSED_SRCS+=booleans.c
+ SRCS= $(filter-out $(UNUSED_SRCS), $(filter-out $(SWIGCOUT),$(wildcard *.c)))
+endif
+
+OBJS= $(patsubst %.c,%.o,$(SRCS))
+LOBJS= $(patsubst %.c,%.lo,$(SRCS))
CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute
override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
+ifeq ($(DISABLE_SEPOL),y)
+ override CFLAGS += -DDISABLE_SEPOL
+ override SEPOL=
+endif
+
RANLIB=ranlib
ARCH := $(patsubst i%86,i386,$(shell uname -m))
@@ -48,7 +75,7 @@
$(CC) $(LDFLAGS) -shared -o $@ $< -L. -lselinux -L$(LIBDIR) -Wl,-soname,$@
$(LIBSO): $(LOBJS)
- $(CC) $(LDFLAGS) -shared -o $@ $^ -ldl -lsepol -L$(LIBDIR) -Wl,-soname,$(LIBSO),-z,defs,-z,relro
+ $(CC) $(LDFLAGS) -shared -o $@ $^ -ldl $(LSEPOL) -L$(LIBDIR) -Wl,-soname,$(LIBSO),-z,defs,-z,relro
ln -sf $@ $(TARGET)
%.o: %.c policy.h
Index: libselinux/src/load_policy.c
===================================================================
--- libselinux/src/load_policy.c (revision 2429)
+++ libselinux/src/load_policy.c (working copy)
@@ -15,6 +15,21 @@
#include "policy.h"
#include <limits.h>
+#ifdef DISABLE_SEPOL
+#include <sepol/policydb/policydb.h>
+/* selinux_mkload_policy needs them
+ even when sepol is disabled. */
+int sepol_policy_kern_vers_min(void)
+{
+ return POLICYDB_VERSION_MIN;
+}
+
+int sepol_policy_kern_vers_max(void)
+{
+ return POLICYDB_VERSION_MAX;
+}
+#endif
+
int security_load_policy(void *data, size_t len)
{
char path[PATH_MAX];
@@ -48,8 +63,10 @@
size_t size;
void *map, *data;
int fd, rc = -1;
+#ifndef DISABLE_SEPOL
sepol_policydb_t *policydb;
sepol_policy_file_t *pf;
+#endif
search:
snprintf(path, sizeof(path), "%s.%d",
@@ -74,6 +91,12 @@
goto close;
if (vers > kernvers) {
+#ifdef DISABLE_SEPOL
+ /* Automatic downgrade of policy format is not supported when sepol is not used*/
+ vers--;
+ close(fd);
+ goto search;
+#else
/* Need to downgrade to kernel-supported version. */
if (sepol_policy_file_create(&pf))
goto unmap;
@@ -99,6 +122,7 @@
}
sepol_policy_file_free(pf);
sepol_policydb_free(policydb);
+#endif
}
rc = security_load_policy(data, size);
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.Quoted 6 lines · Yuichi Nakamura
Hello.
I would like to submit patch again
to reduce size of libselinux for embedded devices, as we discussed before.
http://marc.info/?t=117609454600002&r=1&w=2
This patch is for policyrep branch.
<snip>
Quoted 12 lines
Index:
libselinux/src/load_policy.c
===================================================================src/load_policy.c +4
-0@@ -15,6 +15,21 @@#include "policy.h" #include <limits.h> +#ifdef DISABLE_SEPOL +#include <sepol/policydb/policydb.h> +/* selinux_mkload_policy needs them +even when sepol is disabled. */
src/load_policy.c line 31
Quoted 10 lines
src/load_policy.c +10
-0+int sepol_policy_kern_vers_min (void ) +{ +return POLICYDB_VERSION_MIN ; +} + +int sepol_policy_kern_vers_max (void ) +{ +return POLICYDB_VERSION_MAX ; +} +#endif
I don't think we want to be including headers from under sepol/policydb/ or replicating these functions here, and it occurs to me that we could all benefit from making the libselinux -> libsepol dependency optional at runtime, i.e. have libselinux dlopen() libsepol and only use its functions if present, as that would eliminate the unnecessary dependency on libsepol for many programs that only need libselinux.
Something like the patch below (compile-tested only).
---
Remove the fixed dependency on libsepol from libselinux by having it use dlopen() and friends and provide graceful fallbacks in the absence of libsepol.
---
libselinux/src/Makefile | 2 libselinux/src/load_policy.c | 97 +++++++++++++++++++++++++++++++++++-------- libselinux/src/policy.h | 2 libselinux/src/policyvers.c | 2 4 files changed, 83 insertions(+), 20 deletions(-)
libselinux/src/policyvers.c +0 -2
@@ -10,8 +10,6 @@#include "dso.h" #include <limits.h> -#define DEFAULT_POLICY_VERSION 15 -int security_policyvers (void ) {int fd, ret;
libselinux/src/policy.h +2 -0
@@ -20,4 +20,6 @@#define FILECONTEXTS "/etc/security/selinux/file_contexts" +#define DEFAULT_POLICY_VERSION 15 +#endif
libselinux/src/Makefile +1 -1
@@ -48,7 +48,7 @@ $(CC) $(LDFLAGS) -shared -o $@ $< -L. -lselinux -L$(LIBDIR) -Wl,-soname,$@ $(LIBSO): $(LOBJS) - $(CC) $(LDFLAGS) -shared -o $@ $^ -ldl -lsepol -L$(LIBDIR) -Wl,-soname,$(LIBSO),-z,defs,-z,relro + $(CC) $(LDFLAGS) -shared -o $@ $^ -ldl -L$(LIBDIR) -Wl,-soname,$(LIBSO),-z,defs,-z,relro ln -sf $@ $(TARGET) %.o: %.c policy.h
libselinux/src/load_policy.c +80 -17
152 lines not on this page · raw message
Signature · 8 lines
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 [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 38 lines · Stephen Smalley
Quoted 6 lines · Yuichi Nakamura
Hello.
I would like to submit patch again
to reduce size of libselinux for embedded devices, as we discussed before.
http://marc.info/?t=117609454600002&r=1&w=2
This patch is for policyrep branch.<snip>
Quoted 12 lines
Index:
libselinux/src/load_policy.c
===================================================================src/load_policy.c +4
-0@@ -15,6 +15,21 @@#include "policy.h" #include <limits.h> +#ifdef DISABLE_SEPOL +#include <sepol/policydb/policydb.h> +/* selinux_mkload_policy needs them +even when sepol is disabled. */ src/load_policy.c line 31
Quoted 10 lines
src/load_policy.c +10
-0+int sepol_policy_kern_vers_min (void ) +{ +return POLICYDB_VERSION_MIN ; +} + +int sepol_policy_kern_vers_max (void ) +{ +return POLICYDB_VERSION_MAX ; +} +#endif I don't think we want to be including headers from under sepol/policydb/ or replicating these functions here, and it occurs to me that we could all benefit from making the libselinux -> libsepol dependency optional at runtime, i.e. have libselinux
dlopen()libsepol and only use its functions if present, as that would eliminate the unnecessary dependency on libsepol for many programs that only need libselinux.
Quoted 1 line
Something like the patch below (compile-tested only).
Oops, requires the following patch on top of the first one.
libselinux/src/load_policy.c +4 -2
@@ -104,8 +104,10 @@ policydb_to_image = sepol_policydb_to_image;#endif - vers =vers_max (); - minvers =vers_min (); +if (vers_max) + vers =vers_max (); +if (vers_min) + minvers =vers_min (); search: snprintf(path, sizeof(path), "%s.%d",
Signature · 8 lines
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 [email protected] with the words "unsubscribe selinux" without quotes as the message.
Ver3(Re: [patch] reducing size of libselinux(ver 2)
In reply to Stephen SmalleyThank you for review and idea !
On Wed, 09 May 2007 15:24:39 -0400
Stephen Smalley wrote:
<snip>
Quoted 3 lines
Remove the fixed dependency on libsepol from libselinux by having it use
dlopen()and friends and provide graceful fallbacks in the absence of libsepol.
<snip>
libselinux/src/load_policy.c line 132
Quoted 2 lines
libselinux/src/load_policy.c +1
-1-if (vers > kernvers) { +if (vers > kernvers && policydb_to_image) {
Here,
I think policydb_to_image is not so good to indicate whether libsepol is used or not. I think it is better to prepare flag that indicates whether libsepol functions are used or not. I prepared "int usesepol" flag to indicate whether libsepol functions are used or not. Please see new patch.
Review
Quoted 6 lines
(quoted diff) +4
-2- vers = vers_max(); - minvers = vers_min(); + if (vers_max) + vers = vers_max(); + if (vers_min) + minvers = vers_min();
I think we can write
if (usesepol){
vers = vers_max();
minvers = vers_min();
}And I cross-compiled your code with your patch in my ARM environment, and load_policy in poilcycoreutils worked in my ARM device:
* /selinux/policyvers -> 20
* /etc/selinux/policy/policy.19 exists
then policy.19 was loaded successfully.
Regards,
Signature · 250 lines
Yuichi Nakamura
Hitachi Software Engineering Co., Ltd.
Japan SELinux Users Group(JSELUG)
SELinux Policy Editor: http://seedit.sourceforge.net/
Below is patch version 3.
Makefile | 26 +++++++++++++-
load_policy.c | 102 ++++++++++++++++++++++++++++++++++++++++++++++++----------
policy.h | 2 +
policyvers.c | 2 -
4 files changed, 110 insertions(+), 22 deletions(-)
Index: policyrep/libselinux/src/policyvers.c
===================================================================
--- policyrep/libselinux/src/policyvers.c (revision 2435)
+++ policyrep/libselinux/src/policyvers.c (working copy)
@@ -10,8 +10,6 @@
#include "dso.h"
#include <limits.h>
-#define DEFAULT_POLICY_VERSION 15
-
int security_policyvers(void)
{
int fd, ret;
Index: policyrep/libselinux/src/policy.h
===================================================================
--- policyrep/libselinux/src/policy.h (revision 2435)
+++ policyrep/libselinux/src/policy.h (working copy)
@@ -20,4 +20,6 @@
#define FILECONTEXTS "/etc/security/selinux/file_contexts"
+#define DEFAULT_POLICY_VERSION 15
+
#endif
Index: policyrep/libselinux/src/Makefile
===================================================================
--- policyrep/libselinux/src/Makefile (revision 2435)
+++ policyrep/libselinux/src/Makefile (working copy)
@@ -18,8 +18,28 @@
SWIGSO=_selinux.so
SWIGFILES=$(SWIGSO) selinux.py
LIBSO=$(TARGET).$(LIBVERSION)
-OBJS= $(patsubst %.c,%.o,$(filter-out $(SWIGCOUT),$(wildcard *.c)))
-LOBJS= $(patsubst %.c,%.lo,$(filter-out $(SWIGCOUT),$(wildcard *.c)))
+
+DISABLE_AVC ?= n
+DISABLE_BOOL ?= n
+
+ifeq ($(EMBEDDED),y)
+ override DISABLE_AVC=y
+ override DISABLE_BOOL=y
+endif
+
+SRCS=$(filter-out $(SWIGCOUT),$(wildcard *.c))
+ifeq ($(DISABLE_AVC),y)
+ UNUSED_SRCS=avc.c avc_internal.c avc_sidtab.c
+ SRCS= $(filter-out $(UNUSED_SRCS), $(filter-out $(SWIGCOUT),$(wildcard *.c)))
+endif
+ifeq ($(DISABLE_BOOL),y)
+ UNUSED_SRCS+=booleans.c
+
+ SRCS= $(filter-out $(UNUSED_SRCS), $(filter-out $(SWIGCOUT),$(wildcard *.c)))
+endif
+
+OBJS= $(patsubst %.c,%.o,$(SRCS))
+LOBJS= $(patsubst %.c,%.lo,$(SRCS))
CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute
override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
RANLIB=ranlib
@@ -48,7 +68,7 @@
$(CC) $(LDFLAGS) -shared -o $@ $< -L. -lselinux -L$(LIBDIR) -Wl,-soname,$@
$(LIBSO): $(LOBJS)
- $(CC) $(LDFLAGS) -shared -o $@ $^ -ldl -lsepol -L$(LIBDIR) -Wl,-soname,$(LIBSO),-z,defs,-z,relro
+ $(CC) $(LDFLAGS) -shared -o $@ $^ -ldl -L$(LIBDIR) -Wl,-soname,$(LIBSO),-z,defs,-z,relro
ln -sf $@ $(TARGET)
%.o: %.c policy.h
Index: policyrep/libselinux/src/load_policy.c
===================================================================
--- policyrep/libselinux/src/load_policy.c (revision 2435)
+++ policyrep/libselinux/src/load_policy.c (working copy)
@@ -12,6 +12,7 @@
#include "selinux_internal.h"
#include <sepol/sepol.h>
#include <sepol/policydb.h>
+#include <dlfcn.h>
#include "policy.h"
#include <limits.h>
@@ -41,8 +42,8 @@
int selinux_mkload_policy(void)
{
- int vers = sepol_policy_kern_vers_max();
int kernvers = security_policyvers();
+ int vers = kernvers, minvers = DEFAULT_POLICY_VERSION;
char path[PATH_MAX];
struct stat sb;
size_t size;
@@ -50,20 +51,80 @@
int fd, rc = -1;
sepol_policydb_t *policydb;
sepol_policy_file_t *pf;
+ int usesepol = 0;
+ int (*vers_max)(void) = NULL;
+ int (*vers_min)(void) = NULL;
+ int (*policy_file_create)(sepol_policy_file_t **) = NULL;
+ void (*policy_file_free)(sepol_policy_file_t *) = NULL;
+ void (*policy_file_set_mem)(sepol_policy_file_t *, char*, size_t) = NULL;
+ int (*policydb_create)(sepol_policydb_t **) = NULL;
+ void (*policydb_free)(sepol_policydb_t *) = NULL;
+ int (*policydb_read)(sepol_policydb_t *, sepol_policy_file_t *) = NULL;
+ int (*policydb_set_vers)(sepol_policydb_t *, unsigned int) = NULL;
+ int (*policydb_to_image)(sepol_handle_t *, sepol_policydb_t *, void **, size_t *) = NULL;
+#ifdef SHARED
+ char *errormsg = NULL;
+ void *libsepolh = NULL;
+ libsepolh = dlopen("libsepol.so", RTLD_NOW);
+ if (libsepolh) {
+ usesepol = 1;
+ dlerror();
+#define DLERR() if ((errormsg = dlerror())) goto dlclose;
+ vers_max = dlsym(libsepolh, "sepol_policy_kern_vers_max");
+ DLERR();
+ vers_min = dlsym(libsepolh, "sepol_policy_kern_vers_min");
+ DLERR();
+ policy_file_create = dlsym(libsepolh, "sepol_policy_file_create");
+ DLERR();
+ policy_file_free = dlsym(libsepolh, "sepol_policy_file_free");
+ DLERR();
+ policy_file_set_mem = dlsym(libsepolh, "sepol_policy_file_set_mem");
+ DLERR();
+ policydb_create = dlsym(libsepolh, "sepol_policydb_create");
+ DLERR();
+ policydb_free = dlsym(libsepolh, "sepol_policydb_free");
+ DLERR();
+ policydb_read = dlsym(libsepolh, "sepol_policydb_read");
+ DLERR();
+ policydb_set_vers = dlsym(libsepolh, "sepol_policydb_set_vers");
+ DLERR();
+ policydb_to_image = dlsym(libsepolh, "sepol_policydb_to_image");
+ DLERR();
+#undef DLERR
+ }
+#else
+ usesepol = 1;
+ vers_max = sepol_policy_kern_vers_max;
+ vers_min = sepol_policy_kern_vers_min;
+ policy_file_create = sepol_policy_file_create;
+ policy_file_free = sepol_policy_file_free;
+ policy_file_set_mem = sepol_policy_file_set_mem;
+ policydb_create = sepol_policydb_create;
+ policydb_free = sepol_policydb_free;
+ policydb_read = sepol_policydb_read;
+ policydb_set_vers = sepol_policydb_set_vers;
+ policydb_to_image = sepol_policydb_to_image;
+#endif
+
+ if (usesepol) {
+ vers = vers_max();
+ minvers = vers_min();
+ }
+
search:
snprintf(path, sizeof(path), "%s.%d",
selinux_binary_policy_path(), vers);
fd = open(path, O_RDONLY);
while (fd < 0 && errno == ENOENT
- && --vers >= sepol_policy_kern_vers_min()) {
+ && --vers >= minvers) {
/* Check prior versions to see if old policy is available */
snprintf(path, sizeof(path), "%s.%d",
selinux_binary_policy_path(), vers);
fd = open(path, O_RDONLY);
}
if (fd < 0)
- return -1;
+ goto dlclose;
if (fstat(fd, &sb) < 0)
goto close;
@@ -73,32 +134,32 @@
if (map == MAP_FAILED)
goto close;
- if (vers > kernvers) {
+ if (vers > kernvers && usesepol) {
/* Need to downgrade to kernel-supported version. */
- if (sepol_policy_file_create(&pf))
+ if (policy_file_create(&pf))
goto unmap;
- if (sepol_policydb_create(&policydb)) {
- sepol_policy_file_free(pf);
+ if (policydb_create(&policydb)) {
+ policy_file_free(pf);
goto unmap;
}
- sepol_policy_file_set_mem(pf, data, size);
- if (sepol_policydb_read(policydb, pf)) {
- sepol_policy_file_free(pf);
- sepol_policydb_free(policydb);
+ policy_file_set_mem(pf, data, size);
+ if (policydb_read(policydb, pf)) {
+ policy_file_free(pf);
+ policydb_free(policydb);
goto unmap;
}
- if (sepol_policydb_set_vers(policydb, kernvers) ||
- sepol_policydb_to_image(NULL, policydb, &data, &size)) {
+ if (policydb_set_vers(policydb, kernvers) ||
+ policydb_to_image(NULL, policydb, &data, &size)) {
/* Downgrade failed, keep searching. */
- sepol_policy_file_free(pf);
- sepol_policydb_free(policydb);
+ policy_file_free(pf);
+ policydb_free(policydb);
munmap(map, sb.st_size);
close(fd);
vers--;
goto search;
}
- sepol_policy_file_free(pf);
- sepol_policydb_free(policydb);
+ policy_file_free(pf);
+ policydb_free(policydb);
}
rc = security_load_policy(data, size);
@@ -109,6 +170,13 @@
munmap(map, sb.st_size);
close:
close(fd);
+ dlclose:
+#ifdef SHARED
+ if (errormsg)
+ fprintf(stderr, "libsepol: %s\n", errormsg);
+ if (libsepolh)
+ dlclose(libsepolh);
+#endif
return rc;
}
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.Re: Ver3(Re: [patch] reducing size of libselinux(ver 2)
Quoted 8 lines · Yuichi Nakamura
Thank you for review and idea !
On Wed, 09 May 2007 15:24:39 -0400
Stephen Smalley wrote:
<snip>Quoted 3 lines
Remove the fixed dependency on libsepol from libselinux by having it use
dlopen()and friends and provide graceful fallbacks in the absence of libsepol.
Quoted 7 lines
<snip>
libselinux/src/load_policy.c line 132
Quoted 2 lines
libselinux/src/load_policy.c +1
-1-if (vers > kernvers) { +if (vers > kernvers && policydb_to_image) {Here,
I thinkpolicydb_to_imageis not so good to indicate whether libsepol is used or not. I think it is better to prepare flag that indicates whether libsepol functions are used or not. I prepared "int usesepol" flag to indicate whether libsepol functions are used or not.
That's true - dlsym() technically can return NULL even upon success.
Quoted 1 line
Please see new patch.
Looks mostly sane to me. Some comments:
- libselinux/utils/Makefile needs to properly handle the DISABLE_AVC and DISABLE_BOOLS options - some of those utilities won't build with your cut-down version of libselinux so a make EMBEDDED=y at the top of libselinux will fail.
- Is DISABLE_BOOLS still worthwhile? Especially since I removed much of that code already as part of removing the legacy booleans/users support for setlocaldefs?
- Could likely introduce a DISABLE_SETRANS that reduces setrans_client.c to trivial stubs in the embedded case (no translation daemon likely there, right?).
- Could likely introduce a DISABLE_RPM that drops rpm.o from the library.
- With the elimination of libsepol as a fixed dependency for libselinux, we can go back and remove -lsepol from a number of the Makefiles (e.g. libselinux/utils, several of the policycoreutils) and we can later eliminate it for the patched selinux userland packages (like coreutils - it would be nice if things like mv worked without libsepol present as they don't need it).
Quoted 265 lines
Review
Quoted 6 lines
(quoted diff) +4
-2- vers = vers_max(); - minvers = vers_min(); + if (vers_max) + vers = vers_max(); + if (vers_min) + minvers = vers_min();I think we can write
if (usesepol){ vers = vers_max(); minvers = vers_min(); }And I cross-compiled your code with your patch in my ARM environment, and
load_policyin poilcycoreutils worked in my ARM device:
* /selinux/policyvers -> 20
*/etc/selinux/policy/policy.19exists
then policy.19 was loaded successfully.Regards,
Signature · 14 lines
Yuichi Nakamura Hitachi Software Engineering Co., Ltd. Japan SELinux Users Group(JSELUG) SELinux Policy Editor: http://seedit.sourceforge.net/ Below is patch version 3. Makefile | 26 +++++++++++++- load_policy.c | 102 ++++++++++++++++++++++++++++++++++++++++++++++++---------- policy.h | 2 + policyvers.c | 2 - 4 files changed, 110 insertions(+), 22 deletions(-) Index: policyrep/libselinux/src/policyvers.c ===================================================================libselinux/src/policyvers.c +0
-2@@ -10,8 +10,6 @@#include "dso.h" #include <limits.h> -#define DEFAULT_POLICY_VERSION 15 -int security_policyvers (void ) {int fd, ret;Index:
policyrep/libselinux/src/policy.h
===================================================================libselinux/src/policy.h +2
-0@@ -20,4 +20,6 @@#define FILECONTEXTS "/etc/security/selinux/file_contexts" +#define DEFAULT_POLICY_VERSION 15 +#endif Index: policyrep/libselinux/src/Makefile
===================================================================libselinux/src/Makefile +23
-3@@ -18,8 +18,28 @@ SWIGSO=_selinux.so SWIGFILES=$(SWIGSO) selinux.py LIBSO=$(TARGET).$(LIBVERSION) -OBJS= $(patsubst %.c,%.o,$(filter-out $(SWIGCOUT),$(wildcard *.c))) -LOBJS= $(patsubst %.c,%.lo,$(filter-out $(SWIGCOUT),$(wildcard *.c))) + +DISABLE_AVC ?= n +DISABLE_BOOL ?= n + +ifeq ($(EMBEDDED),y) + override DISABLE_AVC=y + override DISABLE_BOOL=y +endif + +SRCS=$(filter-out $(SWIGCOUT),$(wildcard *.c)) +ifeq ($(DISABLE_AVC),y) + UNUSED_SRCS=avc.c avc_internal.c avc_sidtab.c + SRCS= $(filter-out $(UNUSED_SRCS), $(filter-out $(SWIGCOUT),$(wildcard *.c))) +endif +ifeq ($(DISABLE_BOOL),y) + UNUSED_SRCS+=booleans.c + + SRCS= $(filter-out $(UNUSED_SRCS), $(filter-out $(SWIGCOUT),$(wildcard *.c))) +endif + +OBJS= $(patsubst %.c,%.o,$(SRCS)) +LOBJS= $(patsubst %.c,%.lo,$(SRCS)) CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 RANLIB=ranlib@@ -48,7 +68,7 @@ $(CC) $(LDFLAGS) -shared -o $@ $< -L. -lselinux -L$(LIBDIR) -Wl,-soname,$@ $(LIBSO): $(LOBJS) - $(CC) $(LDFLAGS) -shared -o $@ $^ -ldl -lsepol -L$(LIBDIR) -Wl,-soname,$(LIBSO),-z,defs,-z,relro + $(CC) $(LDFLAGS) -shared -o $@ $^ -ldl -L$(LIBDIR) -Wl,-soname,$(LIBSO),-z,defs,-z,relro ln -sf $@ $(TARGET) %.o: %.c policy.hIndex:
policyrep/libselinux/src/load_policy.c
===================================================================libselinux/src/load_policy.c +85
-17@@ -12,6 +12,7 @@#include "selinux_internal.h" #include <sepol/sepol.h> #include <sepol/policydb.h> +#include <dlfcn.h> #include "policy.h" #include <limits.h> @@ -41,8 +42,8 @@int selinux_mkload_policy (void ) { -int vers =sepol_policy_kern_vers_max ();int kernvers =security_policyvers (); +int vers = kernvers, minvers =DEFAULT_POLICY_VERSION ;char path[PATH_MAX ];struct stat sb;size_t size;@@ -50,20 +51,80 @@int fd, rc =-1 ;sepol_policydb_t *policydb;sepol_policy_file_t *pf; +int usesepol =0 ; +int (*vers_max)(void ) =NULL ; +int (*vers_min)(void ) =NULL ; +int (*policy_file_create)(sepol_policy_file_t **) =NULL ; +void (*policy_file_free)(sepol_policy_file_t *) =NULL ; +void (*policy_file_set_mem)(sepol_policy_file_t *,char *,size_t ) =NULL ; +int (*policydb_create)(sepol_policydb_t **) =NULL ; +void (*policydb_free)(sepol_policydb_t *) =NULL ; +int (*policydb_read)(sepol_policydb_t *,sepol_policy_file_t *) =NULL ; +int (*policydb_set_vers)(sepol_policydb_t *,unsigned int ) =NULL ; +int (*policydb_to_image)(sepol_handle_t *,sepol_policydb_t *,void **,size_t *) =NULL ; +#ifdef SHARED +char *errormsg =NULL ; +void *libsepolh =NULL ; + libsepolh =dlopen ("libsepol.so" ,RTLD_NOW ); +if (libsepolh) { + usesepol =1 ; +dlerror (); +#define DLERR () if ((errormsg = dlerror())) goto dlclose; + vers_max =dlsym (libsepolh,"sepol_policy_kern_vers_max" ); +DLERR (); + vers_min =dlsym (libsepolh,"sepol_policy_kern_vers_min" ); +DLERR (); + policy_file_create =dlsym (libsepolh,"sepol_policy_file_create" ); +DLERR (); + policy_file_free =dlsym (libsepolh,"sepol_policy_file_free" ); +DLERR (); + policy_file_set_mem =dlsym (libsepolh,"sepol_policy_file_set_mem" ); +DLERR (); + policydb_create =dlsym (libsepolh,"sepol_policydb_create" ); +DLERR (); + policydb_free =dlsym (libsepolh,"sepol_policydb_free" ); +DLERR (); + policydb_read =dlsym (libsepolh,"sepol_policydb_read" ); +DLERR (); + policydb_set_vers =dlsym (libsepolh,"sepol_policydb_set_vers" ); +DLERR (); + policydb_to_image =dlsym (libsepolh,"sepol_policydb_to_image" ); +DLERR (); +#undef DLERR + } +#else + usesepol =1 ; + vers_max = sepol_policy_kern_vers_max; + vers_min = sepol_policy_kern_vers_min; + policy_file_create = sepol_policy_file_create; + policy_file_free = sepol_policy_file_free; + policy_file_set_mem = sepol_policy_file_set_mem; + policydb_create = sepol_policydb_create; + policydb_free = sepol_policydb_free; + policydb_read = sepol_policydb_read; + policydb_set_vers = sepol_policydb_set_vers; + policydb_to_image = sepol_policydb_to_image; +#endif + +if (usesepol) { + vers =vers_max (); + minvers =vers_min (); + } + search:snprintf (path,sizeof (path),"%s.%d" ,selinux_binary_policy_path (), vers); fd =open (path,O_RDONLY );while (fd <0 && errno ==ENOENT - && --vers >=sepol_policy_kern_vers_min ()) { + && --vers >= minvers) {/* Check prior versions to see if old policy is available */ snprintf (path,sizeof (path),"%s.%d" ,selinux_binary_policy_path (), vers); fd =open (path,O_RDONLY ); }if (fd <0 ) -return -1 ; + goto dlclose;if (fstat (fd, &sb) <0 ) goto close;@@ -73,32 +134,32 @@if (map ==MAP_FAILED ) goto close; -if (vers > kernvers) { +if (vers > kernvers && usesepol) {/* Need to downgrade to kernel-supported version. */ -if (sepol_policy_file_create (&pf)) +if (policy_file_create (&pf)) goto unmap; -if (sepol_policydb_create (&policydb)) { -sepol_policy_file_free (pf); +if (policydb_create (&policydb)) { +policy_file_free (pf); goto unmap; } -sepol_policy_file_set_mem (pf, data, size); -if (sepol_policydb_read (policydb, pf)) { -sepol_policy_file_free (pf); -sepol_policydb_free (policydb); +policy_file_set_mem (pf, data, size); +if (policydb_read (policydb, pf)) { +policy_file_free (pf); +policydb_free (policydb); goto unmap; } -if (sepol_policydb_set_vers (policydb, kernvers) || -sepol_policydb_to_image (NULL , policydb, &data, &size)) { +if (policydb_set_vers (policydb, kernvers) || +policydb_to_image (NULL , policydb, &data, &size)) {/* Downgrade failed, keep searching. */ -sepol_policy_file_free (pf); -sepol_policydb_free (policydb); +policy_file_free (pf); +policydb_free (policydb);munmap (map, sb.st_size);close (fd); vers--; goto search; } -sepol_policy_file_free (pf); -sepol_policydb_free (policydb); +policy_file_free (pf); +policydb_free (policydb); } rc =security_load_policy (data, size);@@ -109,6 +170,13 @@munmap (map, sb.st_size); close:close (fd); + dlclose: +#ifdef SHARED +if (errormsg) +fprintf (stderr,"libsepol: %s\n" , errormsg); +if (libsepolh) +dlclose (libsepolh); +#endif return rc; }
Signature · 8 lines
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 [email protected] with the words "unsubscribe selinux" without quotes as the message.
Re: Ver3(Re: [patch] reducing size of libselinux(ver 2)
Quoted 32 lines · Stephen Smalley
Quoted 8 lines · Yuichi Nakamura
Thank you for review and idea !
On Wed, 09 May 2007 15:24:39 -0400
Stephen Smalley wrote:
<snip>Quoted 3 lines
Remove the fixed dependency on libsepol from libselinux by having it use
dlopen()and friends and provide graceful fallbacks in the absence of libsepol.Quoted 7 lines
<snip>
libselinux/src/load_policy.c line 132
Quoted 2 lines
libselinux/src/load_policy.c +1
-1-if (vers > kernvers) { +if (vers > kernvers && policydb_to_image) {Here,
I thinkpolicydb_to_imageis not so good to indicate whether libsepol is used or not. I think it is better to prepare flag that indicates whether libsepol functions are used or not. I prepared "int usesepol" flag to indicate whether libsepol functions are used or not.That's true -
dlsym()technically can return NULL even upon success.Quoted 1 line
Please see new patch.
Looks mostly sane to me. Some comments:
- libselinux/utils/Makefile needs to properly handle theDISABLE_AVCandDISABLE_BOOLSoptions - some of those utilities won't build with your cut-down version of libselinux so a make EMBEDDED=y at the top of libselinux will fail.
- IsDISABLE_BOOLSstill worthwhile? Especially since I removed much of that code already as part of removing the legacy booleans/users support for setlocaldefs?
- Could likely introduce aDISABLE_SETRANSthat reducessetrans_client.cto trivial stubs in the embedded case (no translation daemon likely there, right?).
Quoted 8 lines
- Could likely introduce a
DISABLE_RPMthat drops rpm.o from the library.
- With the elimination of libsepol as a fixed dependency for libselinux, we can go back and remove -lsepol from a number of the Makefiles (e.g. libselinux/utils, several of the policycoreutils) and we can later eliminate it for the patched selinux userland packages (like coreutils - it would be nice if things like mv worked without libsepol present as they don't need it).
One other comment: The policyrep branch is primarily for the policy representation work; we have also been merging patches that involve incompatible interface changes to it so that the entire branch can be rolled over to trunk with a single bump in the .so version. This patch doesn't really fall into either of those categories and could go straight to trunk if you wanted to have it sooner (as policyrep will take time to mature before it can be merged to trunk). Of course, to do that, you'd have to re-base and deal with the legacy sepol_genbools/genusers calls in the trunk version as well.
Signature · 8 lines
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 [email protected] with the words "unsubscribe selinux" without quotes as the message.
Re: Ver3(Re: [patch] reducing size of libselinux(ver 2)
Quoted 42 lines · Stephen Smalley
Quoted 32 lines · Stephen Smalley
Quoted 8 lines · Yuichi Nakamura
Thank you for review and idea !
On Wed, 09 May 2007 15:24:39 -0400
Stephen Smalley wrote:
<snip>Quoted 3 lines
Remove the fixed dependency on libsepol from libselinux by having it use
dlopen()and friends and provide graceful fallbacks in the absence of libsepol.Quoted 7 lines
<snip>
libselinux/src/load_policy.c line 132
Quoted 2 lines
libselinux/src/load_policy.c +1
-1-if (vers > kernvers) { +if (vers > kernvers && policydb_to_image) {Here,
I thinkpolicydb_to_imageis not so good to indicate whether libsepol is used or not. I think it is better to prepare flag that indicates whether libsepol functions are used or not. I prepared "int usesepol" flag to indicate whether libsepol functions are used or not.That's true -
dlsym()technically can return NULL even upon success.Quoted 1 line
Please see new patch.
Looks mostly sane to me. Some comments:
- libselinux/utils/Makefile needs to properly handle theDISABLE_AVCandDISABLE_BOOLSoptions - some of those utilities won't build with your cut-down version of libselinux so a make EMBEDDED=y at the top of libselinux will fail.
- IsDISABLE_BOOLSstill worthwhile? Especially since I removed much of that code already as part of removing the legacy booleans/users support for setlocaldefs?
- Could likely introduce aDISABLE_SETRANSthat reducessetrans_client.cto trivial stubs in the embedded case (no translation daemon likely there, right?).Quoted 8 lines
- Could likely introduce a
DISABLE_RPMthat drops rpm.o from the library.
- With the elimination of libsepol as a fixed dependency for libselinux, we can go back and remove -lsepol from a number of the Makefiles (e.g. libselinux/utils, several of the policycoreutils) and we can later eliminate it for the patched selinux userland packages (like coreutils - it would be nice if things like mv worked without libsepol present as they don't need it).
Quoted 9 lines
One other comment: The policyrep branch is primarily for the policy representation work; we have also been merging patches that involve incompatible interface changes to it so that the entire branch can be rolled over to trunk with a single bump in the .so version. This patch doesn't really fall into either of those categories and could go straight to trunk if you wanted to have it sooner (as policyrep will take time to mature before it can be merged to trunk). Of course, to do that, you'd have to re-base and deal with the legacy sepol_genbools/genusers calls in the trunk version as well.
Oh, and there was a mistake in the error message I put in the dlclose error path - should be "libselinux: %s\n" rather than "libsepol: %s \n", so it shows up as something like:
libselinux: /lib/libsepol.so.2: undefined symbol: sepol_policydb_create
Signature · 8 lines
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 [email protected] with the words "unsubscribe selinux" without quotes as the message.
Ver 4(Re: Ver3(Re: [patch] reducing size of libselinux(ver 2)
In reply to Stephen SmalleyQuoted 1 line · On Thu, 10 May 2007 09:06:54 -0400 Stephen Smalley wrote:
Looks mostly sane to me. Some comments:
Thank you.
Quoted 4 lines
- libselinux/utils/Makefile needs to properly handle the
DISABLE_AVCandDISABLE_BOOLSoptions - some of those utilities won't build with your cut-down version of libselinux so a make EMBEDDED=y at the top of libselinux will fail.
I fixed utils/Makefile.
Quoted 3 lines
- Is
DISABLE_BOOLSstill worthwhile? Especially since I removed much of that code already as part of removing the legacy booleans/users support for setlocaldefs?
I think in some cases people do not use booleans.
So I leave DISABLE_BOOLS option in Makefile, but it is "n" by default.
Quoted 5 lines
- Could likely introduce a
DISABLE_SETRANSthat reducessetrans_client.cto trivial stubs in the embedded case (no translation daemon likely there, right?).
- Could likely introduce aDISABLE_RPMthat drops rpm.o from the library.
I see, I've prepared DISABLE_SETRANS,DISABLE_RPM.
Quoted 6 lines
- With the elimination of libsepol as a fixed dependency for libselinux, we can go back and remove -lsepol from a number of the Makefiles (e.g. libselinux/utils, several of the policycoreutils) and we can later eliminate it for the patched selinux userland packages (like coreutils - it would be nice if things like mv worked without libsepol present as they don't need it).
For now I fixed utils/Makefiles.
---
Below is patch ver 4.
I rewrote it for trunk.
src/Makefile | 36 ++++++++ src/booleans_stub.c | 49 ++++++++++++ src/load_policy.c | 187 +++++++++++++++++++++++++++++++++------------- src/policy.h | 2 src/policyvers.c | 2 src/setrans_client_stub.c | 44 ++++++++++ utils/Makefile | 16 +++ 7 files changed, 279 insertions(+), 57 deletions(-)
libselinux/utils/Makefile +15 -1
@@ -5,9 +5,23 @@ CFLAGS ?= -Wall override CFLAGS += -I../include -D_GNU_SOURCE -LDLIBS += -L../src -lselinux -lsepol -L$(LIBDIR) +LDLIBS += -L../src -lselinux -L$(LIBDIR) +DISABLE_AVC ?= n +DISABLE_BOOL ?= n +ifeq ($(EMBEDDED),y) + override DISABLE_AVC=y + override DISABLE_BOOL=n +endif + TARGETS=$(patsubst %.c,%,$(wildcard *.c)) +ifeq ($(DISABLE_AVC),y) + UNUSED_TARGETS+=compute_av compute_create compute_member compute_relabel +endif +ifeq ($(DISABLE_BOOL),y) + UNUSED_TARGETS+=getsebool togglesebool +endif +TARGETS:= $(filter-out $(UNUSED_TARGETS), $(TARGETS)) all: $(TARGETS)
libselinux/src/policyvers.c +0 -2
@@ -10,8 +10,6 @@#include "dso.h" #include <limits.h> -#define DEFAULT_POLICY_VERSION 15 -int security_policyvers (void ) {int fd, ret;
libselinux/src/policy.h +2 -0
@@ -20,4 +20,6 @@#define FILECONTEXTS "/etc/security/selinux/file_contexts" +#define DEFAULT_POLICY_VERSION 15 +#endif
libselinux/src/Makefile +33 -3
@@ -18,8 +18,38 @@ SWIGSO=_selinux.so SWIGFILES=$(SWIGSO) selinux.py LIBSO=$(TARGET).$(LIBVERSION) -OBJS= $(patsubst %.c,%.o,$(filter-out $(SWIGCOUT),$(wildcard *.c))) -LOBJS= $(patsubst %.c,%.lo,$(filter-out $(SWIGCOUT),$(wildcard *.c))) + +DISABLE_AVC ?= n +DISABLE_SETRANS ?= n +DISABLE_RPM ?= n +DISABLE_BOOL ?= n + +ifeq ($(EMBEDDED),y) + override DISABLE_AVC=y + override DISABLE_SETRANS=y + override DISABLE_RPM=y + override DISABLE_BOOL=n +endif + +UNUSED_SRCS=setrans_client_stub.c booleans_stub.c +ifeq ($(DISABLE_AVC),y) + UNUSED_SRCS+=avc.c avc_internal.c avc_sidtab.c +endif +ifeq ($(DISABLE_SETRANS),y) + UNUSED_SRCS+=setrans_client.c + UNUSED_SRCS:=$(filter-out setrans_client_stub.c, $(UNUSED_SRCS)) +endif +ifeq ($(DISABLE_BOOL),y) + UNUSED_SRCS+=booleans.c + UNUSED_SRCS:=$(filter-out booleans_stub.c, $(UNUSED_SRCS)) +endif +ifeq ($(DISABLE_RPM),y) + UNUSED_SRCS+=rpm.c +endif +SRCS= $(filter-out $(UNUSED_SRCS), $(filter-out $(SWIGCOUT),$(wildcard *.c))) + +OBJS= $(patsubst %.c,%.o,$(SRCS)) +LOBJS= $(patsubst %.c,%.lo,$(SRCS)) CFLAGS ?= -Wall -W -Wundef -Wmissing-noreturn -Wmissing-format-attribute override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 RANLIB=ranlib
@@ -48,7 +78,7 @@ $(CC) $(LDFLAGS) -shared -o $@ $< -L. -lselinux -L$(LIBDIR) -Wl,-soname,$@ $(LIBSO): $(LOBJS) - $(CC) $(LDFLAGS) -shared -o $@ $^ -ldl -lsepol -L$(LIBDIR) -Wl,-soname,$(LIBSO),-z,defs,-z,relro + $(CC) $(LDFLAGS) -shared -o $@ $^ -ldl -L$(LIBDIR) -Wl,-soname,$(LIBSO),-z,defs,-z,relro ln -sf $@ $(TARGET) %.o: %.c policy.h
libselinux/src/booleans_stub.c +49 -0
49 lines not on this page · raw message
libselinux/src/setrans_client_stub.c +44 -0
44 lines not on this page · raw message
libselinux/src/load_policy.c +136 -51
246 lines not on this page · raw message
----
Yuichi Nakamura
Hitachi Software
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Re: Ver 4(Re: Ver3(Re: [patch] reducing size of libselinux(ver 2)
Quoted 10 lines · Yuichi Nakamura
Quoted 1 line · On Thu, 10 May 2007 09:06:54 -0400 Stephen Smalley wrote:
Looks mostly sane to me. Some comments:
Thank you.
Quoted 4 lines
- libselinux/utils/Makefile needs to properly handle the
DISABLE_AVCandDISABLE_BOOLSoptions - some of those utilities won't build with your cut-down version of libselinux so a make EMBEDDED=y at the top of libselinux will fail.I fixed utils/Makefile.
Hmm...I don't like the duplicated definitions - they should just go into the top-level Makefile and be exported, ala:
Makefile +14 -0
@@ -1,3 +1,17 @@ +DISABLE_AVC ?= n +DISABLE_SETRANS ?= n +DISABLE_RPM ?= n +DISABLE_BOOL ?= n + +ifeq ($(EMBEDDED),y) + override DISABLE_AVC=y + override DISABLE_SETRANS=y + override DISABLE_RPM=y + override DISABLE_BOOL=n +endif + +export DISABLE_AVC DISABLE_SETRANS DISABLE_RPM DISABLE_BOOL + all: $(MAKE) -C src $(MAKE) -C utils
Quoted 5 lines
Quoted 3 lines
- Is
DISABLE_BOOLSstill worthwhile? Especially since I removed much of that code already as part of removing the legacy booleans/users support for setlocaldefs?I think in some cases people do not use booleans.
So I leaveDISABLE_BOOLSoption inMakefile, but it is "n" by default.
No, either you use it by default for EMBEDDED=y or it gets removed altogether. We don't want options that will rarely get tested.
I'm also not keen on the separate _stub.c files as I think they will prove painful to maintain. booleans_stub.c shouldn't be needed at all if you wrap the preservebools block in load_policy.c with an #if, and setrans_client_stub.c can be folded into setrans_client.c using an #if..#else..#endif. That makes the Makefiles simpler too.
Quoted 11 lines
Quoted 6 lines
- With the elimination of libsepol as a fixed dependency for libselinux, we can go back and remove -lsepol from a number of the Makefiles (e.g. libselinux/utils, several of the policycoreutils) and we can later eliminate it for the patched selinux userland packages (like coreutils - it would be nice if things like mv worked without libsepol present as they don't need it).
For now I fixed utils/Makefiles.
---
Below is patch ver 4.
I rewrote it for trunk.
Suggestion: Next time you post a version of the patch, make it a clean submission, i.e. drop the prior discussion, provide an updated summary of what the patch does, etc. And you might consider splitting into two separate patches, as the part that switches libselinux to dlopen'ing of libsepol is independent of the DISABLE* options.
Signature · 8 lines
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 [email protected] with the words "unsubscribe selinux" without quotes as the message.
Re: Ver 4(Re: Ver3(Re: [patch] reducing size of libselinux(ver 2)
On Fri, 2007-05-11 at 09:49 -0400, Stephen Smalley wrote:
[...]
Quoted 7 lines
Suggestion: Next time you post a version of the patch, make it a clean submission, i.e. drop the prior discussion, provide an updated summary of what the patch does, etc. And you might consider splitting into two separate patches, as the part that switches libselinux to dlopen'ing of libsepol is independent of the DISABLE* options.
In case any cares - I've been using mercurial patch queues [1] for a while that facilitate all of this (and quilt provides similar functionality). It evens stores the description and can email the patches as a series with diffstat. Can't recommend it enough for making this process simpler.
Karl
[1] http://www.selenic.com/mercurial/wiki/index.cgi/MqExtension
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Re: Ver 4(Re: Ver3(Re: [patch] reducing size of libselinux(ver 2)
In reply to Stephen SmalleyQuoted 5 lines · On Fri, 11 May 2007 09:49:09 -0400 Stephen Smalley wrote:
Suggestion: Next time you post a version of the patch, make it a clean submission, i.e. drop the prior discussion, provide an updated summary of what the patch does, etc. And you might consider splitting into two separate patches, as the part that switches libselinux to dlopen'ing of libsepol is independent of the DISABLE* options.
I see, I will submit next patch as a new thread. However, I have other works this week, new patch will be next week.
Regards,
Signature · 10 lines
Yuichi Nakamura Hitachi Software Engineering Co., Ltd. Japan SELinux Users Group(JSELUG) SELinux Policy Editor: http://seedit.sourceforge.net/ -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.