[SCM] Samba Shared Repository - branch master updated
Ralph Böhme
slow at samba.org
Fri Jun 28 14:33:02 UTC 2024
The branch, master has been updated
via 0ebabaedbc0 smbd: Fix cached dos attributes
via a32f52e5735 librpc: Make NDR_PRINT_DEBUG call just one DEBUG
via b565901a474 smbd: Simplify smbd_do_qfsinfo with direct struct initialization
via d2932c22e07 smbd: Simplify reopen_from_fsp
via c3799dfb4a7 smbd: Remove some unused code
via 1fb07bc7213 smbd: Avoid a cast
via 9cb187d1880 smbd: Print reparse_point in dos_mode_debug_print
via 7b03fc3d9f2 smbd: Simplify dos_mode_from_sbuf
via e2ba6144657 smbd: Simplify fdos_mode
via 6a077e2fcda smbd: Simplify filename_convert_dirfsp_nosymlink
via 5e206ffbe36 smbd: Remove an obsolete comment
via e94de8a4af9 smbd: Simplify init_smb_file_time
via e5a304193ba smbd: Simplify copy_stat_ex_timestamps
via 1d2fbbdd640 smbd: Modernize a DEBUG
via 2edb49c5fc7 vfs: Fix typos
via 6f68812d228 smbd: Don't leave a pointer variable uninitialized
via e6f8568541a smbd: Align an integer type
via 0db47112bba smbd: Modernize a DEBUG
from 11c4b253317 ctdb-conf: Rename config loading to not be daemon-specific
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 0ebabaedbc06b3b4f658430dcf2edb0711f599fd
Author: Volker Lendecke <vl at samba.org>
Date: Mon Jun 24 16:50:57 2024 +0200
smbd: Fix cached dos attributes
The callers of fset_dos_mode must set the cached attributes
themselves, which I did not see. I tried, but I did not find a clean
way to fix this behind SMB_VFS_FSET_DOS_ATTRIBUTES, with a smb_fname
and smb_fname->fsp->fsp_name we might have two copies of the cached
dos attributes around and if we only update fsp->fsp_name, we might
miss the outer one.
Not doing a test, this is really fresh code, and in the future we must
reorganize setting and caching dos attributes anyway.
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
Autobuild-User(master): Ralph Böhme <slow at samba.org>
Autobuild-Date(master): Fri Jun 28 14:32:27 UTC 2024 on atb-devel-224
commit a32f52e573561900cbed097c453b5240df3b0ae5
Author: Volker Lendecke <vl at samba.org>
Date: Mon Jun 17 14:42:30 2024 +0200
librpc: Make NDR_PRINT_DEBUG call just one DEBUG
Give debug.c the chance to use just one write call (right now it
doesn't yet)
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit b565901a47483ec3782c532a1e87dcf213e30fbe
Author: Volker Lendecke <vl at samba.org>
Date: Thu Jun 27 12:50:50 2024 +0200
smbd: Simplify smbd_do_qfsinfo with direct struct initialization
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit d2932c22e07de217766f622f57e6750f0cd4bc46
Author: Volker Lendecke <vl at samba.org>
Date: Wed Jun 26 15:30:50 2024 +0200
smbd: Simplify reopen_from_fsp
In a variable declaration the (struct ...) is not needed
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit c3799dfb4a79ab0111148096ffa0d37f4a487a3a
Author: Volker Lendecke <vl at samba.org>
Date: Wed Jun 26 08:57:26 2024 +0200
smbd: Remove some unused code
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 1fb07bc7213d49577e5a853823e68328ca99b863
Author: Volker Lendecke <vl at samba.org>
Date: Tue Jun 25 16:11:16 2024 +0200
smbd: Avoid a cast
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 9cb187d1880bf9c56107ccce4dc8956284e94689
Author: Volker Lendecke <vl at samba.org>
Date: Tue Jun 25 16:10:28 2024 +0200
smbd: Print reparse_point in dos_mode_debug_print
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 7b03fc3d9f25ce3b82108e0deaffdf70dc83a414
Author: Volker Lendecke <vl at samba.org>
Date: Tue Jun 25 16:07:58 2024 +0200
smbd: Simplify dos_mode_from_sbuf
We don't need that else branch, this could be a switch as well
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit e2ba6144657be84f35add7e4c7f7c178f80a4f07
Author: Volker Lendecke <vl at samba.org>
Date: Tue Jun 25 16:04:53 2024 +0200
smbd: Simplify fdos_mode
We don't need the outer !NT_STATUS_IS_OK and the comment
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 6a077e2fcdabae64c1ab6e1378ea10ea2b57f738
Author: Volker Lendecke <vl at samba.org>
Date: Tue Jun 25 15:49:23 2024 +0200
smbd: Simplify filename_convert_dirfsp_nosymlink
Initialize the timestamps in the existing struct assignment
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 5e206ffbe360004573c00b11fc0bfcdf74f7040d
Author: Volker Lendecke <vl at samba.org>
Date: Tue Jun 25 13:08:58 2024 +0200
smbd: Remove an obsolete comment
We have a good understanding of SAMBA_UTIME_OMIT these days
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit e94de8a4af908c0e09185c6b1f1a04848d831dfb
Author: Volker Lendecke <vl at samba.org>
Date: Tue Jun 25 13:06:35 2024 +0200
smbd: Simplify init_smb_file_time
Call make_omit_timespec just once, saves a few .text bytes
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit e5a304193ba1bba20c8f40c1e5bb6f0adab52d0c
Author: Volker Lendecke <vl at samba.org>
Date: Tue Jun 25 12:39:09 2024 +0200
smbd: Simplify copy_stat_ex_timestamps
copy_stat_ex_timestamps doesn't need the fsp, it only needs the
destination stat struct
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 1d2fbbdd640bb9c01f18d41fdd1a4949317be930
Author: Volker Lendecke <vl at samba.org>
Date: Tue Jun 25 10:41:41 2024 +0200
smbd: Modernize a DEBUG
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 2edb49c5fc7b0daccebb2a2fe48b66ce326293c9
Author: Volker Lendecke <vl at samba.org>
Date: Tue Jun 25 10:28:38 2024 +0200
vfs: Fix typos
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 6f68812d228b72d802980890a46cb557dd8b0272
Author: Volker Lendecke <vl at samba.org>
Date: Mon Jun 24 16:52:51 2024 +0200
smbd: Don't leave a pointer variable uninitialized
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit e6f8568541a56b5b542ae00d9aef2660ab5823f1
Author: Volker Lendecke <vl at samba.org>
Date: Mon Jun 24 16:51:08 2024 +0200
smbd: Align an integer type
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 0db47112bba013ed1fa9e371a50d34ed8db854ba
Author: Volker Lendecke <vl at samba.org>
Date: Mon Jun 24 14:06:18 2024 +0200
smbd: Modernize a DEBUG
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
-----------------------------------------------------------------------
Summary of changes:
librpc/ndr/ndr.c | 15 +++++++++++----
source3/include/proto.h | 3 ++-
source3/lib/system.c | 11 ++++++-----
source3/modules/util_reparse.c | 4 ++++
source3/modules/vfs_posixacl.c | 4 ++--
source3/smbd/dosmode.c | 34 ++++++++++++++++++----------------
source3/smbd/filename.c | 13 +++++--------
source3/smbd/open.c | 2 +-
source3/smbd/smb1_negprot.c | 10 +++++-----
source3/smbd/smb1_nttrans.c | 26 ++++++++++++++------------
source3/smbd/smb1_reply.c | 5 -----
source3/smbd/smb2_trans2.c | 22 +++++-----------------
source3/smbd/vfs.c | 10 ++++++----
13 files changed, 79 insertions(+), 80 deletions(-)
Changeset truncated at 500 lines:
diff --git a/librpc/ndr/ndr.c b/librpc/ndr/ndr.c
index 1478faa466f..1eaa278d820 100644
--- a/librpc/ndr/ndr.c
+++ b/librpc/ndr/ndr.c
@@ -439,12 +439,15 @@ _PUBLIC_ bool ndr_print_debug(int level,
const char *function)
{
struct ndr_print *ndr;
-
- DEBUGLF(level, (" "), location, function);
+ bool ret = false;
ndr = talloc_zero(NULL, struct ndr_print);
if (!ndr) return false;
- ndr->print = ndr_print_debug_helper;
+ ndr->private_data = talloc_strdup(ndr, "");
+ if (ndr->private_data == NULL) {
+ goto fail;
+ }
+ ndr->print = ndr_print_string_helper;
ndr->depth = 1;
ndr->flags = 0;
#ifdef DEBUG_PASSWORD
@@ -454,8 +457,12 @@ _PUBLIC_ bool ndr_print_debug(int level,
#endif
fn(ndr, name, ptr);
+ DEBUGLF(level, (" %s", (char *)ndr->private_data), location, function);
+
+ ret = true;
+fail:
talloc_free(ndr);
- return true;
+ return ret;
}
/*
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 9ccbbaee48a..bd7efce1f39 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -173,7 +173,8 @@ void update_stat_ex_mtime(struct stat_ex *dst, struct timespec write_ts);
void update_stat_ex_create_time(struct stat_ex *dst, struct timespec create_time);
void update_stat_ex_from_saved_stat(struct stat_ex *dst,
const struct stat_ex *src);
-void copy_stat_ex_timestamps(files_struct *fsp, const struct smb_file_time *ft);
+void copy_stat_ex_timestamps(struct stat_ex *st,
+ const struct smb_file_time *ft);
int sys_stat(const char *fname, SMB_STRUCT_STAT *sbuf,
bool fake_dir_create_times);
int sys_fstat(int fd, SMB_STRUCT_STAT *sbuf,
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 2006edbed65..e882e173f11 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -249,22 +249,23 @@ void update_stat_ex_from_saved_stat(struct stat_ex *dst,
}
}
-void copy_stat_ex_timestamps(files_struct *fsp, const struct smb_file_time *ft)
+void copy_stat_ex_timestamps(struct stat_ex *st,
+ const struct smb_file_time *ft)
{
if (!is_omit_timespec(&ft->atime)) {
- fsp->fsp_name->st.st_ex_atime = ft->atime;
+ st->st_ex_atime = ft->atime;
}
if (!is_omit_timespec(&ft->create_time)) {
- fsp->fsp_name->st.st_ex_btime = ft->create_time;
+ st->st_ex_btime = ft->create_time;
}
if (!is_omit_timespec(&ft->ctime)) {
- fsp->fsp_name->st.st_ex_ctime = ft->ctime;
+ st->st_ex_ctime = ft->ctime;
}
if (!is_omit_timespec(&ft->mtime)) {
- fsp->fsp_name->st.st_ex_mtime = ft->mtime;
+ st->st_ex_mtime = ft->mtime;
}
}
diff --git a/source3/modules/util_reparse.c b/source3/modules/util_reparse.c
index 19a15a06c51..fce3603e780 100644
--- a/source3/modules/util_reparse.c
+++ b/source3/modules/util_reparse.c
@@ -211,6 +211,8 @@ NTSTATUS fsctl_set_reparse_point(struct files_struct *fsp,
return status;
}
+ fsp->fsp_name->st.cached_dos_attributes = dos_mode;
+
return NT_STATUS_OK;
}
@@ -277,5 +279,7 @@ NTSTATUS fsctl_del_reparse_point(struct files_struct *fsp,
return status;
}
+ fsp->fsp_name->st.cached_dos_attributes = dos_mode;
+
return NT_STATUS_OK;
}
diff --git a/source3/modules/vfs_posixacl.c b/source3/modules/vfs_posixacl.c
index feb819de982..4eb1326bb7f 100644
--- a/source3/modules/vfs_posixacl.c
+++ b/source3/modules/vfs_posixacl.c
@@ -334,14 +334,14 @@ static acl_t smb_acl_to_posix(const struct smb_acl_t *acl)
switch (entry->a_type) {
case SMB_ACL_USER:
if (acl_set_qualifier(e, &entry->info.user.uid) != 0) {
- DEBUG(1, ("acl_set_qualifiier failed: %s\n",
+ DEBUG(1, ("acl_set_qualifier failed: %s\n",
strerror(errno)));
goto fail;
}
break;
case SMB_ACL_GROUP:
if (acl_set_qualifier(e, &entry->info.group.gid) != 0) {
- DEBUG(1, ("acl_set_qualifiier failed: %s\n",
+ DEBUG(1, ("acl_set_qualifier failed: %s\n",
strerror(errno)));
goto fail;
}
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index 8b47a89dec4..d7999775c26 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -64,8 +64,13 @@ static void dos_mode_debug_print(const char *func, uint32_t mode)
if (mode & FILE_ATTRIBUTE_COMPRESSED) {
fstrcat(modestr, "[compressed]");
}
+ if (mode & FILE_ATTRIBUTE_REPARSE_POINT) {
+ fstrcat(modestr, "[reparse_point]");
+ }
- DBG_INFO("%s returning (0x%x): \"%s\"\n", func, (unsigned)mode,
+ DBG_INFO("%s returning (0x%" PRIx32 "): \"%s\"\n",
+ func,
+ mode,
modestr);
}
@@ -215,13 +220,14 @@ static uint32_t dos_mode_from_sbuf(connection_struct *conn,
if ((st->st_ex_mode & S_IWUSR) == 0) {
result |= FILE_ATTRIBUTE_READONLY;
}
- } else if (ro_opts == MAP_READONLY_PERMISSIONS) {
+ }
+ if (ro_opts == MAP_READONLY_PERMISSIONS) {
/* smb_fname->fsp can be NULL for an MS-DFS link. */
/* Check actual permissions for read-only. */
if ((fsp != NULL) && !can_write_to_fsp(fsp)) {
result |= FILE_ATTRIBUTE_READONLY;
}
- } /* Else never set the readonly bit. */
+ }
if (MAP_ARCHIVE(conn) && ((st->st_ex_mode & S_IXUSR) != 0)) {
result |= FILE_ATTRIBUTE_ARCHIVE;
@@ -540,9 +546,9 @@ NTSTATUS set_ea_dos_attribute(connection_struct *conn,
btime = nt_time_to_full_timespec(dosattrib.info.info5.create_time);
update_stat_ex_create_time(&smb_fname->st, btime);
- DEBUG(10,("set_ea_dos_attribute: set EA 0x%x on file %s\n",
- (unsigned int)dosmode,
- smb_fname_str_dbg(smb_fname)));
+ DBG_DEBUG("set EA 0x%" PRIx32 " on file %s\n",
+ dosmode,
+ smb_fname_str_dbg(smb_fname));
return NT_STATUS_OK;
}
@@ -719,15 +725,11 @@ uint32_t fdos_mode(struct files_struct *fsp)
status = SMB_VFS_FGET_DOS_ATTRIBUTES(fsp->conn,
metadata_fsp(fsp),
&result);
- if (!NT_STATUS_IS_OK(status)) {
- /*
- * Only fall back to using UNIX modes if we get NOT_IMPLEMENTED.
- */
- if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_IMPLEMENTED)) {
- result |= dos_mode_from_sbuf(fsp->conn,
- &fsp->fsp_name->st,
- fsp);
- }
+
+ if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_IMPLEMENTED)) {
+ result |= dos_mode_from_sbuf(fsp->conn,
+ &fsp->fsp_name->st,
+ fsp);
}
fsp->fsp_name->st.cached_dos_attributes = dos_mode_post(result, fsp, __func__);
@@ -1226,7 +1228,7 @@ int file_ntimes(connection_struct *conn,
done:
if (ret == 0) {
- copy_stat_ex_timestamps(fsp, ft);
+ copy_stat_ex_timestamps(&fsp->fsp_name->st, ft);
}
return ret;
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index 7fafc1718c7..941a4ade5d0 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -755,6 +755,7 @@ static NTSTATUS filename_convert_dirfsp_nosymlink(
SMB_ASSERT(!(ucf_flags & UCF_DFS_PATHNAME));
if (is_fake_file_path(name_in)) {
+ const struct timespec omit = make_omit_timespec();
smb_fname = synthetic_smb_fname_split(mem_ctx, name_in, posix);
if (smb_fname == NULL) {
return NT_STATUS_NO_MEMORY;
@@ -762,15 +763,11 @@ static NTSTATUS filename_convert_dirfsp_nosymlink(
smb_fname->st = (SMB_STRUCT_STAT){
.st_ex_nlink = 1,
.st_ex_mode = S_IFREG | 0644,
+ .st_ex_btime = omit,
+ .st_ex_atime = omit,
+ .st_ex_mtime = omit,
+ .st_ex_ctime = omit,
};
- smb_fname->st.st_ex_btime =
- (struct timespec){0, SAMBA_UTIME_OMIT};
- smb_fname->st.st_ex_atime =
- (struct timespec){0, SAMBA_UTIME_OMIT};
- smb_fname->st.st_ex_mtime =
- (struct timespec){0, SAMBA_UTIME_OMIT};
- smb_fname->st.st_ex_ctime =
- (struct timespec){0, SAMBA_UTIME_OMIT};
*_dirfsp = conn->cwd_fsp;
*_smb_fname = smb_fname;
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 20db4cf5e23..3b1e9700db3 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1161,7 +1161,7 @@ static NTSTATUS reopen_from_fsp(struct files_struct *dirfsp,
((old_fd = fsp_get_pathref_fd(fsp)) != -1)) {
struct sys_proc_fd_path_buf buf;
- struct smb_filename proc_fname = (struct smb_filename){
+ struct smb_filename proc_fname = {
.base_name = sys_proc_fd_path(old_fd, &buf),
};
mode_t mode = fsp->fsp_name->st.st_ex_mode;
diff --git a/source3/smbd/smb1_negprot.c b/source3/smbd/smb1_negprot.c
index 7171c663f41..23bb726bc46 100644
--- a/source3/smbd/smb1_negprot.c
+++ b/source3/smbd/smb1_negprot.c
@@ -480,7 +480,7 @@ void reply_negprot(struct smb_request *req)
int protocol;
const char *p;
int protocols = 0;
- int num_cliprotos;
+ size_t num_cliprotos;
char **cliprotos;
size_t i;
size_t converted_size;
@@ -519,10 +519,10 @@ void reply_negprot(struct smb_request *req)
while (smbreq_bufrem(req, p) > 0) {
- char **tmp;
-
- tmp = talloc_realloc(talloc_tos(), cliprotos, char *,
- num_cliprotos+1);
+ char **tmp = talloc_realloc(talloc_tos(),
+ cliprotos,
+ char *,
+ num_cliprotos + 1);
if (tmp == NULL) {
DEBUG(0, ("talloc failed\n"));
TALLOC_FREE(cliprotos);
diff --git a/source3/smbd/smb1_nttrans.c b/source3/smbd/smb1_nttrans.c
index f89cddb2501..001e3be6df9 100644
--- a/source3/smbd/smb1_nttrans.c
+++ b/source3/smbd/smb1_nttrans.c
@@ -563,18 +563,20 @@ void reply_ntcreate_and_X(struct smb_request *req)
goto out;
}
- DEBUG(10,("reply_ntcreate_and_X: flags = 0x%x, access_mask = 0x%x "
- "file_attributes = 0x%x, share_access = 0x%x, "
- "create_disposition = 0x%x create_options = 0x%x "
- "root_dir_fid = 0x%x, fname = %s\n",
- (unsigned int)flags,
- (unsigned int)access_mask,
- (unsigned int)file_attributes,
- (unsigned int)share_access,
- (unsigned int)create_disposition,
- (unsigned int)create_options,
- (unsigned int)root_dir_fid,
- fname));
+ DBG_DEBUG("flags = 0x%" PRIx32 ", access_mask = 0x%" PRIx32
+ ", file_attributes = 0x%" PRIx32
+ ", share_access = 0x%" PRIx32
+ ", create_disposition = 0x%" PRIx32
+ ", create_options = 0x%" PRIx32 ", root_dir_fid = 0x%" PRIx32
+ ", fname = %s\n",
+ flags,
+ access_mask,
+ file_attributes,
+ share_access,
+ create_disposition,
+ create_options,
+ root_dir_fid,
+ fname);
/*
* we need to remove ignored bits when they come directly from the client
diff --git a/source3/smbd/smb1_reply.c b/source3/smbd/smb1_reply.c
index 335c92aa3ed..392de41940e 100644
--- a/source3/smbd/smb1_reply.c
+++ b/source3/smbd/smb1_reply.c
@@ -6957,11 +6957,6 @@ void reply_setattrE(struct smb_request *req)
reply_smb1_outbuf(req, 0, 0);
- /*
- * Patch from Ray Frush <frush at engr.colostate.edu>
- * Sometimes times are sent as zero - ignore them.
- */
-
/* Ensure we have a valid stat struct for the source. */
status = vfs_stat_fsp(fsp);
if (!NT_STATUS_IS_OK(status)) {
diff --git a/source3/smbd/smb2_trans2.c b/source3/smbd/smb2_trans2.c
index 32d368cedaa..cb7390133fe 100644
--- a/source3/smbd/smb2_trans2.c
+++ b/source3/smbd/smb2_trans2.c
@@ -2368,14 +2368,11 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned
/* we need to fake up a fsp here,
* because its not send in this call
*/
- files_struct tmpfsp;
- SMB_NTQUOTA_STRUCT quotas;
-
- ZERO_STRUCT(tmpfsp);
- ZERO_STRUCT(quotas);
-
- tmpfsp.conn = conn;
- tmpfsp.fnum = FNUM_FIELD_INVALID;
+ files_struct tmpfsp = {
+ .conn = conn,
+ .fnum = FNUM_FIELD_INVALID,
+ };
+ SMB_NTQUOTA_STRUCT quotas = {};
/* access check */
if (get_current_uid(conn) != 0) {
@@ -5146,15 +5143,6 @@ NTSTATUS smbd_do_setfilepathinfo(connection_struct *conn,
case SMB_FILE_DISPOSITION_INFORMATION:
case SMB_SET_FILE_DISPOSITION_INFO: /* Set delete on close for open file. */
{
-#if 0
- /* JRA - We used to just ignore this on a path ?
- * Shouldn't this be invalid level on a pathname
- * based call ?
- */
- if (tran_call != TRANSACT2_SETFILEINFO) {
- return ERROR_NT(NT_STATUS_INVALID_LEVEL);
- }
-#endif
status = smb_set_file_disposition_info(conn,
pdata,
total_data,
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index 0b061f1cc31..13b3ba61cea 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -1190,11 +1190,13 @@ NTSTATUS vfs_stat_fsp(files_struct *fsp)
void init_smb_file_time(struct smb_file_time *ft)
{
+ struct timespec omit = make_omit_timespec();
+
*ft = (struct smb_file_time) {
- .atime = make_omit_timespec(),
- .ctime = make_omit_timespec(),
- .mtime = make_omit_timespec(),
- .create_time = make_omit_timespec()
+ .atime = omit,
+ .ctime = omit,
+ .mtime = omit,
+ .create_time = omit,
};
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list