Re: Cleaned up udev-selinux patch

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

 



found the original message.  not sure if post ever made it to lists.

bug highlighted with ^^^^

please acknowledge receipt of message, confirming awareness of bug in
patch.

thanks.

l.

On Fri, Aug 27, 2004 at 09:32:02AM -0400, Daniel J Walsh wrote:
> Further cleanup and using all static inlines versus defines.  Renamed a 
> couple of functions to make them clearer.
> 
> Dan

> --- /dev/null	2004-06-21 15:29:38.000000000 -0400
> +++ udev-030/selinux.h	2004-08-27 09:26:40.160862612 -0400

> +static inline void selinux_setfscreatecon(char *file, unsigned int mode) {
> +	int retval = 0;
> +	security_context_t scontext=NULL;
> +
> +	if (is_selinux_running()) {
> +		if (matchpathcon(file, S_IFDIR, &scontext) < 0) {
                               ^^^^^^^

 this should be matchpatchon(file, mode, &scontext)

> +			dbg("matchpathcon(%s) failed\n", file);
> +		} else {
> +			retval=setfscreatecon(scontext);
> +			if (retval < 0)
> +				dbg("setfiles %s failed with error '%s'",
> +				    file, strerror(errno));
> +			freecon(scontext);
> +		}

[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux