[patch]setfiles/restorecon applet
Bernhard Fischer
rep.dot.nop at gmail.com
Mon Jul 23 14:25:19 UTC 2007
On Mon, Jul 23, 2007 at 02:56:57PM +0100, Denis Vlasenko wrote:
>On 7/23/07, Bernhard Fischer <rep.dot.nop at gmail.com> wrote:
>>On Mon, Jul 23, 2007 at 10:16:38AM +0900, Yuichi Nakamura wrote:
>>>Hi.
>>
>>in setfiles_full_usage:
>>"\n -q Suppress no-error output" \
>>do you mean "Suppress warnings" or "be quiet" or the like?
>>
>>selinux/setfiles.c:
>>Port to BusyBox by 2007
>>s/by 2007/(c) 2007 by/
>
>I already applied patch to svn...
>
>>in struct globals, i, personally prefer bools (smaller for me on x86),
>>just as a sidenote.
>
>bools are smaller than smallints (which are chars on i386)?
smaller than ints.
>I don't understand how.
>
>I introduced smallints specifically because *I* want to be able
>to control what they are, not gcc. gcc people hate us.
let's assume they don't :)
>(No, not really, but they aren't thinking too much about
>saving on size - see my rant on idiotic recent i386
>stack alignment disaster.)
Saw it. Does -mno-sse -mno-sse2 etc help? (didn't try).
My CC is usually configured with --with-march=i386 --with-tune=i386,
fwiw.
>
>>in add_exclude can use use const char*const directory? (didn't look
>>closely). Also, you seem to reimplement something like basename or
>>last_path_component there. Furthermore should return type bool.
>>Initializing len to 0 looks like it is superfluous.
>
>Yuichi, please look into it and send all follow-on patches relative to svn.
>
>>likewise a couple of others should return a bool:
>>-+static int exclude(const char *file)
>>++static bool exclude(const char *file)
>>
>>match():
>>+ if (excludeCtr > 0) {
>>+ if (exclude(name)) {
>>+ goto err;
>>+ }
>>+ }
>>Please change to
>> if (excludeCtr > 0 && exclude(name))
>> goto err;
>>(perhaps in a couple of other places too. (run, from the toplevel
>>sourcedir 'indent selinux/*' for other misc style-cleanups.)
>>near "if (expand_realpath) {", move the
>>+ if (excludeCtr > 0 && exclude(name))
>>+ goto err;
>>out of both branches if if-else.
>>
>>
>>restore(): user_only_changed can be bool. Isn't there a sanitize_path()
>>that you could reuse for stripping multiple slashes off?
>>
>>[snipping the rest of you patch for now]
>>HTH,
>--
>vda
>
More information about the busybox
mailing list