Re: getxattr() errata

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

 



That does make sense--sort of.  I'm
not fond of aliases, especially when
the aliases live in service-specific
include files rather than in the
generic 'errno*.h' files.

Ran into this while working with

   cap_get_file()

which is one layer removed from
getxattr() and is not documented
specifically making use of it.

I'm sure there's a reason why
the capability calls are not present
in MAN7, but I was a bit baffled
by the omission when doing the
research.  'libcap.so.2' is part
of the kernel.org code base:

https://git.kernel.org/?p=linux/kernel/git/morgan/libcap.git;a=summary


At 12:01 AM 1/19/2013 +0100, Michael Kerrisk (man-pages) wrote:
>On Fri, Jan 18, 2013 at 5:16 AM,  <starlight.2013q1@xxxxxxxxxxx> 
>wrote:
>> Hello,
>>
>> Just noticed that the getxattr() man page
>> says that ENOATTR is returned when an
>> extended attribute is not present.
>>
>> http://man7.org/linux/man-pages/man2/getxattr.2.html
>>
>> I believe the correct code for this
>> situation is ENODATA or 61.
>>
>>    strace getcap /bin/bash
>>
>> should confirm that.
>
>Yup, others have also noted this; see
>https://bugzilla.kernel.org/show_bug.cgi?id=51871
>
>The point is that ENOATTR is a synonym for ENODATA.
>
>For each of the relevant pages, I've simply added the text: 
>"(ENOATTR
>is defined to be a synonym for ENODATA in <attr/xattr.h>.)"
>
>Thanks,
>
>Michael
>
>
>-- 
>Michael Kerrisk
>Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
>Author of "The Linux Programming Interface"; 
>http://man7.org/tlpi/

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux