Pass fname argument to all file-backed dbases
... so we can easily configure it in one place, and instantiate those multiple times on different files if necessary (which it will be shortly, in the seuser case).
Ok, so I've switched to a 64-bit system, and the first thing I see is that everything gets installed in the completely wrong place until I export LIBDIR/SHLIBDIR to point to lib64. Is this normal, or should the Makefile do something about that? The second thing I see is a bunch of warnings, which I'll be tracking down soon...
libsemanage/src/boolean_internal.h +1 -0
@@ -26,6 +26,7 @@ extern record_table_t SEMANAGE_BOOL_RTABextern int bool_file_dbase_init (semanage_handle_t * handle, +const char * fname,dbase_config_t * dconfig); extern void bool_file_dbase_release(
libsemanage/src/booleans_file.c +2 -1
@@ -110,11 +110,12 @@ record_file_table_t SEMANAGE_BOOL_FILE_Rint bool_file_dbase_init (semanage_handle_t * handle, +const char * fname,dbase_config_t * dconfig) {if (dbase_file_init ( handle, -"booleans.local" , + fname, &SEMANAGE_BOOL_RTABLE , &SEMANAGE_BOOL_FILE_RTABLE , &dconfig->dbase) <0 )
libsemanage/src/direct_api.c +9 -5
@@ -116,7 +116,7 @@ int semanage_direct_connect(semanage_han sh->funcs = &direct_funcs;/* Configure object databases */ -if (user_base_file_dbase_init (sh, +if (user_base_file_dbase_init (sh,"users.local" ,semanage_user_base_dbase_local (sh)) <0 ) goto err;
@@ -130,20 +130,24 @@ int semanage_direct_connect(semanage_han semanage_user_dbase_local(sh)) < 0) goto err; -if (port_file_dbase_init (sh,semanage_port_dbase_local (sh)) <0 ) +if (port_file_dbase_init (sh,"ports.local" , +semanage_port_dbase_local (sh)) <0 ) goto err; -if (iface_file_dbase_init (sh,semanage_iface_dbase_local (sh)) <0 ) +if (iface_file_dbase_init (sh,"interfaces.local" , +semanage_iface_dbase_local (sh)) <0 ) goto err; -if (bool_file_dbase_init (sh,semanage_bool_dbase_local (sh)) <0 ) +if (bool_file_dbase_init (sh,"booleans.local" , +semanage_bool_dbase_local (sh)) <0 ) goto err;if (fcontext_file_dbase_init (sh,"file_contexts.local" ,semanage_fcontext_dbase_local (sh)) <0 ) goto err; -if (seuser_file_dbase_init (sh,semanage_seuser_dbase_local (sh)) <0 ) +if (seuser_file_dbase_init (sh,"seusers" , +semanage_seuser_dbase_local (sh)) <0 ) goto err; if (user_extra_file_dbase_init(sh, "users_extra.system",
libsemanage/src/iface_internal.h +1 -0
@@ -34,6 +34,7 @@ extern void iface_policydb_dbase_releaseextern int iface_file_dbase_init (semanage_handle_t * handle, +const char * fname,dbase_config_t * dconfig); extern void iface_file_dbase_release(
libsemanage/src/interfaces_file.c +4 -3
@@ -150,12 +150,13 @@ record_file_table_t SEMANAGE_IFACE_FILE_ };int iface_file_dbase_init ( -semanage_handle_t * handle, +semanage_handle_t * handle, +const char * fname,dbase_config_t * dconfig) {if (dbase_file_init ( - handle, -"interfaces.local" , + handle, + fname, &SEMANAGE_IFACE_RTABLE , &SEMANAGE_IFACE_FILE_RTABLE , &dconfig->dbase) <0 )
libsemanage/src/port_internal.h +1 -0
@@ -31,6 +31,7 @@ extern record_table_t SEMANAGE_PORT_RTABextern int port_file_dbase_init (semanage_handle_t * handle, +const char * fname,dbase_config_t * dconfig); extern void port_file_dbase_release(
libsemanage/src/ports_file.c +2 -1
@@ -166,11 +166,12 @@ record_file_table_t SEMANAGE_PORT_FILE_Rint port_file_dbase_init (semanage_handle_t * handle, +const char * fname,dbase_config_t * dconfig) {if (dbase_file_init ( handle, -"ports.local" , + fname, &SEMANAGE_PORT_RTABLE , &SEMANAGE_PORT_FILE_RTABLE , &dconfig->dbase) <0 )
libsemanage/src/seuser_internal.h +1 -0
@@ -29,6 +29,7 @@ extern record_table_t SEMANAGE_SEUSER_RTextern int seuser_file_dbase_init (semanage_handle_t * handle, +const char * fname,dbase_config_t * dconfig); extern void seuser_file_dbase_release(
libsemanage/src/seusers_file.c +3 -2
@@ -117,12 +117,13 @@ record_file_table_t SEMANAGE_SEUSER_FILE };int seuser_file_dbase_init ( -semanage_handle_t * handle, +semanage_handle_t * handle, +const char * fname,dbase_config_t * dconfig) {if (dbase_file_init ( handle, -"seusers" , + fname, &SEMANAGE_SEUSER_RTABLE , &SEMANAGE_SEUSER_FILE_RTABLE , &dconfig->dbase) <0 )
libsemanage/src/user_internal.h +1 -0
@@ -42,6 +42,7 @@ extern record_table_t SEMANAGE_USER_EXTR/* USER BASE record, FILE backend */ extern int user_base_file_dbase_init (semanage_handle_t * handle, +const char * fname,dbase_config_t * dconfig); extern void user_base_file_dbase_release(
libsemanage/src/users_base_file.c +2 -1
@@ -207,11 +207,12 @@ record_file_table_t SEMANAGE_USER_BASE_Fint user_base_file_dbase_init (semanage_handle_t * handle, +const char * fname,dbase_config_t * dconfig) {if (dbase_file_init ( handle, -"users.local" , + fname, &SEMANAGE_USER_BASE_RTABLE , &SEMANAGE_USER_BASE_FILE_RTABLE , &dconfig->dbase) <0 )
Quoted 3 lines · Ivan Gyurdiev
... so we can easily configure it in one place, and instantiate those multiple times on different files if necessary (which it will be shortly, in the seuser case).
Merged as of libsemanage 1.5.19.
Quoted 5 lines
Ok, so I've switched to a 64-bit system, and the first thing I see is that everything gets installed in the completely wrong place until I export LIBDIR/SHLIBDIR to point to lib64. Is this normal, or should the
Makefiledo something about that?
.spec file has:
make DESTDIR="${RPM_BUILD_ROOT}" LIBDIR="${RPM_BUILD_ROOT}%{_libdir}" SHLIBDIR="${RPM_BUILD_ROOT}/%{_lib}" install install-pywrap
Not sure whether the Makefile should be smarter about it or just continue deferring to the invoker of make.
Quoted 2 lines
The second thing I see is a bunch of warnings, which I'll be tracking down soon...
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.