[Samba] Guide to porting to non-unix like systems?
carlos at sinu.com
Sun Apr 29 15:07:02 GMT 2007
I wonder, however, why port a networking system so completely tied-in to POSIX, like SMB, to a non-POSIX OS? What is the need?
"The experience (particularly with Samba3) has been that it is easier to
add a POSIX layer to the OS than to keep 'fixing' samba."
Yes. That also has the added advantage of immediate compatability with other systems that depend on POSIX.
From: samba-bounces+carlos=sinu.com at lists.samba.org on behalf of Andrew Bartlett
Sent: Sat 4/28/2007 12:13 PM
To: Andreas Fredriksson
Cc: samba at lists.samba.org
Subject: Re: [Samba] Guide to porting to non-unix like systems?
On Sat, 2007-04-28 at 00:43 +0200, Andreas Fredriksson wrote:
> I'd like to get a rough idea on how much work it would be to port
> Samba to a non-unix platform. My plan was to use a slimmed-down samba
> to read and write files on a particularly unfriendly piece of
> proprietary hardware we use at work. I'm fine with a minimalistic
> samba as this port would be for internal, single-developer use and not
> intended for file serving in general.
> Here are some things I'm wondering about, given the background:
> 1) Is fork() required, or could it be emulated via threads?
Threads are not an option (we expect that variables will not be shared
after the fork), but in Samba4 we can execute as a single process (as a
> 2) Could nmdb and smbd share a single process w.r.t 1) or is even
> possible to drop nmdb and just serve stuff slowly with a single smbd
nmbd is required for browsing and name registration. In Samba4, it is
just part of the smbd state machine.
> 3) Is Samba very tightly tied to the POSIX file/directory APIs? My
> intended target system has a rich I/O API (including async
> capabilities and various bells and whistles) but the APIs are fairly
> exotic and don't map well to e.g. DIR and file descriptors.
Samba4 is less tied to this than Samba3, but doing without anything like
POSIX will be hard.
> 4) Is there a checklist somewhere of stuff a target system for
> smbd/nmbd would have to support to make a port feasible?
The experience (particularly with Samba3) has been that it is easier to
add a POSIX layer to the OS than to keep 'fixing' samba.
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Red Hat Inc. http://redhat.com
More information about the samba