diff -purN nsa/selinux-usr/libsepol/include/sepol/sidtab.h nsa-selinux-usr/libsepol/include/sepol/sidtab.h --- nsa/selinux-usr/libsepol/include/sepol/sidtab.h 2005-07-13 15:42:37.000000000 -0400 +++ nsa-selinux-usr/libsepol/include/sepol/sidtab.h 2005-08-24 17:40:19.000000000 -0400 @@ -72,6 +72,11 @@ extern void sepol_sidtab_set(sidtab_t *d extern void sepol_sidtab_shutdown(sidtab_t *s); +typedef void (* sepol_sidtab_lock_func)(sidtab_t *); +extern void sepol_sidtab_set_init_func(sepol_sidtab_lock_func func); +extern void sepol_sidtab_set_lock_func(sepol_sidtab_lock_func func); +extern void sepol_sidtab_set_unlock_func(sepol_sidtab_lock_func func); + #endif /* _SIDTAB_H_ */ /* FLASK */ diff -purN nsa/selinux-usr/libsepol/src/sidtab.c nsa-selinux-usr/libsepol/src/sidtab.c --- nsa/selinux-usr/libsepol/src/sidtab.c 2005-05-13 15:53:31.000000000 -0400 +++ nsa-selinux-usr/libsepol/src/sidtab.c 2005-08-24 17:28:06.000000000 -0400 @@ -23,6 +23,14 @@ #define SIDTAB_LOCK(s) #define SIDTAB_UNLOCK(s) +static void do_no_lock_func(sidtab_t *s __attribute__((unused))) { + /* as the name suggests, this function does not do anything */ +} + +static sepol_sidtab_lock_func INIT_SIDTAB_LOCK = do_no_lock_func; +static sepol_sidtab_lock_func SIDTAB_LOCK = do_no_lock_func; +static sepol_sidtab_lock_func SIDTAB_UNLOCK = do_no_lock_func; + int sepol_sidtab_init(sidtab_t *s) { int i; @@ -334,5 +342,17 @@ void sepol_sidtab_shutdown(sidtab_t *s) SIDTAB_UNLOCK(s); } +void sepol_sidtab_set_init_func(sepol_sidtab_lock_func func) { + INIT_SIDTAB_LOCK = func; +} + +void sepol_sidtab_set_lock_func(sepol_sidtab_lock_func func) { + SIDTAB_LOCK = func; +} + +void sepol_sidtab_set_unlock_func(sepol_sidtab_lock_func func) { + SIDTAB_UNLOCK = func; +} + /* FLASK */