Re[2]: functions that are responsible for copying/reading

Buratino x9nx at mail.ru
Tue Jun 7 19:43:53 MDT 2011


> Buratino wrote:
> > Tue, 07 Jun 2011 19:39:10 -0500 письмо от "Christopher R. Hertel"
> <crh at ubiqx.mn.org>:
> > 
> >> Buratino wrote:
> >>> Good daytime gentlemen.
> >>>
> >>> 1. Where can i find functions that are responsible for copying/reading
> >> files and are those calls distinct.
> >>> Sincerely,
> >>> Buratino
> >> Client or server side?
> >>
> >> That is, do you mean the client reading and writing via the SMB connection
> >> to an opened file or do you mean the server reading and writing to/from the
> >> open file on the local disk?
> >>
> >> If you want to see how clients handle reading and writing, I would
> recommend
> >> looking at the jCIFS client code:  http://jcifs.samba.org/
> >>
> >> Chris -)-----
> >>
> >> -- 
> >> "Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
> >> Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
> >> jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
> >> ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
> >> OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org
> > 
> > Server side. The idea is adding a constant list of nodes it will deny
> copying operations from.
> > Maybe i will have to distinct by caller though. like a hash or so.
> > I am looking into smbd/open.c
> 
> -- 
> "Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
> Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
> jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
> ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
> OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org

> Tue, 07 Jun 2011 20:21:37 -0500 письмо от "Christopher R. Hertel" <crh at ubiqx.mn.org>:
> Well...  First off, the file I/O level is not the best place at which block
> data access.  The SMB protocol is much more interested in users and
> individual user rights.  You can deny read or write access to files via SMB
> based upon user credentials.  That would be the easiest approach.

Thank you for the API. It seems to be very clear that a client would open a stream for reading and a stream for writing
having samba check the permissions in between.

The goal is to prevent copying, now i know _reading_ dbf files from a specific folder leaving read/write access to those files to a specific db.exe program
Since it is impossible to distinguish what program is asking the stream from a windows machine there is no solution to the problem. So far...

"Oh what a twisted web we weave!" (c) smbd/open.c


More information about the samba-technical mailing list