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/
in struct globals, i, personally prefer bools (smaller for me on x86),
just as a sidenote.
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.
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,
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox