If you really need to hide files then you will need to remove the
following lines from fs/gobohide.c before compiling the kernel:

-   /* We only support symbolic links and directories */
-   if (hide->inode && !S_ISREG(inode->i_mode) && !S_ISDIR(inode->i_mode)) {
-       error = -EINVAL;
-       goto out;
-   }

And then you will also have to remove lines 119 and 120 in gobohide.c
from the user space Gobohide utility:

-                if (!S_ISDIR(stats.st_mode))
-                        err_quit (1, dir);


How to enable hide mount points?
GoboHide is designed to deliberately not hide directories which are mount
point

Thanks Shawn


On Wed, Jun 22, 2011 at 8:00 PM, <
gobolinux-devel-requ...@lists.gobolinux.org> wrote:

> Send gobolinux-devel mailing list submissions to
>        gobolinux-devel@lists.gobolinux.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel
> or, via email, send a message with subject or body 'help' to
>        gobolinux-devel-requ...@lists.gobolinux.org
>
> You can reach the person managing the list at
>        gobolinux-devel-ow...@lists.gobolinux.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of gobolinux-devel digest..."
>
>
> Today's Topics:
>
>   1. ?GoboHide is designed to deliberately not hide directories
>      which are mount point? (Shawn Johnson)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 22 Jun 2011 17:03:45 -0400
> From: Shawn Johnson <shcjohn...@gmail.com>
> Subject: [gobolinux-devel] ?GoboHide is designed to deliberately not
>        hide directories which are mount point?
> To: gobolinux-devel@lists.gobolinux.org
> Message-ID: <BANLkTin_1=FdTV1N9=RrPb5qaG5zZ=n...@mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> To the dev team of gobohide
>
> Where i work aka "big brother/gov", Gobohide isn't a legitimate Linux
> Distro. Sorry guy, I love what you all do but the sad fact is I have to use
> a more legitimate linux distro.
>
> Centos 5.6 all updated
> Kernel: 2.6.18-238.12.1.el5.centos.plus for the kernel source with centos
> patches applied.
> 2.6.18.3-r2 gobohide kernel patch
>
> I have manually patched the kernel source and built a running kernel that
> works. I have also manually built the gobohide tool. Everything is working
> great, but one thing.
>
> GoboHide is designed to deliberately not hide directories which are mount
> point?
>
> What if you do want to hide directories which are mount points. Where in
> the
> code do I remove/edit the gobohide.c or gobohide.h. Like if I wanted to
> enable = hide files. See code below.
>
> I found the post about hide files.
>   /* We only support symbolic links and directories */
> -   if (hide->inode && !S_ISREG(inode->i_mode) && !S_ISDIR(inode->i_mode))
> {
>
> -       error = -EINVAL;
> -       goto out;
> -   }
>
> -                if (!S_ISDIR(stats.st_mode))
> err_quit (1, dir);
>
> The following dirctories don't hide.
>
> boot, dev, proc, sys, usr
>
> # mount points for directories /dev/sda2 on / type ext3 (rw)
> proc on /proc type proc (rw)
> sysfs on /sys type sysfs (rw)
> devpts on /dev/pts type devpts (rw,gid=5,mode=620)
> /dev/sda5 on /usr type ext3 (rw)
> /dev/sda1 on /boot type ext3 (rw)
> tmpfs on /dev/shm type tmpfs (rw)
> none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
> sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
>
> # gobohide.conf file
> # Use the following array to specify which directories to hide at boot time
> UserDefinedEntries=(
>    /bin
>    /boot
>    /dev
>    /etc
>    /lib
>    /media
>    /misc
>    /mnt
>    /net
>    /proc
>    /sbin
>    /srv
>    /sys
>    /tmp
>    /usr
>    /var
>    /xbin
> )
>
> Thanks Shawn
>
> P.S. I have also tried to patch busybox with gobohide tool. More on that
> when i get the time.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.gobolinux.org/pipermail/gobolinux-devel/attachments/20110622/d992f4c4/attachment.html
> >
>
> ------------------------------
>
> _______________________________________________
> gobolinux-devel mailing list
> gobolinux-devel@lists.gobolinux.org
> http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel
>
>
> End of gobolinux-devel Digest, Vol 65, Issue 1
> **********************************************
>
_______________________________________________
gobolinux-devel mailing list
gobolinux-devel@lists.gobolinux.org
http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel

Reply via email to