Re: selinux context_new return value question

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/28/2012 05:09 AM, Gaurav Kumar wrote:
> According to http://linux.die.net/man/3/context_new, "On success, zero is
> returned" but none of the functions mentioned return 0. They are all
> returning const char * or void. Can someone please clarify in which case 0
> will be returned? In other words, how can I find out if call to context_new
> succeeded?
> 
> Thanks, Gaurav
> 
> -- 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.
> 
> 
It is a bug.  NULL (0) actually would be the error code.  Since context_new is
basically doing a malloc of a new structure.

I will fix the code in Fedora and work to get it upstream.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlA8qKQACgkQrlYvE4MpobOp5wCfVOA4K7/MyqeLLWx2rN/9IQIH
VpUAoI2D8wB0NPHif03SMHYdRSkRuQGD
=as8V
-----END PGP SIGNATURE-----

--
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