functions that are responsible for copying/reading
Christopher R. Hertel
crh at ubiqx.mn.org
Tue Jun 7 19:50:52 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.
>>>> 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
>>>> looking at the jCIFS client code: http://jcifs.samba.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
If a client computer can read a file, it can copy a file. There is really
no way to distinguish between the two at the SMB protocol level, or the file
system level for that matter. Copying is the same operation as reading.
It's all a matter of what the client does with the bits.
"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
More information about the samba-technical