All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
To: Daniel J Walsh <dwalsh@redhat.com>
Cc: Greg KH <greg@kroah.com>, Bill Nottingham <notting@redhat.com>,
	harald@redhat.com, SELinux <SELinux@tycho.nsa.gov>,
	"Fedora SELinux support list for users & developers."
	<fedora-selinux-list@redhat.com>,
	linux-hotplug-devel@lists.sourceforge.net
Subject: Re: Cleaned up udev-selinux patch
Date: Thu, 26 Aug 2004 22:59:28 +0000	[thread overview]
Message-ID: <20040826225928.GD6058@lkcl.net> (raw)
In-Reply-To: <412E34EB.1030909@redhat.com>

perhaps the style should be that the Makefile adds some code
add_selinux.c based on a configure-time option,

and that some #ifdefs in a header file call a function which
is a stub in the header if WITH_SELINUX is not defined.

bizarre_but_likely_quite_good_coding_style_never_encountered_before.h:

#ifdef WITH_SELINUX
int do_add_selinux_stuff(args) { return 0; }
#else
#define do_add_selinux_stuff the_real_add_selinux_stuff
#endif

and add_selinux.c contains:

int the_real_add_selinux_stuff(args)
{
	....

	return err;
}


On Thu, Aug 26, 2004 at 03:07:23PM -0400, Daniel J Walsh wrote:
> Greg KH wrote:
> 
> >On Thu, Aug 26, 2004 at 01:41:03PM -0400, Daniel J Walsh wrote:
> > 
> >
> >>Greg KH wrote:
> >>
> >>   
> >>
> >>>On Thu, Aug 26, 2004 at 11:15:07AM -0400, Daniel J Walsh wrote:
> >>>
> >>>
> >>>     
> >>>
> >>>>This will create the security contexts on the fly.
> >>>>
> >>>>Please comment on what would be needed to get this acceptable?
> >>>> 
> >>>>
> >>>>       
> >>>>
> >>>Same things I said on the mailing list:
> >>>	- fix coding style
> >>>	- no ifdefs in .c files
> >>>	- make the selinux stuff all be in its own file
> >>>	- make the build flag look like the other build flags
> >>>	- not make the makefile changes have silly line continuations
> >>>	  when not needed :)
> >>>	- post the patch on the mailing list (linux-hotplug-devel) for
> >>>	  others to comment on after fixing the above.
> >>>
> >>>thanks,
> >>>
> >>>greg k-h
> >>>
> >>>
> >>>     
> >>>
> >>Another pass at a cleaned up patch.  This time attempting to folow Greg 
> >>guidelines.
> >>   
> >>
> >
> >Looks good.  Do you really want it all in a .h file?  I don't mind
> >having the selinux functions being in a .c file and building that if
> >USE_SELINUX is enabled.
> >
> >But it's your call, as you are the one going to have to live with the
> >code :)
> >
> >thanks,
> >
> >greg k-h
> > 
> >
> I copied the way it was being done with logging.h
> 
> I already have some updates from comments from other people.
> 
> Dan
> 
> --
> This message was distributed to subscribers of the selinux mailing list.
> If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov 
> with
> the words "unsubscribe selinux" without quotes as the message.

-- 
--
Truth, honesty and respect are rare commodities that all spring from
the same well: Love.  If you love yourself and everyone and everything
around you, funnily and coincidentally enough, life gets a lot better.
--
<a href="http://lkcl.net">      lkcl.net      </a> <br />
<a href="mailto:lkcl@lkcl.net"> lkcl@lkcl.net </a> <br />



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
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

WARNING: multiple messages have this Message-ID (diff)
From: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
To: Daniel J Walsh <dwalsh@redhat.com>
Cc: Greg KH <greg@kroah.com>, Bill Nottingham <notting@redhat.com>,
	harald@redhat.com, SELinux <SELinux@tycho.nsa.gov>,
	"Fedora SELinux support list for users & developers."
	<fedora-selinux-list@redhat.com>,
	linux-hotplug-devel@lists.sourceforge.net
Subject: Re: Cleaned up udev-selinux patch
Date: Thu, 26 Aug 2004 23:59:28 +0100	[thread overview]
Message-ID: <20040826225928.GD6058@lkcl.net> (raw)
In-Reply-To: <412E34EB.1030909@redhat.com>

perhaps the style should be that the Makefile adds some code
add_selinux.c based on a configure-time option,

and that some #ifdefs in a header file call a function which
is a stub in the header if WITH_SELINUX is not defined.

bizarre_but_likely_quite_good_coding_style_never_encountered_before.h:

#ifdef WITH_SELINUX
int do_add_selinux_stuff(args) { return 0; }
#else
#define do_add_selinux_stuff the_real_add_selinux_stuff
#endif

and add_selinux.c contains:

