psss / rpms / libsepol

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