Re: Fixes for libselinux/matchpathcon

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

 



On 05/07/2009 02:18 PM, Chad Sellers wrote:
On 4/1/09 10:19 AM, "Daniel J Walsh"<dwalsh@xxxxxxxxxx>  wrote:
<snip>
If matchpathcon returns ENOENT, we return<<none>>

matchpathcon doesn't set errno. The underlying selabel functions do, which
is why this works sometimes. Unfortunately, you don't know which of the
underlying functions set errno, so you display<<none>>  if any of them set
errno to ENOENT. For instance, if the file_contexts file is missing, the
selabel_open() call sets errno to ENOENT. It would be better to change
matchpathcon() itself (and possibly it's underlying functions like
matchpathcon_init()) to report back errors depending on what failed.

Thanks,
Chad


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with
the words "unsubscribe selinux" without quotes as the message.
Patches accepted.

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with
the words "unsubscribe selinux" without quotes as the message.

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

  Powered by Linux