int the_real_add_selinux_stuff(args)
{
	....

	return err;
}


On Thu, Aug 26, 2004 at 03:07:23PM -0400, Daniel J Walsh wrote:
> Greg KH wrote:
> 
> >On Thu, Aug 26, 2004 at 01:41:03PM -0400, Daniel J Walsh wrote:
> > 
> >
> >>Greg KH wrote:
> >>
> >>   
> >>
> >>>On Thu, Aug 26, 2004 at 11:15:07AM -0400, Daniel J Walsh wrote:
> >>>
> >>>
> >>>     
> >>>
> >>>>This will create the security contexts on the fly.
> >>>>
> >>>>Please comment on what would be needed to get this acceptable?
> >>>> 
> >>>>
> >>>>       
> >>>>
> >>>Same things I said on the mailing list:
> >>>	- fix coding style
> >>>	- no ifdefs in .c files
> >>>	- make the selinux stuff all be in its own file
> >>>	- make the build flag look like the other build flags
> >>>	- not make the makefile changes have silly line continuations
> >>>	  when not needed :)
> >>>	- post the patch on the mailing list (linux-hotplug-devel) for
> >>>	  others to comment on after fixing the above.
> >>>
> >>>thanks,
> >>>
> >>>greg k-h
> >>>
> >>>
> >>>     
> >>>
> >>Another pass at a cleaned up patch.  This time attempting to folow Greg 
> >>guidelines.
> >>   
> >>
> >
> >Looks good.  Do you really want it all in a .h file?  I don't mind
> >having the selinux functions being in a .c file and building that if
> >USE_SELINUX is enabled.
> >
> >But it's your call, as you are the one going to have to live with the
> >code :)
> >
> >thanks,
> >
> >greg k-h
> > 
> >
> I copied the way it was being done with logging.h
> 
> I already have some updates from comments from other people.
> 
> Dan
> 
> --
> This message was distributed to subscribers of the selinux mailing list.
> If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov 
> with
> the words "unsubscribe selinux" without quotes as the message.

-- 
--
Truth, honesty and respect are rare commodities that all spring from
the same well: Love.  If you love yourself and everyone and everything
around you, funnily and coincidentally enough, life gets a lot better.
--
<a href="http://lkcl.net">      lkcl.net      </a> <br />
<a href="mailto:lkcl@lkcl.net"> lkcl@lkcl.net </a> <br />


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

  parent reply	other threads:[~2004-08-26 22:59 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20040223213614.GA12242@devserv.devel.redhat.com>
     [not found] ` <20040224233859.GA3265@kroah.com>
     [not found]   ` <20040224234652.GA14775@devserv.devel.redhat.com>
     [not found]     ` <403C8AE4.10403@redhat.com>
     [not found]       ` <20040228005300.GA13860@kroah.com>
     [not found]         ` <412DFE7B.6060409@redhat.com>
     [not found]           ` <20040826155716.GA30726@kroah.com>
2004-08-26 17:41             ` Cleaned up udev-selinux patch Daniel J Walsh
2004-08-26 17:41               ` Daniel J Walsh
2004-08-26 17:51               ` Greg KH
2004-08-26 19:07                 ` Daniel J Walsh
2004-08-26 19:07                   ` Daniel J Walsh
2004-08-26 19:14                   ` Greg KH
2004-08-26 19:14                     ` Greg KH
2004-08-26 22:59                   ` Luke Kenneth Casson Leighton [this message]
2004-08-26 22:59                     ` Luke Kenneth Casson Leighton
2004-08-26 22:56                     ` Greg KH
2004-08-26 22:56                       ` Greg KH
2004-08-27 13:32                       ` Daniel J Walsh
2004-08-27 13:32                         ` Daniel J Walsh
2004-08-27 15:42                         ` Luke Kenneth Casson Leighton
2004-08-27 15:42                           ` Luke Kenneth Casson Leighton
2004-08-30 18:52                         ` Luke Kenneth Casson Leighton
2004-08-30 18:52                           ` Luke Kenneth Casson Leighton
2004-08-27 14:28                       ` Luke Kenneth Casson Leighton
2004-08-27 14:28                         ` Luke Kenneth Casson Leighton
2004-08-26 22:56               ` Luke Kenneth Casson Leighton
2004-08-26 23:02                 ` Luke Kenneth Casson Leighton
2004-08-27 15:36               ` James Morris
2004-08-27 15:36                 ` James Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040826225928.GD6058@lkcl.net \
    --to=lkcl@lkcl.net \
    --cc=SELinux@tycho.nsa.gov \
    --cc=dwalsh@redhat.com \
    --cc=fedora-selinux-list@redhat.com \
    --cc=greg@kroah.com \
    --cc=harald@redhat.com \
    --cc=linux-hotplug-devel@lists.sourceforge.net \
    --cc=notting@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.