Jeremy Allison is co-creator of Samba (the other being Andrew Tridgell), and has been working on the project since its inception 16 years ago. Allison is also the Scan Samba Project Leader. He continues our discussion of open source vs. proprietary and speaks on why there can be benefits at the intersection of the two, even though he thinks open source will eventually throttle proprietary development.
Q. How is Samba used and what’s the appeal of coding in it?
A. Samba code is used to provide Windows compatible file, print and authentication services to UNIX or Linux based platforms. It’s a standard component in most Linux distributions, and is shipped commercially by many of the UNIX distributors (Sun, Apple, IBM, HP).
Samba is also widely used in the embedded NAS (Network Attached Storage) space, powering a wide range of NAS devices ranging from the small single disk devices to multi-petabyte clustered storage arrays.
Samba is written in simple C, with no parts in more exotic languages. This is a strength for competent developers who understand the strengths and weaknesses of C, but can be off putting to programmers who expect the language to take care of memory management and garbage collection.
Q. What are some of the ways Samba has progressed as a code base?
A. Starting from a simple UNIX “network daemon” code base, Samba has developed several libraries that are incredibly useful spin off technologies and products in their own right, such as talloc (hierarchical memory allocator), tdb (trivial database - memory mapped multi-simultaneous reader/writer database) and ctdb, a clustered version of the tdb code.
Samba is now developed in a much more rigorous way than before, with mandatory test suites for new features to prevent regressions, and a full test suite that even Microsoft uses to test their own Windows server code base.
Q. With wide deployment across major commercial vendors like Sun, Apple, IBM, and HP, how does Samba manage security measures?
A. Samba is a long-lived network service, which has to protect itself against malicious code and denial of service attacks.
As Samba ships as part of so many products, it has been audited heavily from both a security and legal perspective, by experts in these fields (the Linux and UNIX distribution security teams, for example). We have a dedicated security email address with 24×7 coverage, and have produced fixes with a turn-around time of one hour on occasion. We work closely with the “vendor-sec” security list to ensure our code is as secure as possible. On the whole, the Samba community has always been concerned with security and quality, and the code was originally designed with this in mind.
Q. Is a software integrity issue different from a security issue?
A. Total software integrity is a vital part of security. Known bugs can sometimes turn into security issues if they’re not correctly understood or addressed. 100% bug-free, reliable software is our goal, and one that Coverity scans play an important part in achieving.
The biggest code quality issue someone can have is lack of testing. We’re attempting to get 100% test coverage of our code, and our motto has slowly become “Untested code is broken code.” Within the Samba community, we’ve started a pair-peer review process for all check-ins into the tree to increase accountability and robustness.
Q. Getting into the debate over open vs. proprietary, many arguments have been made for one or the other. What’s the real advantage to the open source model (if one exists)?
It’s an old argument, but the “many eyes” of an active community do make a difference. People study areas of Samba that are not under active development and are considered “stable” and point out the most minor errors in order to improve Samba, giving Samba and the person who found the error more credibility, which I’m always happy about.
In my opinion, proprietary software development groups can take a cue from what the open source communities have done with code integrity. Opening your code is the best thing you can possibly do for code integrity. I’ve seen many proprietary developers be very resistant to this as they’re scared of what external eyes might find. Yes, it will be painful at first, but it’s a major increase in code reliability. You end up with much less of an ego, as what you think is perfect code gets pounded with bug reports that people can prove are errors, day after day. It helps achieve the programming nirvana of “egoless programming.”
Q. Have you seen overwhelming benefits of open source software with commercial adoption, and if so, has that commercial aspect shifted the pressures developers face in terms of releasing secure, quality code?
Commercial software development can afford better tools than FLOSS developers usually. We’re very grateful for the free coverage we get from Coverity and the Scan Program. As a project, we would not have been able to afford the tool ourselves.
Also, commercial software should go open source whenever it can. It really is the scientific method as applied to software development, and it really is the better way to develop software.
Pure commercial code developers face more pressure to just “ship with what they have,” without taking the time to cover all outstanding bugs. FLOSS developers can ignore that pressure, but without a hard deadline it’s easy to get caught in “perpetual rewrite” mode, without ever shipping anything. This is where a good release and community manager can make all the difference.
In time, more and more code will become FLOSS. Eventually proprietary will die
out - just like the alchemists slowly turned into chemists and materials scientists. In the future, people will expect access to code in the same way they expect blueprints to a new building or bridge.
Q. What has Samba gained from Scan?
I’m very involved with Scan, and I usually start my week reviewing the Scan output. On the whole, projects need to pay attention and fix the bugs that Scan reveals. If you’re getting false positives, it’s usually worth it to try and rewrite the code to avoid them, as the real errors found by Scan can save the reputation of a project.






