samba 4: a new configuration system?

Tim Potter tpot at samba.org
Tue Jun 28 00:39:29 GMT 2005


On Tue, 2005-06-28 at 10:33 +1000, Andrew Tridgell wrote:

> locking is a tricky issue with ldb, as ldap has no locking calls (at
> least as far as I know). We have put a ldb_lock() call in the ldb API,
> but it is used only by the tdb backend for now.

That might be enough for editing smb.conf[.tdb].  Are you thinking of
allowing a LDAP backend for every possible tdb in Samba4?

> That said, locking isn't quite as important as you might think for
> this sort of editing, as ldbedit generates a 'diff' style of ldif. So
> it doesn't just say "replace all those records with these ones", it
> says "make the following changes to those records". This makes it a
> bit more robust to 2 people editing at once. Not perfect by any means
> (for example, if two people are editing the same attribute then it
> will screw up), but better than a traditional file based editor.

The vipw UNIX pattern does a slightly better job of file based editing. 

From a quick strace it does a fcntl64(3, F_SETLKW, {type=F_WRLCK,
whence=SEEK_SET, start=0, len=0}) on /etc/.pwd.lock before firing up
$EDITOR.  


Tim.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20050628/e7ae1ea5/attachment.bin


More information about the samba-technical mailing list