It reminds me very much of OpenSSH, for which we are very much thankful to the OpenBSD project. It too has a focus on just the bare essentials required to run on one OS - OpenBSD in this case - and a 'portable edition' patch for other platforms.
In my own work keeping Samba portable, we have like most large projects, a portability API (libreplace), mostly trying to emulate the C APIs of other OS versions onto Linux APIs where possible. The Kerberos implementation that we work closely with for the AD DC also has libroken, another portability API, and we link against libbsd for strlcpy etc.
I've done a reasonable amount of work in this area recently, and it is certain the portability doesn't come for free. Indeed, we have two major build systems because (in part) we don't want to drop systems that don't have python!
Posted Nov 14, 2012 5:17 UTC (Wed) by ncm (subscriber, #165)
[Link]
strlcpy? Please tell me you don't actually use that.
that smell
Posted Nov 14, 2012 11:15 UTC (Wed) by abartlet (subscriber, #3928)
[Link]
We do use strlcpy. We moved from safe_strcpy() and the custom wrappers fstrcpy() and pstrcpy() (for fstrings of 256 and pstrings of 1024 bytes) to at least something others have seen before. Natrually, a function called safe_ wasn't really safe (just safe against memory overwrite), but the name made us feel better about it despite having the same issues as strlcpy().
As code is rewritten, most strings are dynamically allocated talloc buffers, but stragglers remain.
Crowding out OpenBSD
Posted Nov 14, 2012 9:43 UTC (Wed) by intgr (subscriber, #39733)
[Link]
> two major build systems because (in part) we don't want to drop systems that don't have python!
Huh, there are systems powerful enough to build Samba that don't run Python?
Crowding out OpenBSD
Posted Nov 14, 2012 13:22 UTC (Wed) by Cyberax (✭ supporter ✭, #52523)
[Link]
Yes, old big-iron batshit-crazy OSes in locked rooms without Internet access. Apparantly, Volker Lendecke has to provide support for these kinds of customers.