The branch, master has been updated
via e4ad0013787 auth: Avoid casts in ntlm_check.c
via e02d24c0875 auth: Check for talloc failure in smb_sess_key_ntlmv2()
via 4014d91b9a6 auth: Slightly simplify smb_pwd_check_ntlmv1()
via 2bd941cc122 auth: Check for talloc failure in smb_pwd_check_ntlmv1()
via b78cc8210d3 auth: Slightly simplify smb_pwd_check_ntlmv2()
via 8ec4e4b668d auth: Check for talloc failure in smb_pwd_check_ntlmv2()
via 59cb155a27f auth: Remove the "typedef auth_methods"
via 33d4d482718 winbind: Fix CID 1456624 Uninitialized scalar variable
via d034e839df0 auth3: Avoid a casts in auth3_check_password()
via bcf94444583 auth3: Simplify auth_get_ntlm_challenge()
via b2f07034932 auth3: Check for talloc failure
via 7283413a3fa tests: Fix a typo
from 03b42aeb811 python/loadparm: check for AD DC required VFS modules
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit e4ad0013787a726bfc3d1ba3644b60a6c77ace37
Author: Volker Lendecke <[email protected]>
Date: Fri Jan 3 14:24:13 2020 +0100
auth: Avoid casts in ntlm_check.c
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Gary Lockyer <[email protected]>
Autobuild-User(master): Gary Lockyer <[email protected]>
Autobuild-Date(master): Mon Jan 6 03:12:20 UTC 2020 on sn-devel-184
commit e02d24c0875eb04a53c19119148f5203374382e0
Author: Volker Lendecke <[email protected]>
Date: Fri Jan 3 14:04:02 2020 +0100
auth: Check for talloc failure in smb_sess_key_ntlmv2()
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Gary Lockyer <[email protected]>
commit 4014d91b9a68aa2161421896a82d84e4211e480e
Author: Volker Lendecke <[email protected]>
Date: Fri Jan 3 14:10:00 2020 +0100
auth: Slightly simplify smb_pwd_check_ntlmv1()
Do an early return for the failure case
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Gary Lockyer <[email protected]>
commit 2bd941cc12245728b374edc0f71f5938c887a566
Author: Volker Lendecke <[email protected]>
Date: Fri Jan 3 14:04:02 2020 +0100
auth: Check for talloc failure in smb_pwd_check_ntlmv1()
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Gary Lockyer <[email protected]>
commit b78cc8210d3fe75af5236a16841060bbcc553cde
Author: Volker Lendecke <[email protected]>
Date: Fri Jan 3 14:10:00 2020 +0100
auth: Slightly simplify smb_pwd_check_ntlmv2()
Do an early return for the failure case
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Gary Lockyer <[email protected]>
commit 8ec4e4b668d009f9c79ce324dce0d512e16d4cb9
Author: Volker Lendecke <[email protected]>
Date: Fri Jan 3 14:04:02 2020 +0100
auth: Check for talloc failure in smb_pwd_check_ntlmv2()
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Gary Lockyer <[email protected]>
commit 59cb155a27f21a55bdc588d38c8080cd29562a7e
Author: Volker Lendecke <[email protected]>
Date: Fri Jan 3 13:47:14 2020 +0100
auth: Remove the "typedef auth_methods"
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Gary Lockyer <[email protected]>
commit 33d4d482718fca10030b5a569f17cb1a2637fc8a
Author: Volker Lendecke <[email protected]>
Date: Fri Jan 3 12:42:03 2020 +0100
winbind: Fix CID 1456624 Uninitialized scalar variable
Coverity does not get that for (rc!=0) gnutls_error_to_ntstatus()
never returns NT_STATUS_OK
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Gary Lockyer <[email protected]>
commit d034e839df0898d9db0dc00c1ccf2f113f1787f1
Author: Volker Lendecke <[email protected]>
Date: Thu Jan 2 15:02:44 2020 +0100
auth3: Avoid a casts in auth3_check_password()
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Gary Lockyer <[email protected]>
commit bcf944445837e7cdd611dc89fe931575fa771017
Author: Volker Lendecke <[email protected]>
Date: Fri Jan 3 12:51:04 2020 +0100
auth3: Simplify auth_get_ntlm_challenge()
Use generate_random_buffer() directly on the talloc'ed buffer
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Gary Lockyer <[email protected]>
commit b2f070349326bbdb69415524f0a9fa8d54c18049
Author: Volker Lendecke <[email protected]>
Date: Thu Jan 2 12:41:16 2020 +0100
auth3: Check for talloc failure
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Gary Lockyer <[email protected]>
commit 7283413a3faf4048a46e77c4ac5ed7a8bb804ff6
Author: Volker Lendecke <[email protected]>
Date: Fri Jan 3 12:28:49 2020 +0100
tests: Fix a typo
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Gary Lockyer <[email protected]>
-----------------------------------------------------------------------
Summary of changes:
examples/auth/auth_skel.c | 7 +++-
libcli/auth/ntlm_check.c | 85 ++++++++++++++++++++++++-----------------
python/samba/tests/ntlm_auth.py | 2 +-
source3/auth/auth.c | 22 ++++++-----
source3/auth/auth_builtin.c | 10 ++++-
source3/auth/auth_ntlmssp.c | 8 ++--
source3/auth/auth_sam.c | 16 ++++++--
source3/auth/auth_samba4.c | 4 +-
source3/auth/auth_unix.c | 5 ++-
source3/auth/auth_winbind.c | 5 ++-
source3/auth/proto.h | 3 +-
source3/include/auth.h | 4 +-
source3/winbindd/winbindd_pam.c | 2 +-
13 files changed, 107 insertions(+), 66 deletions(-)
Changeset truncated at 500 lines:
diff --git a/examples/auth/auth_skel.c b/examples/auth/auth_skel.c
index 6abd5ad4f7a..8734383aeeb 100644
--- a/examples/auth/auth_skel.c
+++ b/examples/auth/auth_skel.c
@@ -42,7 +42,10 @@ static NTSTATUS check_skel_security(const struct
auth_context *auth_context,
}
/* module initialisation */
-static NTSTATUS auth_init_skel(struct auth_context *auth_context, const char
*param, auth_methods **auth_method)
+static NTSTATUS auth_init_skel(
+ struct auth_context *auth_context,
+ const char *param,
+ struct auth_methods **auth_method)
{
struct auth_methods *result;
@@ -56,7 +59,7 @@ static NTSTATUS auth_init_skel(struct auth_context
*auth_context, const char *pa
if (param && *param) {
/* we load the 'fallback' module - if skel isn't here, call this
module */
- auth_methods *priv;
+ struct auth_methods *priv;
if (!load_auth_module(auth_context, param, &priv)) {
return NT_STATUS_UNSUCCESSFUL;
}
diff --git a/libcli/auth/ntlm_check.c b/libcli/auth/ntlm_check.c
index 9f779f85fa1..846e0c07cd5 100644
--- a/libcli/auth/ntlm_check.c
+++ b/libcli/auth/ntlm_check.c
@@ -37,6 +37,7 @@ static bool smb_pwd_check_ntlmv1(TALLOC_CTX *mem_ctx,
/* Finish the encryption of part_passwd. */
uint8_t p24[24];
int rc;
+ bool ok;
if (part_passwd == NULL) {
DEBUG(10,("No password set - DISALLOWING access\n"));
@@ -45,14 +46,13 @@ static bool smb_pwd_check_ntlmv1(TALLOC_CTX *mem_ctx,
}
if (sec_blob->length != 8) {
- DEBUG(0, ("smb_pwd_check_ntlmv1: incorrect challenge size
(%lu)\n",
- (unsigned long)sec_blob->length));
+ DBG_ERR("incorrect challenge size (%zu)\n", sec_blob->length);
return false;
}
if (nt_response->length != 24) {
- DEBUG(0, ("smb_pwd_check_ntlmv1: incorrect password length
(%lu)\n",
- (unsigned long)nt_response->length));
+ DBG_ERR("incorrect password length (%zu)\n",
+ nt_response->length);
return false;
}
@@ -71,14 +71,19 @@ static bool smb_pwd_check_ntlmv1(TALLOC_CTX *mem_ctx,
DEBUGADD(100,("Value from encryption was |\n"));
dump_data(100, p24, 24);
#endif
- if (memcmp(p24, nt_response->data, 24) == 0) {
- if (user_sess_key != NULL) {
- *user_sess_key = data_blob_talloc(mem_ctx, NULL, 16);
- SMBsesskeygen_ntv1(part_passwd, user_sess_key->data);
+ ok = (memcmp(p24, nt_response->data, 24) == 0);
+ if (!ok) {
+ return false;
+ }
+ if (user_sess_key != NULL) {
+ *user_sess_key = data_blob_talloc(mem_ctx, NULL, 16);
+ if (user_sess_key->data == NULL) {
+ DBG_ERR("data_blob_talloc failed\n");
+ return false;
}
- return true;
- }
- return false;
+ SMBsesskeygen_ntv1(part_passwd, user_sess_key->data);
+ }
+ return true;
}
/****************************************************************************
@@ -98,6 +103,7 @@ static bool smb_pwd_check_ntlmv2(TALLOC_CTX *mem_ctx,
uint8_t value_from_encryption[16];
DATA_BLOB client_key_data;
NTSTATUS status;
+ bool ok;
if (part_passwd == NULL) {
DEBUG(10,("No password set - DISALLOWING access\n"));
@@ -106,8 +112,7 @@ static bool smb_pwd_check_ntlmv2(TALLOC_CTX *mem_ctx,
}
if (sec_blob->length != 8) {
- DEBUG(0, ("smb_pwd_check_ntlmv2: incorrect challenge size
(%lu)\n",
- (unsigned long)sec_blob->length));
+ DBG_ERR("incorrect challenge size (%zu)\n", sec_blob->length);
return false;
}
@@ -115,8 +120,8 @@ static bool smb_pwd_check_ntlmv2(TALLOC_CTX *mem_ctx,
/* We MUST have more than 16 bytes, or the stuff below will go
crazy. No known implementation sends less than the 24 bytes
for LMv2, let alone NTLMv2. */
- DEBUG(0, ("smb_pwd_check_ntlmv2: incorrect password length
(%lu)\n",
- (unsigned long)ntv2_response->length));
+ DBG_ERR("incorrect password length (%zu)\n",
+ ntv2_response->length);
return false;
}
@@ -151,20 +156,25 @@ static bool smb_pwd_check_ntlmv2(TALLOC_CTX *mem_ctx,
dump_data(100, value_from_encryption, 16);
#endif
data_blob_clear_free(&client_key_data);
- if (memcmp(value_from_encryption, ntv2_response->data, 16) == 0) {
- if (user_sess_key != NULL) {
- *user_sess_key = data_blob_talloc(mem_ctx, NULL, 16);
-
- status = SMBsesskeygen_ntv2(kr,
- value_from_encryption,
- user_sess_key->data);
- if (!NT_STATUS_IS_OK(status)) {
- return false;
- }
+
+ ok = (memcmp(value_from_encryption, ntv2_response->data, 16) == 0);
+ if (!ok) {
+ return false;
+ }
+ if (user_sess_key != NULL) {
+ *user_sess_key = data_blob_talloc(mem_ctx, NULL, 16);
+ if (user_sess_key->data == NULL) {
+ DBG_ERR("data_blob_talloc failed\n");
+ return false;
+ }
+
+ status = SMBsesskeygen_ntv2(
+ kr, value_from_encryption, user_sess_key->data);
+ if (!NT_STATUS_IS_OK(status)) {
+ return false;
}
- return true;
}
- return false;
+ return true;
}
/****************************************************************************
@@ -192,8 +202,7 @@ static bool smb_sess_key_ntlmv2(TALLOC_CTX *mem_ctx,
}
if (sec_blob->length != 8) {
- DEBUG(0, ("smb_sess_key_ntlmv2: incorrect challenge size
(%lu)\n",
- (unsigned long)sec_blob->length));
+ DBG_ERR("incorrect challenge size (%zu)\n", sec_blob->length);
return false;
}
@@ -201,8 +210,8 @@ static bool smb_sess_key_ntlmv2(TALLOC_CTX *mem_ctx,
/* We MUST have more than 16 bytes, or the stuff below will go
crazy. No known implementation sends less than the 24 bytes
for LMv2, let alone NTLMv2. */
- DEBUG(0, ("smb_sess_key_ntlmv2: incorrect password length
(%lu)\n",
- (unsigned long)ntv2_response->length));
+ DBG_ERR("incorrect password length (%zu)\n",
+ ntv2_response->length);
return false;
}
@@ -220,6 +229,10 @@ static bool smb_sess_key_ntlmv2(TALLOC_CTX *mem_ctx,
return false;
}
*user_sess_key = data_blob_talloc(mem_ctx, NULL, 16);
+ if (user_sess_key->data == NULL) {
+ DBG_ERR("data_blob_talloc failed\n");
+ return false;
+ }
status = SMBsesskeygen_ntv2(kr,
value_from_encryption,
user_sess_key->data);
@@ -381,8 +394,9 @@ NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx,
}
if (nt_response->length != 0 && nt_response->length < 24) {
- DEBUG(2,("ntlm_password_check: invalid NT password length (%lu)
for user %s\n",
- (unsigned long)nt_response->length, username));
+ DBG_NOTICE("invalid NT password length (%zu) for user %s\n",
+ nt_response->length,
+ username);
}
if (nt_response->length > 24 && stored_nt) {
@@ -468,8 +482,9 @@ NTSTATUS ntlm_password_check(TALLOC_CTX *mem_ctx,
}
if (lm_response->length < 24) {
- DEBUG(2,("ntlm_password_check: invalid LanMan password length
(%lu) for user %s\n",
- (unsigned long)nt_response->length, username));
+ DBG_NOTICE("invalid LanMan password length (%zu) for "
+ "user %s\n",
+ nt_response->length, username);
return NT_STATUS_WRONG_PASSWORD;
}
diff --git a/python/samba/tests/ntlm_auth.py b/python/samba/tests/ntlm_auth.py
index c93d38a0f0f..4b6fbee8b58 100644
--- a/python/samba/tests/ntlm_auth.py
+++ b/python/samba/tests/ntlm_auth.py
@@ -62,7 +62,7 @@ class NTLMAuthHelpersTests(NTLMAuthTestCase):
server_use_winbind=False)
self.assertTrue(ret)
- def test_agaist_winbind(self):
+ def test_against_winbind(self):
""" ntlm_auth against winbindd """
ret = self.run_helper(client_username=self.username,
diff --git a/source3/auth/auth.c b/source3/auth/auth.c
index 3b523c0fa18..e8bb9d7821a 100644
--- a/source3/auth/auth.c
+++ b/source3/auth/auth.c
@@ -84,9 +84,6 @@ static struct auth_init_function_entry
*auth_find_backend_entry(const char *name
NTSTATUS auth_get_ntlm_challenge(struct auth_context *auth_context,
uint8_t chal[8])
{
- uchar tmp[8];
-
-
if (auth_context->challenge.length) {
DEBUG(5, ("get_ntlm_challenge (auth subsystem): returning
previous challenge by module %s (normal)\n",
auth_context->challenge_set_by));
@@ -94,9 +91,13 @@ NTSTATUS auth_get_ntlm_challenge(struct auth_context
*auth_context,
return NT_STATUS_OK;
}
- generate_random_buffer(tmp, sizeof(tmp));
- auth_context->challenge = data_blob_talloc(auth_context,
- tmp, sizeof(tmp));
+ auth_context->challenge = data_blob_talloc(auth_context, NULL, 8);
+ if (auth_context->challenge.data == NULL) {
+ DBG_WARNING("data_blob_talloc failed\n");
+ return NT_STATUS_NO_MEMORY;
+ }
+ generate_random_buffer(
+ auth_context->challenge.data, auth_context->challenge.length);
auth_context->challenge_set_by = "random";
@@ -176,7 +177,7 @@ NTSTATUS auth_check_ntlm_password(TALLOC_CTX *mem_ctx,
/* if all the modules say 'not for me' this is reasonable */
NTSTATUS nt_status = NT_STATUS_NOT_IMPLEMENTED;
const char *unix_username;
- auth_methods *auth_method;
+ struct auth_methods *auth_method;
struct auth_serversupplied_info *server_info = NULL;
struct dom_sid sid = {0};
struct imessaging_context *msg_ctx = NULL;
@@ -403,7 +404,8 @@ static NTSTATUS make_auth_context(TALLOC_CTX *mem_ctx,
}
bool load_auth_module(struct auth_context *auth_context,
- const char *module, auth_methods **ret)
+ const char *module,
+ struct auth_methods **ret)
{
static bool initialised_static_modules = False;
@@ -464,8 +466,8 @@ static NTSTATUS make_auth_context_text_list(TALLOC_CTX
*mem_ctx,
struct auth_context **auth_context,
char **text_list)
{
- auth_methods *list = NULL;
- auth_methods *t, *method = NULL;
+ struct auth_methods *list = NULL;
+ struct auth_methods *t, *method = NULL;
NTSTATUS nt_status;
if (!text_list) {
diff --git a/source3/auth/auth_builtin.c b/source3/auth/auth_builtin.c
index 8a5c4b74723..f16b3cc2934 100644
--- a/source3/auth/auth_builtin.c
+++ b/source3/auth/auth_builtin.c
@@ -86,7 +86,10 @@ static NTSTATUS check_anonymous_security(const struct
auth_context *auth_context
/* Guest modules initialisation */
-static NTSTATUS auth_init_anonymous(struct auth_context *auth_context, const
char *options, auth_methods **auth_method)
+static NTSTATUS auth_init_anonymous(
+ struct auth_context *auth_context,
+ const char *options,
+ struct auth_methods **auth_method)
{
struct auth_methods *result;
@@ -150,7 +153,10 @@ static NTSTATUS check_name_to_ntstatus_security(const
struct auth_context *auth_
/** Module initialisation function */
-static NTSTATUS auth_init_name_to_ntstatus(struct auth_context *auth_context,
const char *param, auth_methods **auth_method)
+static NTSTATUS auth_init_name_to_ntstatus(
+ struct auth_context *auth_context,
+ const char *param,
+ struct auth_methods **auth_method)
{
struct auth_methods *result;
diff --git a/source3/auth/auth_ntlmssp.c b/source3/auth/auth_ntlmssp.c
index 2e345e17571..8c2e10ce6ec 100644
--- a/source3/auth/auth_ntlmssp.c
+++ b/source3/auth/auth_ntlmssp.c
@@ -220,15 +220,15 @@ NTSTATUS auth3_check_password(struct auth4_context
*auth4_context,
* NTLMSSP code will decide on the final correct session key,
* and supply it to create_local_token() */
if (session_key) {
- DEBUG(10, ("Got NT session key of length %u\n",
- (unsigned int)server_info->session_key.length));
+ DBG_DEBUG("Got NT session key of length %zu\n",
+ server_info->session_key.length);
*session_key = server_info->session_key;
talloc_steal(mem_ctx, server_info->session_key.data);
server_info->session_key = data_blob_null;
}
if (lm_session_key) {
- DEBUG(10, ("Got LM session key of length %u\n",
- (unsigned int)server_info->lm_session_key.length));
+ DBG_DEBUG("Got LM session key of length %zu\n",
+ server_info->lm_session_key.length);
*lm_session_key = server_info->lm_session_key;
talloc_steal(mem_ctx, server_info->lm_session_key.data);
server_info->lm_session_key = data_blob_null;
diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c
index 46958c54d3a..9310ef0e1f0 100644
--- a/source3/auth/auth_sam.c
+++ b/source3/auth/auth_sam.c
@@ -40,7 +40,10 @@ static NTSTATUS auth_sam_ignoredomain_auth(const struct
auth_context *auth_conte
}
/* module initialisation */
-static NTSTATUS auth_init_sam_ignoredomain(struct auth_context *auth_context,
const char *param, auth_methods **auth_method)
+static NTSTATUS auth_init_sam_ignoredomain(
+ struct auth_context *auth_context,
+ const char *param,
+ struct auth_methods **auth_method)
{
struct auth_methods *result;
@@ -108,7 +111,10 @@ static NTSTATUS auth_samstrict_auth(const struct
auth_context *auth_context,
}
/* module initialisation */
-static NTSTATUS auth_init_sam(struct auth_context *auth_context, const char
*param, auth_methods **auth_method)
+static NTSTATUS auth_init_sam(
+ struct auth_context *auth_context,
+ const char *param,
+ struct auth_methods **auth_method)
{
struct auth_methods *result;
@@ -168,8 +174,10 @@ static NTSTATUS auth_sam_netlogon3_auth(const struct
auth_context *auth_context,
}
/* module initialisation */
-static NTSTATUS auth_init_sam_netlogon3(struct auth_context *auth_context,
- const char *param, auth_methods
**auth_method)
+static NTSTATUS auth_init_sam_netlogon3(
+ struct auth_context *auth_context,
+ const char *param,
+ struct auth_methods **auth_method)
{
struct auth_methods *result;
diff --git a/source3/auth/auth_samba4.c b/source3/auth/auth_samba4.c
index a71c75631d7..6dee9c6f411 100644
--- a/source3/auth/auth_samba4.c
+++ b/source3/auth/auth_samba4.c
@@ -364,8 +364,8 @@ static NTSTATUS make_auth4_context_s4(const struct
auth_context *auth_context,
/* module initialisation */
static NTSTATUS auth_init_samba4(struct auth_context *auth_context,
- const char *param,
- auth_methods **auth_method)
+ const char *param,
+ struct auth_methods **auth_method)
{
struct auth_methods *result;
diff --git a/source3/auth/auth_unix.c b/source3/auth/auth_unix.c
index 08d4e002e3d..56fd205a9b8 100644
--- a/source3/auth/auth_unix.c
+++ b/source3/auth/auth_unix.c
@@ -83,7 +83,10 @@ static NTSTATUS check_unix_security(const struct
auth_context *auth_context,
}
/* module initialisation */
-static NTSTATUS auth_init_unix(struct auth_context *auth_context, const char*
param, auth_methods **auth_method)
+static NTSTATUS auth_init_unix(
+ struct auth_context *auth_context,
+ const char* param,
+ struct auth_methods **auth_method)
{
struct auth_methods *result;
diff --git a/source3/auth/auth_winbind.c b/source3/auth/auth_winbind.c
index 93b832265cf..3b8d1a95769 100644
--- a/source3/auth/auth_winbind.c
+++ b/source3/auth/auth_winbind.c
@@ -178,7 +178,10 @@ static NTSTATUS check_winbind_security(const struct
auth_context *auth_context,
}
/* module initialisation */
-static NTSTATUS auth_init_winbind(struct auth_context *auth_context, const
char *param, auth_methods **auth_method)
+static NTSTATUS auth_init_winbind(
+ struct auth_context *auth_context,
+ const char *param,
+ struct auth_methods **auth_method)
{
struct auth_methods *result;
diff --git a/source3/auth/proto.h b/source3/auth/proto.h
index 575a3a147cb..cd33c618754 100644
--- a/source3/auth/proto.h
+++ b/source3/auth/proto.h
@@ -37,7 +37,8 @@
NTSTATUS smb_register_auth(int version, const char *name, auth_init_function
init);
bool load_auth_module(struct auth_context *auth_context,
- const char *module, auth_methods **ret) ;
+ const char *module,
+ struct auth_methods **ret) ;
NTSTATUS make_auth3_context_for_ntlm(TALLOC_CTX *mem_ctx,
struct auth_context **auth_context);
NTSTATUS make_auth3_context_for_netlogon(TALLOC_CTX *mem_ctx,
diff --git a/source3/include/auth.h b/source3/include/auth.h
index 0facb8668cd..69e53bb7083 100644
--- a/source3/include/auth.h
+++ b/source3/include/auth.h
@@ -98,7 +98,7 @@ struct auth_context {
const char *forced_samba4_methods;
};
-typedef struct auth_methods
+struct auth_methods
{
struct auth_methods *prev, *next;
const char *name; /* What name got this module */
@@ -117,7 +117,7 @@ typedef struct auth_methods
uint32_t flags;
-} auth_methods;
+};
typedef NTSTATUS (*auth_init_function)(struct auth_context *, const char *,
struct auth_methods **);
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index 1552eb3ce52..a1c6efe6662 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -1738,7 +1738,7 @@ static NTSTATUS winbindd_dual_pam_auth_samlogon(
NTSTATUS result;
uint8_t authoritative = 0;
uint32_t flags = 0;
- uint16_t validation_level;
+ uint16_t validation_level = 0;
union netr_Validation *validation = NULL;
struct netr_SamBaseInfo *base_info = NULL;
bool ok;
--
Samba Shared Repository