libsepol/libsepol-rhat.patch
2005-07-27 16:19:22 +00:00

21 lines
871 B
Diff

diff -aur libsepol-1.7.6.orig/src/context.c libsepol-1.7.6.new/src/context.c
--- libsepol-1.7.6.orig/src/context.c 2005-07-26 14:43:30.000000000 -0400
+++ libsepol-1.7.6.new/src/context.c 2005-07-27 12:10:53.000000000 -0400
@@ -133,6 +133,7 @@
char* role = strdup(data->role);
char* type = strdup(data->type);
char* mls = data->mls ? strdup(data->mls): NULL;
+ char* mls_ptr = mls;
scontext = (context_struct_t*) malloc(sizeof(context_struct_t));
if (!user || !role || !type || (data->mls && !mls) || !scontext) {
@@ -177,7 +178,7 @@
DEBUG(__FUNCTION__, "mls is enabled, but no mls context found\n");
goto err_destroy;
}
- if (mls && (mls_context_to_sid(policydb, '$', &mls, scontext) < 0)) {
+ if (mls && (mls_context_to_sid(policydb, '$', &mls_ptr, scontext) < 0)) {
DEBUG(__FUNCTION__, "invalid mls context %s\n", mls);
goto err_destroy;
}