As I understood from a couple of posted messages, this problem regularly pops up in the news. It also seems that Samba doesn't support this feature. So, if I can spend enough time on it, I might consider starting. My first question is, of course: has anyone written this feature ? or even started or tried ? Without much digging in the Samba code yet, I can already point out the following: - conversion is a lot more complex than the codepage stuff, as the number of characters change; - this has a very big impact if a client reads, writes, and seeks at random in a file; - I'm thinking of two possible implementations, there are surely others: - either copy the whole converted file into some temporary disk cache, and use that one for the transactions with the client. (don't forget to copy it back at close time if it has been updated); - or buffer blocks in memory. It has to be in shared memory, with access control (semaphores), as several smbd instances might access the same file at the same time. Note that shared memory and semaphores are not used the same way on all Unix platforms. The system should be configurable: - allow to specify a list of file-specs (a la 'hide files') for files to convert (forced ascii), - the same for files not to convert (forced binary), - for others: detect the file type from the first n bytes, - conversion mode could be forced off for some clients (i.e. other Samba servers on Unix platforms), but then it gets really ugly if two clients access (read, write, seek) the same ascii file, one being a Win*-OS/2 client, the other being a Unix Samba server... Has anyone any idea / suggestion / warning ? Thanks in advance, Sebastien Bauer email: seb _ bauer, at, bigfoot, dot, com - please rebuild address before sending, thanks to spammers! :-( PS: I'm taking two weeks off, so I won't be able to answer immediately. If you post a reply to the comp.protocols.smb newsgroup, please also send a copy either to me or to the samba mailing list - Thanks!
TSEB@EUROPAY.com wrote:> > As I understood from a couple of posted messages, this problem regularly > pops up in the news. It also seems that Samba doesn't support this > feature. So, if I can spend enough time on it, I might consider > starting. My first question is, of course: has anyone written this > feature ? or even started or tried ? > > Has anyone any idea / suggestion / warning ? >I have a comment. I must confess I am averse to file servers that modify the content of the files they are serving. I currently have to maintain the AppleTalk Netatalk file sharing code for Whistle (my employer) as well as working on Samba, and one of the first things I removed from that code was the (buggy) code to do the CRLF translations. It tends to slow things down all over the code, and what's more it's a nightmare to get right - as an added bonus lots of applications will break :-). Please consider not writing this code and working on some other part of Samba :-) :-). Cheers, Jeremy Allison, Samba Team. -- -------------------------------------------------------- Buying an operating system without source is like buying a self-assembly Space Shuttle with no instructions. --------------------------------------------------------
I think I'll add my own $.02 here (and I think I might have his project, too. :)> > pops up in the news. It also seems that Samba doesn't support this > > feature. So, if I can spend enough time on it, I might consider > > starting. My first question is, of course: has anyone written this > > feature ? or even started or tried ? > I have a comment. I must confess I am averse to > file servers that modify the content of the files > they are serving.I have a question. Aren't file servers supposed to store files, not change them?> the AppleTalk Netatalk file sharing code for > Whistle (my employer) as well as working on > Samba,Brief interjection: any one with a corporate intranet, could you please let me know what your system is like, any problems you've experienced, etc. as I'm in charge if developing ours, and I'd like to keep it on something other than NT.> It tends to slow things down all over the > code, and what's more it's a nightmare to > get right - as an added bonus lots of > applications will break :-).Yes, and you have to be absolutely certain that the system isn't modifying any binary files, and you still have the problem of the server changing files. There's something inherently scary about that.> Please consider not writing this code and > working on some other part of Samba :-) :-).I've got a project for him: incorporate reverse name lookups for nmbd. :)