Hi,
in the context of bsc#1259191 I have been looking into the *with_level functions of libselinux:
int get_ordered_context_list_with_level(const char *user, const char *level, const char *fromcon, char ***list);
int get_default_context_with_level(const char *user, const char *level, const char *fromcon, char **newcon);
The function names and the man page seem to suggest that these functions should apply the provided level parameter to the context. However, in my testing with libselinux-3.10, this does not happen: both functions return the context without an applied level.
Simple example:
ret = get_default_context_with_level(seuser, level, NULL, &newcon_with_level);
ret = get_default_context(seuser, NULL, &newcon_without_level);
newcon_with_level and newcon_without_level should be different, but they are identical.
Am I misunderstanding something?