--- libselinux-1.33.4/src/get_context_list.c~ 2007-01-11 14:01:23.000000000 -0500 +++ libselinux-1.33.4/src/get_context_list.c 2007-02-09 15:43:31.000000000 -0500 @@ -381,12 +381,16 @@ { security_context_t *conary; int rc; - + context_t con; rc = get_ordered_context_list_with_level(user, level, fromcon, &conary); if (rc <= 0) return -1; - *newcon = strdup(conary[0]); + con = context_new(conary[0]); + context_range_set(con, level); + *newcon = strdup(context_str(con)); + context_free(con); + freeconary(conary); if (!(*newcon)) return -1;