Re: [PATCH] libselinux: add selinux_openssh_contexts_path()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dne 21.5.2015 v 18:31 Dominick Grift napsal(a):
>> diff --git a/libselinux/src/selinux_config.c b/libselinux/src/selinux_config.c
>> index 0a80141..bec5f3b 100644
>> --- a/libselinux/src/selinux_config.c
>> +++ b/libselinux/src/selinux_config.c
>> @@ -48,8 +48,9 @@
>>  #define FILE_CONTEXT_SUBS_DIST 25
>>  #define LXC_CONTEXTS      26
>>  #define BOOLEAN_SUBS      27
>> -#define SYSTEMD_CONTEXTS  28
>> -#define NEL               29
>> +#define OPENSSH_CONTEXTS  28
>> +#define SYSTEMD_CONTEXTS  29
>> +#define NEL               30
> 
> How come openssh_context becomes version 28 and systemd_contexts changes from 28 to 29?

It's just internal "index" in static file_path_suffixes_data. Since it's
not exported and it's used only in libselinux/src/selinux_config.c,
the idea was to have it an alphabetic order therefore it's put before
SYSTEMD_CONTEXTS.

Maybe it would be better to just add a new values to the end of list.

Petr

> 
>>  
>>  /* Part of one-time lazy init */
>>  static pthread_once_t once = PTHREAD_ONCE_INIT;
>> @@ -491,6 +492,13 @@ const char *selinux_lxc_contexts_path(void)
>>  
>>  hidden_def(selinux_lxc_contexts_path)
>>  
>> +const char *selinux_openssh_contexts_path(void)
>> +{
>> +    return get_path(OPENSSH_CONTEXTS);
>> +}
>> +
>> +hidden_def(selinux_openssh_contexts_path)
>> +
>>  const char *selinux_systemd_contexts_path(void)
>>  {
>>  	return get_path(SYSTEMD_CONTEXTS);
>> diff --git a/libselinux/src/selinux_internal.h b/libselinux/src/selinux_internal.h
>> index 0abf1b4..844e408 100644
>> --- a/libselinux/src/selinux_internal.h
>> +++ b/libselinux/src/selinux_internal.h
>> @@ -83,6 +83,7 @@ hidden_proto(selinux_mkload_policy)
>>      hidden_proto(selinux_media_context_path)
>>      hidden_proto(selinux_x_context_path)
>>      hidden_proto(selinux_sepgsql_context_path)
>> +    hidden_proto(selinux_openssh_contexts_path)
>>      hidden_proto(selinux_systemd_contexts_path)
>>      hidden_proto(selinux_path)
>>      hidden_proto(selinux_check_passwd_access)
>> -- 
>> 2.4.1
>>
>> _______________________________________________
>> Selinux mailing list
>> Selinux@xxxxxxxxxxxxx
>> To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx.
>> To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.
> 
> 
> 
> _______________________________________________
> Selinux mailing list
> Selinux@xxxxxxxxxxxxx
> To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx.
> To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.
> 


-- 
Petr Lautrbach


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Selinux mailing list
Selinux@xxxxxxxxxxxxx
To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx.
To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.

[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux