From: Ivan Gyurdiev <ivg2@cornell.edu>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: SELinux List <SELinux@tycho.nsa.gov>, Daniel J Walsh <dwalsh@redhat.com>
Subject: Re: Deprecate freecon and freeconary
Date: Tue, 28 Feb 2006 12:32:23 -0500 [thread overview]
Message-ID: <44048927.6090506@cornell.edu> (raw)
In-Reply-To: <1141131654.22297.150.camel@moss-spartans.epoch.ncsc.mil>
>> This patch marks freecon and freeconary as deprecated.
>> All uses of freecon() are changed to free().
>> Uses of freeconary() remain within the library, since this is a useful
>> function.
>>
>
> Given that freeconary() is a useful helper, should we retain it in the
> non-deprecated API but just convert its argument to char** going
> forward?
>
It's not in the selinux_* namespace, and it's trivial to rewrite...
I'm not sure we should expose a function which frees an array of strings.
This isn't related to selinux, it's a string utility function.
>> stdlib.h has been included where appropriate.
>> stddef.h has been included where size_t was needed
>> Manpages and comments have been edited appropriately.
>>
>> The next logical patch is to remove security_context_t, and replace it
>> with char*, although I'm not sure whether that should be done throughout
>> the library, or just in the API.
>>
>
> We'll likely need to retain the type definition in the API for
> compatibility with externally maintained code (e.g. SELinux userland
> patches that have migrated into other distributions and in some cases
> into the upstream packages).
Right, I didn't mean to remove the typedef statement. I was wondering
whether we should re-write the function prototypes and manpages not to
mention it.
>> 1. Freecon and freeconary are not in a proper namespace. All such
>> functions should be deprecated and replaced in general.
>>
>
> Not sure if this is truly justified for all such functions, e.g.
> getfilecon, setfilecon, setexeccon, etc are basic primitives that could
> easily have been implemented as system calls (and were originally) if
> that had been an option. The core API (wrappers of kernel APIs) can
> likely be left alone aside from security_context_t -> char* conversion.
>
...if they're not syscalls anymore, then I don't see why they shouldn't
follow the naming rules as all other functions. Anyway, I won't send any
patches to rename things right now - there were reasons other than the
naming to look at deprecating freecon* and context_*.
--
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.
next prev parent reply other threads:[~2006-02-28 17:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-27 22:16 Deprecate freecon and freeconary Ivan Gyurdiev
2006-02-28 13:00 ` Stephen Smalley
2006-02-28 17:32 ` Ivan Gyurdiev [this message]
2006-03-09 17:44 ` Stephen Smalley
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=44048927.6090506@cornell.edu \
--to=ivg2@cornell.edu \
--cc=SELinux@tycho.nsa.gov \
--cc=dwalsh@redhat.com \
--cc=sds@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.