[Samba] Guide to porting to non-unix like systems?

simo idra at samba.org
Fri Apr 27 23:05:26 GMT 2007

On Sat, 2007-04-28 at 00:43 +0200, Andreas Fredriksson wrote:
> Hi,
> 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.

this kind of question would be served better if posted on
samba-technical at samba.org as it is about technical matters.

> Here are some things I'm wondering about, given the background:
> 1) Is fork() required, or could it be emulated via threads?
> 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
> process?
> 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.
> 4) Is there a checklist somewhere of stuff a target system for
> smbd/nmbd would have to support to make a port feasible?

If you don't have fork, and have a btter I/O API I'd direct you at
looking at samba4.

Samba4 can run in a single process.

Samba4 integrates the NBT functionality without requiring a second

In Samba4 you can write NTVFS modules without necessarily using posix
semantics (like samba3 vfs layer require instead).

While samba4 is still not released it should be ok for the kind of use
you have in mind.

Samba4 can have a better memory footprint as well.


Simo Sorce
Samba Team GPL Compliance Officer
email: idra at samba.org

More information about the samba-technical mailing list