Hi, I was wondering if anyone has done any investigations into how to serve data to Samba via a script/application, rather than directly from the file system? Or a way to map a script into the file system? Basically, I have an Intranet site (hosted on RH6.2) that builds a virtual directory structure from a database, so you can access http://servername/file/virtual/path/to/file.ext, and the access rights, file version, etc. are derived from the database. I want users to be able to have read-only access to the same files from NT boxes via Samba, but still using the database for access control/versioning. I've looked at extending the source code to support this as another type (as with printers), but I can't distinguish between local filesystem access for Samba versus local filesystem access for client file requests. Of course, I'd prefer to be able to support this using a virtual-FS so I don't have to change Samba, but I've been unable to find any tools that will do it... Any hints or suggestions much appreciated, Chris.
did you look at the samba VFS? some c programming with that and i.e. the database API (such as mysql++) should do the trick. --Anders -----Original Message----- From: samba-technical-admin@us5.samba.org [mailto:samba-technical-admin@us5.samba.org]On Behalf Of harakan@btinternet.com Sent: Tuesday, January 09, 2001 1:44 PM To: samba@us5.samba.org Cc: samba-technical@us5.samba.org Subject: Serving data from a script Hi, I was wondering if anyone has done any investigations into how to serve data to Samba via a script/application, rather than directly from the file system? Or a way to map a script into the file system? Basically, I have an Intranet site (hosted on RH6.2) that builds a virtual directory structure from a database, so you can access http://servername/file/virtual/path/to/file.ext, and the access rights, file version, etc. are derived from the database. I want users to be able to have read-only access to the same files from NT boxes via Samba, but still using the database for access control/versioning. I've looked at extending the source code to support this as another type (as with printers), but I can't distinguish between local filesystem access for Samba versus local filesystem access for client file requests. Of course, I'd prefer to be able to support this using a virtual-FS so I don't have to change Samba, but I've been unable to find any tools that will do it... Any hints or suggestions much appreciated, Chris.
Hi, Excuse my stupidity, but I still can't figure out how to get this to work. I read through David's tutorial, and I understand the concept, the approach, and the functions that he describes in his examples, BUT... How do I actually *compile* SAMBA to include a VFS??? I have the 2.0.7 source code, and the VFS tutorial files. I can find no references to VFS in the Samba source code, no files with the name "vfs.c" as is mentioned in the ChangeLog, and no VFS examples or hook points. Where do I put the skeleton VFS example, and how do I point Samba to it??? Yours in hope and frustration, Chris. ----- Original Message ----- From: "David Collier-Brown" <David.Collier-Brown@canada.sun.com> To: "Harakan Software" <harakan@btinternet.com> Sent: Wednesday, January 10, 2001 2:04 PM Subject: Re: Serving data from a script Harakan Software wrote:> > Hi, > > Based on an old email I managed to find in a mailing list archive, I've > found out about this cool feature - I wasn't aware of it before, but it > sounds exactly like what I need. > > I've downloaded both the 2.0.7 and 2.2.0beta5 source trees, and I can'tfind> any examples or documentation on this feature, though. Could you tell me > where I can get hold of the documentation/examples for Samba VFS? > Alternatively, how do I add a VFS to the Samba source tree? >I did a tutorial for a slightly older version, attached... --dave -- David Collier-Brown, | Always do right. This will gratify Performance & Engineering Team | some people and astonish the rest. Americas Customer Engineering | -- Mark Twain (905) 415-2849 | davecb@canada.sun.com