A regression has been introduced lately in samba4: file logging doesn't work anymore.
To reproduce the problem just start samba in daemon mode (/usr/local/samba/sbin/samba -D -M single or /usr/local/samba/sbin/samba --daemon), and notice that the logfile is not created.
I attached a patch that revert the regression.
Created attachment 4013 [details]
Patch that solve the problem.
This looks possibly like a merge bug. We will need to be careful not to break Samba3 in fixing it however
Have we made some progress on this?
This bug really needs to be fixed. I came up with the same workaround as Matthieu shortly after the original change was made to the enum in debug.h. It is becoming increasingly inconvenient to manage this patch in my local repo, and it's a real bummer when I create a new working branch and forget to cherry-pick the patch, only to find that I have no log file after a build, install, provision, ...
I just reviewed all callers of setup_logging() in the merged codebase, and only S4 calls the setup_logging() in lib/util/debug.c. All S3 setup_logging() calls are calling the S3 version in source3/lib/debug.c, as that function takes a bool as the second argument. Therefore, changing the enum back to its original value should not affect anything in S3. Things will work properly in both S3 & S4 until an appropriate solution can be reviewed and tested.
Can you point out the patch that broke this in the first place?
I'm happy to apply the fix, once I understand the original breakage.
Commit 49a6d757b4d944cd22c91b2838beb83f04fbe1e9 (on 09-Jan-200) made the change to lib/util/debug.h.
The commit message talks about making things more compatible with S3, but this appears to be the only debugging-related patch made by metze that day, and lib/util/debug.h was the only file changed.
The problem is that ndrdump calls setup_logging(), and will call it against either implementation. The patch is correct, but we need to either merge Samba4's debug implemenation into Samba3, or have a different function that does the 'right thing' in both branches.
This should be fixed as of 6e92505080fd6764461563e4fdf1172be1ba2963