Tuesday, January 19, 2010

[nslu2-linux] Hooking SAMBA access to script?

 


A more deeper question on this:

________________________________________________________________________ 1b. Re: Hooking SAMBA access to script?     Posted by: "Mike Westerhof (mwester)" mwester@dls.net mjwest61     Date: Mon Jan 18, 2010 10:22 am ((PST))  Mai Kee Reis wrote:   
Hello friends of tiny linux boxes,  I wonder if anybody could give me an advice how to hook some script to each fopen(), when initiated by a remote client. Currently, I'm running Samba 3.2.8 on a NSLU2 rev.2 (uname -a: Linux Nslu2.home 2.6.27.8 #1 Sat Mar 7 06:32:59 UTC 2009 armv5tel unknown unknown GNU/Linux)  The idea is to catch all access to *.mp3 and *.ogg files from user 'audioplayer' to create some last played / most played / least played playlist files. Thus, it's not required to have it in real time.  Of course I asked google (just found a lot "if-down.d hook samba") and my local smb.conf (/var/log/samba/log.%m has no filenames).  Any hint? Impossible without patching samba?        
Yes, impossible without patching samba.  -Mike (mwester)    
SWAT (Samba Web Admin Tool) has knowledge about such access:
Does anybody know, if SWAT is part of the same binary or if SWAT just communicates with smbd?
In case of communicatrion, this would be the more effective approach to netcat / tee its data, right?

Se SWAT fragment:

Offene Dateien

PID UID Sharing R/W Oplock Datei Datum
15698 500 DENY_DOS RDWR EXCLUSIVE+BATCH kill_debris.sh Tue Jan 19 17:59:38 2010

this is while I had opened kill_debris.sh from remote system with editor


Mai K. Reis

__._,_.___
.

__,_._,___

No comments:

Post a Comment