Bug 10538 - Daemons crashing when lock/state/cache directory parameter has a trailing slash
Summary: Daemons crashing when lock/state/cache directory parameter has a trailing slash
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: x64 Linux
: P5 minor (vote)
Target Milestone: ---
Assignee: Jeremy Allison
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-04 18:45 UTC by Marc Muehlfeld
Modified: 2014-10-13 10:52 UTC (History)
0 users

See Also:


Attachments
Level 10 debug log (2.92 KB, application/octet-stream)
2014-04-04 18:45 UTC, Marc Muehlfeld
no flags Details
git-am fix for master. (1.15 KB, patch)
2014-04-04 23:49 UTC, Jeremy Allison
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Muehlfeld 2014-04-04 18:45:00 UTC
Created attachment 9829 [details]
Level 10 debug log

With 4.2.0pre1-GIT-fc4845f smbd and nmbd stop working directly after startup and winbindd crashes with stacktrace, when at least one of the lock/state/cache directory parameters has a trailing slash, like

   lock directory = /usr/var/samba/lock/

In 4.0.x and 4.1.x this wasn't a problem. 


[2014/04/04 20:38:21,  2, pid=62155, effective(0, 0), real(0, 0)] ../lib/tdb_wrap/tdb_wrap.c:65(tdb_wrap_log)
  tdb(/usr/var/samba/lock): tdb_open_ex: could not open file /usr/var/samba/lock: Ist ein Verzeichnis
[2014/04/04 20:38:21,  2, pid=62155, effective(0, 0), real(0, 0)] ../source3/lib/messages_local.c:140(messaging_tdb_init)
  ERROR: Failed to initialise messages database: Ist ein Verzeichnis
[2014/04/04 20:38:21,  2, pid=62155, effective(0, 0), real(0, 0)] ../source3/lib/messages.c:204(messaging_init)
  messaging_tdb_init failed: NT_STATUS_FILE_IS_A_DIRECTORY


The example in the manpage is without trailing slash. But if this changes and it's not allowed any more, then a note about that should be added to this 3 parameters in the manpage
Comment 1 Jeremy Allison 2014-04-04 23:44:45 UTC
Reproduced - fix to follow shortly.
Jeremy.
Comment 2 Jeremy Allison 2014-04-04 23:49:15 UTC
Created attachment 9831 [details]
git-am fix for master.

Fixes it here, please test. I'll get this pushed to master.

Jeremy.
Comment 3 Marc Muehlfeld 2014-04-05 11:37:02 UTC
Patch applied to master. Works. Thanks for fixing.
Comment 4 Jeremy Allison 2014-04-05 15:29:44 UTC
Pushed to master by Volker. Not needed in earlier builds.