lkml.org 
[lkml]   [2004]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectcan i modify ls
Date
Hello Everyboy.
i am new to this mailing list, so please bear with me if i don't follow
certain rules till i get used to it. I am a research student and currently
working on a project to tweak the working of 'ls' command depending on my
requirement. I have observed that 'ls' show ALL THE FILES and DIRECTORIES in
a particular location even though a user has no access rights to it. I want
to hide all
such files for that particular user.

The Algorithm i beleive should work like this when an 'ls' command is
called.

1. Check the current directory.
2. Extract the files or directory to be displayed.
3. Check the user permissions for these files.
4. Display only those files wher user had either read, write or execute
access for all owner,group and others.

I have found out that 'ls' uses getdents64() system call for gathering the
directory information. How do i move ahead from here.

Regards,
Gautam Pagedar
Centre for Information and Network Security










-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.078 / U:0.808 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site