Franky

From SambaWiki

On May 8, 2008, a gaggle of samba developers came together in a sambaXP followup meeting in Göttingen at SerNet, and the idea was born to combine the best parts of Samba3 and Samba4 to form Franky - a complete Samba Active Directory server that is also a performant file server and a print server.


The Idea - A Hybrid Samba Active Directory Controller

The Samba4 and Samba3 daemons should run in parallel and the tasks should be distributed among the processes. The various deamons should communicate via unix domain sockets.

One essential part for the feasibility of the project is Volker Lendecke's recent work on Samba 3 on adding the ability to delegate named pipes (dcerpc services) to external programs over unix domain sockets.


The Plumbing Design

This is the basic idea of how to distribute the tasks:

  • The main daemon to be run is the Samba4 smbd.
  • smbd4 listens on the Kerberos, LDAP, CLDAP, GC, Endpoint mapper and WINS ports.
  • smbd4 offers the named pipes samr, lsa, netlogon, epm, and drsuapi
  • smbd4 forks smbd3 (and other samba3 daemons)
  • smbd3 listens on the smb ports (139/445)
  • smbd3 offers the named pipes spoolss and possibly winreg
  • nmbd3 offers browsing (138) (or else add browsing support would have to be completed in samba4)
  • samba3 winbindd talks to trusted domains

The daemons have to talk to each other in order for the scenario to work.

See the notes from the meeting for more details.

Name Of The Game

The codename Franky was coined for the combined Samba branch.

TODOs

  • make smbd4 talk to samba3 winbind.
  • either add browsing support to samba4 or disable all but browsing in samba3 nmbd.
  • extend the samba4 endpoint mapper to allow registering external services dynamically

At some later point:

  • reconcile configuration files and options

Branches

Updating your branches to the combined build

Because we had to rewrite the history to be able to merge Samba3's source dir to source3 and Samba4's source dir as source4, your branches will not apply to the combined tree anymore. Here is a quick guide how to move your branches to the combined tree.

Let's assume we have a branch tracking the v3-devel branch, this will work alike for other branches.

First, extract your patches from your branch using git format-patch.

$ git format-patch --stdout origin/v3-devel | sed -e 's#+++ b/source#+++ b/source3#' | sed -e 's#--- a/source#--- a/source3#' > ~/my_branch.mbox

Notice that we cheat and rewrite the diff locations of the files from source/ to source3/. For a Samba4 branch, you would do the same, changing the replacement to source4 instead.

Once we're done with that, we can cd into the merged tree, recreate the branch and apply our patches using git am.

$ git checkout -b my_branch origin/master
$ git am ~/my_branch.mbox

And we're done.

Building

To build the integrated Samba:

$ cd source3
$ ./configure --enable-merged-build

After that, proceed as usual:

$ make

This should build all of Samba 3 as well as Samba 4's smbd and smbtorture.

Notes