ver6(Re: [PATCH 3/8] busybox -- SELinux option support for coreutils: ver3
Yuichi Nakamura
himainu-ynakam at miomio.jp
Fri Mar 9 16:29:58 UTC 2007
On Thu, 8 Mar 2007 13:36:59 +0100
Bernhard Fischer wrote:
> >Signed-off-by: Yoshinori Sato <ysato at users.sourceforge.jp>
> Index: coreutils/mkdir.c
> ===================================================================
> --- coreutils/mkdir.c (revision 17961)
> +++ coreutils/mkdir.c (working copy)
> @@ -16,6 +16,11 @@
> * conjunction with -m.
> */
>
> +/* Nov 28, 2006 Yoshinori Sato <ysato at users.sourceforge.jp>
> + *
> + * Add -Z (SELinux) support.
> + */
> +
> Please fix the date and put the description on the same line.
Fixed.
> Index: coreutils/libcoreutils/getopt_mk_fifo_nod.c
> ===================================================================
> --- coreutils/libcoreutils/getopt_mk_fifo_nod.c (revision 17961)
> +++ coreutils/libcoreutils/getopt_mk_fifo_nod.c (working copy)
> @@ -30,11 +30,25 @@
> {
> mode_t mode = 0666;
> char *smode = NULL;
> -
> - getopt32(argc, argv, "m:", &smode);
> - if(smode) {
> +#if ENABLE_SELINUX
> + security_context_t scontext;
> +#endif
> + int opt = 0;
> + opt = getopt32(argc, argv, "m:" USE_SELINUX("Z:"), &smode USE_SELINUX(,& scontext));
>
> nah. Setting opt to 0 is superfluous. Smaller if you use the global option_mask32
> instead of opt here?
Removed "=0".
But not using global value, because Denis said he prefer local "opt".
> + if(opt & 1) {
>
> missing space
> + if(opt & 2) {
> ditto
Fixed.
Yuichi Nakamura
-------------- next part --------------
A non-text attachment was scrubbed...
Name: busybox-coreutils-mk-03.v6.patch
Type: application/octet-stream
Size: 2201 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20070309/ec71e4a0/attachment-0001.obj
More information about the busybox
mailing list