From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luke Kenneth Casson Leighton Date: Mon, 30 Aug 2004 18:52:44 +0000 Subject: Re: Cleaned up udev-selinux patch Message-Id: <20040830185244.GC25229@lkcl.net> List-Id: References: <403C8AE4.10403@redhat.com> <20040228005300.GA13860@kroah.com> <412DFE7B.6060409@redhat.com> <20040826155716.GA30726@kroah.com> <412E20AF.7000102@redhat.com> <20040826175139.GA12225@kroah.com> <412E34EB.1030909@redhat.com> <20040826225928.GD6058@lkcl.net> <20040826225640.GA13818@kroah.com> <412F37D2.7070105@redhat.com> In-Reply-To: <412F37D2.7070105@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Daniel J Walsh Cc: Greg KH , Bill Nottingham , harald@redhat.com, SELinux , "Fedora SELinux support list for users & developers." , linux-hotplug-devel@lists.sourceforge.net 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); > + } ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_idP47&alloc_id808&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel