[CRIU] [PATCH 08/12] kdat: Config for loginuid
Pavel Emelyanov
xemul at virtuozzo.com
Tue Apr 25 07:11:14 PDT 2017
On 04/25/2017 02:17 PM, Dmitry Safonov wrote:
> 2017-04-24 23:08 GMT+03:00 Pavel Emelyanov <xemul at virtuozzo.com>:
>> The write- or readability of /proc/pid/loginuid can be determined
>> compile-time.
>>
>> Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
>> ---
>> criu/kerndat.c | 16 ++++++++++++++++
>> 1 file changed, 16 insertions(+)
>>
>> diff --git a/criu/kerndat.c b/criu/kerndat.c
>> index 837ddee..90fca22 100644
>> --- a/criu/kerndat.c
>> +++ b/criu/kerndat.c
>> @@ -471,6 +471,21 @@ int check_loginuid_op(bool full)
>> return 1;
>> }
>>
>> +#ifdef CONFIG_KERNEL_LOGINUID
>> +static inline int kerndat_loginuid(bool for_restore)
>> +{
>> +# if CONFIG_KERNEL_LOGINUID == 0
>> + kdat.has_loginuid = false;
>> +# elif CONFIG_KERNEL_LOGINUID == 1
>> + kdat.has_loginuid = !for_restore;
>> +# elif CONFIG_KERNEL_LOGINUID == 2
>> + kdat.has_loginuid = true;
>> +# else
>> +# error "Bad CONFIG_KERNEL_LOGINUID config value"
>> +# endif
>> + return 0;
>> +}
>> +#else
>
> Ouch!~
Frankly speaking I don't get what the problem here is :)
> *sigh*
>
>> static int kerndat_loginuid(bool for_restore)
>> {
>> int ret;
>> @@ -483,6 +498,7 @@ static int kerndat_loginuid(bool for_restore)
>> }
>> return ret;
>> }
>> +#endif
>>
>> #ifdef CONFIG_IPTABLES_HAS_XTLOCKS
>> static inline int kerndat_iptables_has_xtlocks(void)
>
>
More information about the CRIU
mailing list