----- Original Message -----
> From: "Zeng Linggang" <zenglg...@cn.fujitsu.com>
> To: chru...@suse.cz
> Cc: "ltp-list" <ltp-list@lists.sourceforge.net>
> Sent: Wednesday, 10 September, 2014 4:58:36 AM
> Subject: Re: [LTP] [PATCH] securebits/check_keepcaps.c: Add comments about
> cap_get_flag may return -1
>
> Hi,
> > Hi!
> > > In RHEL7.0(3.10.0) the value of CAP_LAST_CAP in linux/capability.h is 36,
> > > it is
> > > greater than in the capability.h which is used to create
> > > libcap.so(libcap-2.22-8) and that value is 34. Then cap_get_flag returns
> > > -1, and
> > > errno is set to EINVAL. Add comments to make this clear.
> >
> > I'm a bit confused, the sys/capability.h header which is part of libcap
> > includes the linux/capability.h header which defines the the
> > CAP_LAST_CAP (at least on my system). So there shouldn't be a
> > disagreement between these two unless libcap was compiled with wrong
> > kernel headers which I would call a bug in distribution. Are you sure
> > that all your packages are up to date?
> >
>
> I think libcap was compiled with wrong kernel headers and it is a bug in
> distribution. I had installed these packages all from the default
> distribution. The value of CAP_LAST_CAP is different.
Someone else reported it already:
Bug 1046008 - Some capabilities aren't be defined
https://bugzilla.redhat.com/show_bug.cgi?id=1046008
Patch looks good to me, it makes the bug more visible.
Regards,
Jan
>
> I delete some code.
> This is the system capability.h
> ------------------------------------------------------------------------
> # cat /usr/include/linux/capability.h
> ...
>
> #define CAP_BLOCK_SUSPEND 36
>
> #define CAP_LAST_CAP CAP_BLOCK_SUSPEND
>
> ...
> ------------------------------------------------------------------------
>
>
> This is used to build libcap.
> ------------------------------------------------------------------------
> # cat libcap-2.22/libcap/include/linux/capability.h
> ...
>
> #define CAP_SYSLOG 34
>
> #define CAP_LAST_CAP CAP_SYSLOG
>
> ...
> ------------------------------------------------------------------------
>
> Best regards,
> Zeng
>
>
> ------------------------------------------------------------------------------
> Want excitement?
> Manually upgrade your production database.
> When you want reliability, choose Perforce
> Perforce version control. Predictably reliable.
> http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
>
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list