All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karl MacMillan <kmacmillan@mentalrootkit.com>
To: SE Linux <selinux@tycho.nsa.gov>
Subject: Re: policyrep questions
Date: Wed, 09 May 2007 10:13:25 -0400	[thread overview]
Message-ID: <1178720005.2379.37.camel@localhost.localdomain> (raw)
In-Reply-To: <1178663380.2379.11.camel@localhost.localdomain>

On Tue, 2007-05-08 at 18:29 -0400, Karl MacMillan wrote:
> 
> 3) The existing objects copy the passed in strings where I was hoping to
> avoid the copy. Any opinions either way? I'm currently leaning towards
> copying because that kind of change will create hard to track down bugs
> for no good reason.
> 

To make things more confusing - some of the existing code copies strings
while others do not. For example sepol_bool_set_name copies the string
while sepol_bool_key_create does not. I assume that the thought was that
the keys were temporary and likely to be populated from other sources
(existing bools, user input, etc.).

However - I think that this inconsistency is just confusing. I'm going
to change all of the functions to copy the strings. Changing in this
direction means the worst case is that a few strings will be leaked.

Karl


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

  reply	other threads:[~2007-05-09 14:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-08 22:29 policyrep questions Karl MacMillan
2007-05-09 14:13 ` Karl MacMillan [this message]
2007-05-09 15:30   ` Stephen Smalley
2007-05-09 15:29 ` Stephen Smalley
2007-05-09 15:51   ` Karl MacMillan
2007-05-09 16:34   ` James Antill

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=1178720005.2379.37.camel@localhost.localdomain \
    --to=kmacmillan@mentalrootkit.com \
    --cc=selinux@tycho.nsa.gov \
    /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.