[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Tue Nov 21 18:34:02 UTC 2023
The branch, master has been updated
via f955d9aa49d smbd: Fix Coverity ID 1499372 Uninitialized scalar variable
via bc0df4fd97a winbind: Fix Coverity ID 1398910
via 0bc329a3430 lsa4: Fix Coverity ID 1499410
via a5c2134cc23 samr4: Fix Coverity ID 1499378
via 66a8a4f02ea utils: Fix Coverity ID 240113
via 2651a7b03d6 smbd: Fix/remove a comment that became irrelevant
via 7c5380c9589 smbd: Fix a comment
via af69ea73a42 smbd: Convert a void* into the real DIR*
from 8863d84d537 s3:rpc_client: Remove unused rpccli_lsa_open_policy2()
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit f955d9aa49dd880c004347b23e8c7a068bbd8952
Author: Volker Lendecke <vl at samba.org>
Date: Wed Nov 15 14:53:06 2023 +0100
smbd: Fix Coverity ID 1499372 Uninitialized scalar variable
This is real.
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Tue Nov 21 18:33:51 UTC 2023 on atb-devel-224
commit bc0df4fd97a44dd69671b7faf8814307a552d400
Author: Volker Lendecke <vl at samba.org>
Date: Wed Nov 15 14:48:20 2023 +0100
winbind: Fix Coverity ID 1398910
Coverity isn't smart enough for talloc
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 0bc329a3430a91357e7062df4c0f8ac5cbde95da
Author: Volker Lendecke <vl at samba.org>
Date: Wed Nov 15 14:39:33 2023 +0100
lsa4: Fix Coverity ID 1499410
It complains about uninitialized access, and I'm not sure it isn't
right. Just initialize the structure.
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit a5c2134cc2349e849b89c33dd91b25cc6bf2dd11
Author: Volker Lendecke <vl at samba.org>
Date: Wed Nov 15 14:36:20 2023 +0100
samr4: Fix Coverity ID 1499378
Coverity isn't smart enough to see this is initialized. As it's good
practice to initialize vars, just do it.
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 66a8a4f02eadf9c391be95712319bbca85cca8bc
Author: Volker Lendecke <vl at samba.org>
Date: Wed Nov 15 14:26:09 2023 +0100
utils: Fix Coverity ID 240113
Not a leak, but Coverity does not understand talloc well enough.
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 2651a7b03d6051a7ba054e1dd907a7de148f5159
Author: Volker Lendecke <vl at samba.org>
Date: Wed Nov 15 06:24:15 2023 +0100
smbd: Fix/remove a comment that became irrelevant
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 7c5380c95898969c73edc87d2715e1ef0199122b
Author: Volker Lendecke <vl at samba.org>
Date: Sat Nov 18 17:38:09 2023 +0100
smbd: Fix a comment
See 84cf205ff435
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit af69ea73a42a4f3903637ee300a27a4f8db32c73
Author: Volker Lendecke <vl at samba.org>
Date: Thu Nov 16 20:39:50 2023 +0100
smbd: Convert a void* into the real DIR*
Not sure why this was a void*
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source3/smbd/dir.c | 6 +-----
source3/smbd/files.c | 2 +-
source3/smbd/proto.h | 2 +-
source3/smbd/smb2_oplock.c | 8 +++++---
source3/smbd/vfs.c | 7 ++++---
source3/utils/net_ads.c | 2 ++
source3/winbindd/winbindd_ads.c | 2 ++
source4/rpc_server/lsa/lsa_init.c | 9 +++++----
source4/rpc_server/samr/dcesrv_samr.c | 4 ++--
9 files changed, 23 insertions(+), 19 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index d9e10b919d3..8fb4476d4ab 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -647,11 +647,7 @@ bool smbd_dirptr_get_entry(TALLOC_CTX *ctx,
if (posix) {
/*
- * Posix always wants to see symlinks,
- * dangling or not. We've done the
- * openat_pathref_fsp() to fill in
- * smb_fname->fsp just in case it's not
- * dangling.
+ * Posix always wants to see symlinks.
*/
ask_sharemode = false;
goto done;
diff --git a/source3/smbd/files.c b/source3/smbd/files.c
index 11fee8caf24..48b78dc32c0 100644
--- a/source3/smbd/files.c
+++ b/source3/smbd/files.c
@@ -216,7 +216,7 @@ NTSTATUS create_internal_fsp(connection_struct *conn,
* Create an internal fsp for an *existing* directory.
*
* This should only be used by callers in the VFS that need to control the
- * opening of the directory. Otherwise use open_internal_dirfsp_at().
+ * opening of the directory. Otherwise use open_internal_dirfsp().
*/
NTSTATUS create_internal_dirfsp(connection_struct *conn,
const struct smb_filename *smb_dname,
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index adc4be7755a..870e6417b2b 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -1219,7 +1219,7 @@ int vfs_set_blocking(files_struct *fsp, bool set);
off_t vfs_transfer_file(files_struct *in, files_struct *out, off_t n);
const char *vfs_readdirname(connection_struct *conn,
struct files_struct *dirfsp,
- void *p,
+ DIR *d,
char **talloced);
int vfs_ChDir(connection_struct *conn,
const struct smb_filename *smb_fname);
diff --git a/source3/smbd/smb2_oplock.c b/source3/smbd/smb2_oplock.c
index 2fd98286a92..75d50b38f6c 100644
--- a/source3/smbd/smb2_oplock.c
+++ b/source3/smbd/smb2_oplock.c
@@ -1379,7 +1379,10 @@ void message_to_share_mode_entry(struct file_id *id,
struct share_mode_entry *e,
const char *msg)
{
- e->pid.pid = (pid_t)IVAL(msg,OP_BREAK_MSG_PID_OFFSET);
+ e->pid = (struct server_id){
+ .pid = (pid_t)IVAL(msg, OP_BREAK_MSG_PID_OFFSET),
+ .vnn = IVAL(msg, OP_BREAK_MSG_VNN_OFFSET),
+ };
e->op_mid = BVAL(msg,OP_BREAK_MSG_MID_OFFSET);
e->op_type = SVAL(msg,OP_BREAK_MSG_OP_TYPE_OFFSET);
e->access_mask = IVAL(msg,OP_BREAK_MSG_ACCESS_MASK_OFFSET);
@@ -1395,8 +1398,7 @@ void message_to_share_mode_entry(struct file_id *id,
e->share_file_id = (unsigned long)IVAL(msg,OP_BREAK_MSG_FILE_ID_OFFSET);
e->uid = (uint32_t)IVAL(msg,OP_BREAK_MSG_UID_OFFSET);
e->flags = (uint16_t)SVAL(msg,OP_BREAK_MSG_FLAGS_OFFSET);
- e->name_hash = IVAL(msg,OP_BREAK_MSG_NAME_HASH_OFFSET);
- e->pid.vnn = IVAL(msg,OP_BREAK_MSG_VNN_OFFSET);
+ e->name_hash = IVAL(msg, OP_BREAK_MSG_NAME_HASH_OFFSET);
}
/****************************************************************************
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index 3a1d18d6676..0b061f1cc31 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -846,7 +846,7 @@ off_t vfs_transfer_file(files_struct *in, files_struct *out, off_t n)
const char *vfs_readdirname(connection_struct *conn,
struct files_struct *dirfsp,
- void *p,
+ DIR *d,
char **talloced)
{
struct dirent *ptr= NULL;
@@ -854,10 +854,11 @@ const char *vfs_readdirname(connection_struct *conn,
char *translated;
NTSTATUS status;
- if (!p)
+ if (d == NULL) {
return(NULL);
+ }
- ptr = SMB_VFS_READDIR(conn, dirfsp, (DIR *)p);
+ ptr = SMB_VFS_READDIR(conn, dirfsp, d);
if (!ptr)
return(NULL);
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index e7f9a4c1989..d95a2097416 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -1140,6 +1140,8 @@ static int ads_user_info(struct net_context *c, int argc, const char **argv)
ret = 0;
out:
+ TALLOC_FREE(escaped_user);
+ TALLOC_FREE(searchstring);
ads_msgfree(ads, res);
TALLOC_FREE(tmp_ctx);
return ret;
diff --git a/source3/winbindd/winbindd_ads.c b/source3/winbindd/winbindd_ads.c
index d7a665abbc6..7e572e5d41f 100644
--- a/source3/winbindd/winbindd_ads.c
+++ b/source3/winbindd/winbindd_ads.c
@@ -449,6 +449,8 @@ static NTSTATUS query_user_list(struct winbindd_domain *domain,
rids = talloc_realloc(mem_ctx, rids, uint32_t, count);
if (prids != NULL) {
*prids = rids;
+ } else {
+ TALLOC_FREE(rids);
}
status = NT_STATUS_OK;
diff --git a/source4/rpc_server/lsa/lsa_init.c b/source4/rpc_server/lsa/lsa_init.c
index 87214fe3359..575bc6fc763 100644
--- a/source4/rpc_server/lsa/lsa_init.c
+++ b/source4/rpc_server/lsa/lsa_init.c
@@ -344,10 +344,11 @@ NTSTATUS dcesrv_lsa_OpenPolicy(struct dcesrv_call_state *dce_call, TALLOC_CTX *m
DCESRV_FAULT(DCERPC_FAULT_ACCESS_DENIED);
}
- r2.in.system_name = NULL;
- r2.in.attr = r->in.attr;
- r2.in.access_mask = r->in.access_mask;
- r2.out.handle = r->out.handle;
+ r2 = (struct lsa_OpenPolicy2) {
+ .in.attr = r->in.attr,
+ .in.access_mask = r->in.access_mask,
+ .out.handle = r->out.handle,
+ };
return dcesrv_lsa_OpenPolicy2(dce_call, mem_ctx, &r2);
}
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c
index cb69f97976f..841c764031f 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -5260,8 +5260,8 @@ static NTSTATUS dcesrv_samr_ValidatePassword(struct dcesrv_call_state *dce_call,
TALLOC_CTX *mem_ctx,
struct samr_ValidatePassword *r)
{
- struct samr_GetDomPwInfo r2;
- struct samr_PwInfo pwInfo;
+ struct samr_GetDomPwInfo r2 = {};
+ struct samr_PwInfo pwInfo = {};
const char *account = NULL;
DATA_BLOB password;
enum samr_ValidationStatus res;
--
Samba Shared Repository
More information about the samba-cvs
mailing list