On 06/07/2012 09:38 PM, [email protected] wrote:
> Hi!
>> +#ifdef HAVE_LIBCAP
>> for (; i <= CAP_LAST_CAP; i++) {
>> #if HAVE_DECL_PR_CAPBSET_READ
>> ret = prctl(PR_CAPBSET_READ, i);
>> @@ -71,6 +72,9 @@ int check_remaining_caps(int lastdropped)
>> return -i;
>> }
>> }
>> +#else
>> + printf("System doesn't support full POSIX capabilities.\n");
>
> This message is useless, as when HAVE_LIBCAP is not defined the
> check_remaining_caps() is never called from the main() or am I mistaken?
>
Yeah.
This message is useless.
>> +#endif
>> return 0;
>> }
>>
>> @@ -79,6 +83,7 @@ int main(int argc, char *argv[])
>> int ret = 1;
>> int i;
>>
>> +#ifdef HAVE_LIBCAP
>> #if HAVE_DECL_PR_CAPBSET_DROP
>> ret = prctl(PR_CAPBSET_READ, -1);
>> #else
>> @@ -131,5 +136,8 @@ int main(int argc, char *argv[])
>> }
>> }
>> tst_resm(TPASS, "PR_CAPBSET_DROP tests passed\n");
>> +#else
>> + printf("System doesn't support full POSIX capabilities.\n");
>> +#endif
>> tst_exit();
>
> I'm a little lost in the ifdefs, but this one should IMHO be:
>
> tst_resm(TCONF, "System doesn't support full POSIX capabilities.\n"
>
Yeah.
>
> The rest seems to be fine.
>
Thank you for your review.
--
Best Regards,
Peng
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list