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 samba daemon.
- samba4 listens on the Kerberos, LDAP, CLDAP, GC, Endpoint mapper and WINS ports.
- samba4 offers the named pipes samr, lsa, netlogon, epm, and drsuapi
- samba4 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) (forwarding ntlogon/netlogon mailslots to s4 cldap)
- winbindd3 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.
- make smbd4 talk to samba3 winbind (using async wbclient library, in progress).
- extend the samba4 endpoint mapper to allow registering external services dynamically (in progress)
- make the command line tools talk to samba using RPC calls instead of editing databases directly
At some later point:
- reconcile configuration files and options (some parts finished already)
- make winbindd3 connect to local DC to allow samba4-style users without requiring unix user accounts
All of the Franky work is now happening in the sammba.git master branch.
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.
To build the integrated Samba:
$ cd source3 $ ./configure --enable-merged-build
After that, proceed as usual:
This should build all of Samba 3 as well as Samba 4's samba daemon and smbtorture.