Compiling Samba 4.4 (current 4.4-test branch and older) with --enable-developer fails. Most of these have been fixed in 4.5 or later, but two (one in smbd/open.c and one in smbd/close.c) only apply to 4.4 and are not fixed in later releases. These are uninitialized variables (saved_posix_pathnames). Jeremy has a better patch that he suggested after seeing my suggested patch (see below) so the patch below may just be useful to see the failing lines. Subject: [PATCH] s3/smbd: Fix unitialized variables in Samba 4.4 file server ./configure --enable-developer fails on a few unitialized variables on 4.4 Although most have been fixed in master, this code was removed for 4.5 and later, so these two cases would not apply to them and only 4.4, but they do fall through to error handling code which use them and should be fixed. Signed-off-by: Steve French <smfrench@gmail.com> --- source3/smbd/close.c | 2 +- source3/smbd/open.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/smbd/close.c b/source3/smbd/close.c index 271885e..d092d94 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -168,7 +168,7 @@ NTSTATUS delete_all_streams(connection_struct *conn, const char *fname) unsigned int num_streams = 0; TALLOC_CTX *frame = talloc_stackframe(); NTSTATUS status; - bool saved_posix_pathnames; + bool saved_posix_pathnames = false; status = vfs_streaminfo(conn, NULL, fname, talloc_tos(), &num_streams, &stream_info); diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 5935ff5..7878912 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -3871,7 +3871,7 @@ NTSTATUS open_streams_for_delete(connection_struct *conn, unsigned int num_streams = 0; TALLOC_CTX *frame = talloc_stackframe(); NTSTATUS status; - bool saved_posix_pathnames; + bool saved_posix_pathnames = false; status = vfs_streaminfo(conn, NULL, fname, talloc_tos(), &num_streams, &stream_info); --
This is the wrong fix. Steve, can you attach my alternative proposed fix as a git-am fix and ask me to review and I'll +1.
Created attachment 12551 [details] git-am fix for 4.4.x Steve, +1 this and we'll get it into 4.4.next.
I thought I already +1 this, but in any case ... Reviewed-by: Steve French <smfrench@gmail.com>
(In reply to Steve French from comment #3) Steve, you need to go into the 'Details' link and change the '?' to '+'. *That* is how you +1 a patch :-).
Comment on attachment 12551 [details] git-am fix for 4.4.x Reviewed-by: Steve French <sfrench@samba.org>
Reassigning to Karolin for inclusion in 4.4.next.
(In reply to Jeremy Allison from comment #6) Pushed to autobuild-v4-4-test.
(In reply to Karolin Seeger from comment #7) Pushed to v4-4-test. Closing out bug report. Thanks!