[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Fri May 3 23:46:03 UTC 2019
The branch, master has been updated
via abf5d7d7e15 smbd: Use "ISDOT" in reply_setatr
via 26a0f0aa54e libcli: Align integer types
via 7738a5380fa libcli: Remove an unnecessary #include
via ef289136a22 smbd: Use a struct initializer
via a34d6a78df0 smbd: Make "check_access()" static to trans2.c
via d397d56717b smbd: Use smbd_check_access_rights in reply_setatr()
from 966fc0dc604 s3: modules: ceph: use current working directory instead of share path
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit abf5d7d7e15becfba927f8b85ecd9bc46939d8fb
Author: Volker Lendecke <vl at samba.org>
Date: Mon Apr 15 22:31:40 2019 +0200
smbd: Use "ISDOT" in reply_setatr
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): Fri May 3 23:45:55 UTC 2019 on sn-devel-184
commit 26a0f0aa54ee8521afec696a0b08756ba61c1855
Author: Volker Lendecke <vl at samba.org>
Date: Fri Apr 12 15:03:26 2019 +0200
libcli: Align integer types
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 7738a5380fa7ff2fee49da83044d67e6c0c5c3b5
Author: Volker Lendecke <vl at samba.org>
Date: Fri Apr 12 15:03:12 2019 +0200
libcli: Remove an unnecessary #include
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit ef289136a22b0184097e2c34d8e38bb8844475c1
Author: Volker Lendecke <vl at samba.org>
Date: Thu Apr 25 21:03:35 2019 +0200
smbd: Use a struct initializer
With -O3 this saves 32 bytes of .text
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit a34d6a78df0510be444217db565c900eec6bbf51
Author: Volker Lendecke <vl at samba.org>
Date: Sun Apr 14 11:41:49 2019 +0200
smbd: Make "check_access()" static to trans2.c
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit d397d56717b804959367f04bbda49a5d704aa9da
Author: Volker Lendecke <vl at samba.org>
Date: Sun Apr 14 11:39:31 2019 +0200
smbd: Use smbd_check_access_rights in reply_setatr()
That was the only caller of check_access outside of trans2.c, and it
passed an explicit NULL for fsp. Use the lower-level call, so we can
make check_access() static to trans2.c
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source3/smbd/fileio.c | 3 +--
source3/smbd/proto.h | 4 ----
source3/smbd/reply.c | 7 +++----
source3/smbd/trans2.c | 8 ++++----
source4/libcli/resolve/dns_ex.c | 3 +--
5 files changed, 9 insertions(+), 16 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c
index cde6a057ccd..a00b368f92b 100644
--- a/source3/smbd/fileio.c
+++ b/source3/smbd/fileio.c
@@ -264,8 +264,7 @@ void trigger_write_time_update_immediate(struct files_struct *fsp)
fsp->update_write_time_triggered = true;
fsp->update_write_time_on_close = false;
- ZERO_STRUCT(ft);
- ft.mtime = timespec_current();
+ ft = (struct smb_file_time) { .mtime = timespec_current() };
/* Update the time in the open file db. */
(void)set_write_time(fsp->file_id, ft.mtime);
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index 68568e1bb3d..05208166ebf 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -1162,10 +1162,6 @@ int sys_statvfs(const char *path, vfs_statvfs_struct *statbuf);
NTSTATUS check_access_fsp(const struct files_struct *fsp,
uint32_t access_mask);
-NTSTATUS check_access(connection_struct *conn,
- files_struct *fsp,
- const struct smb_filename *smb_fname,
- uint32_t access_mask);
uint64_t smb_roundup(connection_struct *conn, uint64_t val);
uint64_t get_FileIndex(connection_struct *conn, const SMB_STRUCT_STAT *psbuf);
void aapl_force_zero_file_id(struct smbd_server_connection *sconn);
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 2cef4d01a01..ef93e63c821 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -1520,8 +1520,7 @@ void reply_setatr(struct smb_request *req)
goto out;
}
- if (smb_fname->base_name[0] == '.' &&
- smb_fname->base_name[1] == '\0') {
+ if (ISDOT(smb_fname->base_name)) {
/*
* Not sure here is the right place to catch this
* condition. Might be moved to somewhere else later -- vl
@@ -1539,8 +1538,8 @@ void reply_setatr(struct smb_request *req)
else
mode &= ~FILE_ATTRIBUTE_DIRECTORY;
- status = check_access(conn, NULL, smb_fname,
- FILE_WRITE_ATTRIBUTES);
+ status = smbd_check_access_rights(
+ conn, smb_fname, false, FILE_WRITE_ATTRIBUTES);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
goto out;
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index fe406adb58f..98fa1e68fd0 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -103,10 +103,10 @@ NTSTATUS check_access_fsp(const struct files_struct *fsp,
The canonical "check access" based on object handle or path function.
********************************************************************/
-NTSTATUS check_access(connection_struct *conn,
- files_struct *fsp,
- const struct smb_filename *smb_fname,
- uint32_t access_mask)
+static NTSTATUS check_access(connection_struct *conn,
+ files_struct *fsp,
+ const struct smb_filename *smb_fname,
+ uint32_t access_mask)
{
NTSTATUS status;
diff --git a/source4/libcli/resolve/dns_ex.c b/source4/libcli/resolve/dns_ex.c
index a6863aed59e..86eeb5f5921 100644
--- a/source4/libcli/resolve/dns_ex.c
+++ b/source4/libcli/resolve/dns_ex.c
@@ -31,7 +31,6 @@
*/
#include "includes.h"
-#include "lib/events/events.h"
#include "system/network.h"
#include "system/filesys.h"
#include "lib/socket/socket.h"
@@ -273,7 +272,7 @@ static struct dns_records_container get_srv_records(TALLOC_CTX *mem_ctx,
struct dns_rr_srv *dclist;
NTSTATUS status;
uint32_t total;
- unsigned i;
+ int i;
int count;
memset(&ret, 0, sizeof(struct dns_records_container));
--
Samba Shared Repository
More information about the samba-cvs
mailing list