Query for project

0 views
Skip to first unread message

Tejas

unread,
Oct 16, 2008, 9:53:47 AM10/16/08
to JIITU-LUG
Hello Everyone

First of all, I would thanks our seniors for organizing a vibrant,
energetic and inspirational session. I have a query regarding my
project in unix, which is a small application just as a folder lock in
unix. I plan to do it using a shell script, but my query is, can i
program it in a way, such that every time a user opens a new folder,
the script gets activated and checks whether the folder is protected
or not? And so on..... Please help on this.... And if any better
suggestion, please do send it to me.

Thanks in advance.

Tejas

Angad Singh

unread,
Oct 16, 2008, 11:24:32 AM10/16/08
to jii...@googlegroups.com
Hi Tejas,

Although I was not able to attend the linux event organized recently due to previous commitments, I'm sure Prakhar, Ankur, etc. have done a good job. There are 2 ways to program the solution to this problem: In the userspace and kernel space. A kernel space implementation would be costlier to implement, as it requires tapping into the system calls which are responsible for reading the filesystem (opening of folder, etc.). I would rather suggest a userspace implementation.

You can use the SystemTap libraries to probe (instrument) whenever a folder gets created / opened. To protect the folder, you can simply add an extended attribute to the folder's inode - an encrypted string having the password. You can create a daemon (equivalent to a 'service' on windows), which runs all the time in the background. Once you detect that a folder is opened (using systemtap in your daemon), you can spring up a QT based GUI to ask for the password.

Systemtap:

Creating a daemon:

QT:

Hope that helps.

On Thu, Oct 16, 2008 at 7:23 PM, Tejas <tejask...@gmail.com> wrote:

Hello Everyoneis



--
Angad Singh
http://angadsingh.in

TEJAS PALAN

unread,
Oct 20, 2008, 10:32:04 AM10/20/08
to jii...@googlegroups.com
Thanx a ton sir, i went mad searching 4 things............
 
I'll try this out, and incase some problems come out, i'll ask u again.
 
REGARDS....
TEJAS

On Thu, Oct 16, 2008 at 8:54 PM, Angad Singh <an...@angadsingh.in> wrote:
Hi Tejas,

Although I was not able to attend the linux event organized recently due to previous commitments, I'm sure Prakhar, Ankur, etc. have done a good job. There are 2 ways to program the solution to this problem: In the userspace and kernel space. A kernel space implementation would be costlier to implement, as it requires tapping into the system calls which are responsible for reading the filesystem (opening of folder, etc.). I would rather suggest a userspace implementation.

You can use the SystemTap libraries to probe (instrument) whenever a folder gets created / opened. To protect the folder, you can simply add an extended attribute to the folder's inode - an encrypted string having the password. You can create a daemon (equivalent to a 'service' on windows), which runs all the time in the background. Once you detect that a folder is opened (using systemtap in your daemon), you can spring up a QT based GUI to ask for the password.

Systemtap:

Creating a daemon:

QT:

Hope that helps.

On Thu, Oct 16, 2008 at 7:23 PM, Tejas <tejask...@gmail.com> wrote:

Hello Everyone


First of all, I would thanks our seniors for organizing a vibrant,
energetic and inspirational session. I have a query regarding my
project in unix, which is a small application just as a folder lock in
unix. I plan to do it using a shell script, but my query is, can i
program it in a way, such that every time a user opens a new folder,
the script gets activated and checks whether the folder is protected
or not? And so on..... Please help on this.... And if any better
suggestion, please do send it to me.

Thanks in advance.

Tejas


Angad Singh

unread,
Oct 20, 2008, 2:52:27 PM10/20/08
to jii...@googlegroups.com
On Mon, Oct 20, 2008 at 8:02 PM, TEJAS PALAN <tejask...@gmail.com> wrote:
Thanx a ton sir, i went mad searching 4 things............
 
I'll try this out, and incase some problems come out, i'll ask u again.
 
REGARDS....
TEJAS

Sure thing Tejas. Looking forward to hearing how it worked out :)
Reply all
Reply to author
Forward
0 new messages