Re: [PATCH] libselinux: fix audit2why error handling if SELinux is disabled.

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

 



On Fri, Feb 13, 2015, at 10:43 AM, Stephen Smalley wrote:
>
> +		if (!curpolicy) {
> +			/* SELinux disabled, must use -p option. */
> +			snprintf(errormsg, sizeof(errormsg),
> +				 "You must specify the -p option with the path to the policy file.\n");
> +			PyErr_SetString( PyExc_ValueError, errormsg);

Personally I try to avoid using printf without any format strings, because
it's easier to add format string errors later.  Just:

PyErr_SetString(PyExc_ValueError, "You must specify the -p option with the path to the policy file.\n");

?

With or without that change though, the patch looks fine to me.
_______________________________________________
Selinux mailing list
Selinux@xxxxxxxxxxxxx
To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx.
To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.




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

  Powered by Linux