[PATCHES] a few fixes found building on freebsd
Michael Adam
obnox at samba.org
Mon Mar 23 04:46:11 MDT 2015
Review/push appreciated.
Thanks - Michael
-------------- next part --------------
From 5424af8cbf2f262af67306a432e62ddb26e51551 Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Mon, 23 Mar 2015 01:41:57 +0100
Subject: [PATCH 1/5] lib/crypto: fix header guard for crypto.h
Signed-off-by: Michael Adam <obnox at samba.org>
---
lib/crypto/crypto.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/crypto/crypto.h b/lib/crypto/crypto.h
index c0ad562..092ae6a 100644
--- a/lib/crypto/crypto.h
+++ b/lib/crypto/crypto.h
@@ -17,7 +17,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _SAMBA_CRYPTO_H
+#ifndef _SAMBA_CRYPTO_H_
#define _SAMBA_CRYPTO_H_
#include "../lib/crypto/crc32.h"
--
2.1.0
From 2e0535a14d11cd4e057b5ccf199d02f9d1940002 Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Mon, 23 Mar 2015 01:48:32 +0100
Subject: [PATCH 2/5] s4:torture: avoid free of uninitialized variables in
error-case.
Signed-off-by: Michael Adam <obnox at samba.org>
---
source4/torture/raw/samba3misc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/source4/torture/raw/samba3misc.c b/source4/torture/raw/samba3misc.c
index 95a8229..f40a4f1 100644
--- a/source4/torture/raw/samba3misc.c
+++ b/source4/torture/raw/samba3misc.c
@@ -428,8 +428,8 @@ static NTSTATUS raw_smbcli_ntcreate(struct smbcli_tree *tree, const char *fname,
bool torture_samba3_badpath(struct torture_context *torture)
{
- struct smbcli_state *cli_nt;
- struct smbcli_state *cli_dos;
+ struct smbcli_state *cli_nt = NULL;
+ struct smbcli_state *cli_dos = NULL;
const char *fname = "test.txt";
const char *fname1 = "test1.txt";
const char *dirname = "testdir";
--
2.1.0
From 275e44c3665ebdcef675c6f50e2c3c384ef09d8c Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Mon, 23 Mar 2015 01:51:16 +0100
Subject: [PATCH 3/5] s4:torture: avoid free of uninitialized variable in error
case.
Signed-off-by: Michael Adam <obnox at samba.org>
---
source4/torture/smb2/session.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source4/torture/smb2/session.c b/source4/torture/smb2/session.c
index ee51d55..2c06516 100644
--- a/source4/torture/smb2/session.c
+++ b/source4/torture/smb2/session.c
@@ -154,7 +154,7 @@ bool test_session_reconnect2(struct torture_context *tctx, struct smb2_tree *tre
struct smb2_create io1;
uint64_t previous_session_id;
bool ret = true;
- struct smb2_session *session2;
+ struct smb2_session *session2 = NULL;
union smb_fileinfo qfinfo;
/* Add some random component to the file name. */
--
2.1.0
From cf6f2036ab099682c674d9135d02046892037a90 Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Mon, 23 Mar 2015 01:52:32 +0100
Subject: [PATCH 4/5] s4:torture: avoid free of uninitialized variable in error
case.
Signed-off-by: Michael Adam <obnox at samba.org>
---
source4/torture/smb2/session.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source4/torture/smb2/session.c b/source4/torture/smb2/session.c
index 2c06516..d60edaf 100644
--- a/source4/torture/smb2/session.c
+++ b/source4/torture/smb2/session.c
@@ -71,7 +71,7 @@ bool test_session_reconnect1(struct torture_context *tctx, struct smb2_tree *tre
struct smb2_create io1, io2;
uint64_t previous_session_id;
bool ret = true;
- struct smb2_tree *tree2;
+ struct smb2_tree *tree2 = NULL;
union smb_fileinfo qfinfo;
/* Add some random component to the file name. */
--
2.1.0
From 54248f6a16e2fb4dc7966ac23badd7465ee08032 Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Mon, 23 Mar 2015 01:55:02 +0100
Subject: [PATCH 5/5] s4:torture: avoid use of uninitialized variable in error
case.
Signed-off-by: Michael Adam <obnox at samba.org>
---
source4/torture/unix/whoami.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source4/torture/unix/whoami.c b/source4/torture/unix/whoami.c
index 71c25dd..00109eb 100644
--- a/source4/torture/unix/whoami.c
+++ b/source4/torture/unix/whoami.c
@@ -346,7 +346,7 @@ bool torture_unix_whoami(struct torture_context *torture)
{
struct smbcli_state *cli;
struct smb_whoami whoami;
- bool ret;
+ bool ret = false;
struct ldb_context *ldb;
const char *addc, *host;
--
2.1.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150323/5884fc07/attachment.pgp>
More information about the samba-technical
mailing list