[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 35f6c3f3d4a ctdb/docs: Include ceph rados namespace support in man page via d8c52995f68 ctdb/ceph: Add optional namespace support for mutex helper from 9242f1e0ddb gitlab-ci: Update image to Fedora 40 https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 35f6c3f3d4a5521e6576fcc0dd7dd3bbcea041b2 Author: Günther Deschner Date: Fri Jun 7 14:40:07 2024 +0530 ctdb/docs: Include ceph rados namespace support in man page Document the new optional argument to specify the namespace to be associated with RADOS objects in a pool. Pair-Programmed-With: Anoop C S Signed-off-by: Günther Deschner Reviewed-by: Günther Deschner Reviewed-by: David Disseldorp Autobuild-User(master): Anoop C S Autobuild-Date(master): Fri Jun 14 07:42:25 UTC 2024 on atb-devel-224 commit d8c52995f68fe088dd2174562faee69ed1c95edd Author: Günther Deschner Date: Fri Jun 7 14:39:37 2024 +0530 ctdb/ceph: Add optional namespace support for mutex helper RADOS objects within a pool can be associated to a namespace for logical separation. librados already provides an API to configure such a namespace with respect to a context. Make use of it as an optional argument to the helper binary. Pair-Programmed-With: Anoop C S Signed-off-by: Günther Deschner Reviewed-by: Günther Deschner Reviewed-by: David Disseldorp --- Summary of changes: ctdb/doc/ctdb_mutex_ceph_rados_helper.7.xml| 4 ++- ctdb/utils/ceph/ctdb_mutex_ceph_rados_helper.c | 50 +- 2 files changed, 45 insertions(+), 9 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/doc/ctdb_mutex_ceph_rados_helper.7.xml b/ctdb/doc/ctdb_mutex_ceph_rados_helper.7.xml index f558f873d9a..93d79cea5dc 100644 --- a/ctdb/doc/ctdb_mutex_ceph_rados_helper.7.xml +++ b/ctdb/doc/ctdb_mutex_ceph_rados_helper.7.xml @@ -29,12 +29,14 @@ 5: -cluster lock = !ctdb_mutex_ceph_rados_helper [Cluster] [User] [Pool] [Object] +cluster lock = !ctdb_mutex_ceph_rados_helper [Cluster] [User] [Pool] [Object] [Timeout] [-n Namespace] Cluster: Ceph cluster name (e.g. ceph) User: Ceph cluster user name (e.g. client.admin) Pool: Ceph RADOS pool name Object: Ceph RADOS object name +Timeout: Ceph RADOS lock duration in seconds (optional) +Namespace: Ceph RADOS pool namespace (optional) The Ceph cluster Cluster must be up and running, diff --git a/ctdb/utils/ceph/ctdb_mutex_ceph_rados_helper.c b/ctdb/utils/ceph/ctdb_mutex_ceph_rados_helper.c index 7d868a38b23..46566c97a83 100644 --- a/ctdb/utils/ceph/ctdb_mutex_ceph_rados_helper.c +++ b/ctdb/utils/ceph/ctdb_mutex_ceph_rados_helper.c @@ -42,9 +42,18 @@ static char *progname = NULL; +static void usage(void) +{ + fprintf(stderr, "Usage: %s " + " " + "[lock duration secs] [-n RADOS namespace]\n", + progname); +} + static int ctdb_mutex_rados_ctx_create(const char *ceph_cluster_name, const char *ceph_auth_name, const char *pool_name, + const char *namespace, rados_t *_ceph_cluster, rados_ioctx_t *_ioctx) { @@ -87,6 +96,10 @@ static int ctdb_mutex_rados_ctx_create(const char *ceph_cluster_name, return ret; } + if (namespace != NULL) { + rados_ioctx_set_namespace(ioctx, namespace); + } + *_ceph_cluster = ceph_cluster; *_ioctx = ioctx; @@ -145,6 +158,7 @@ struct ctdb_mutex_rados_state { const char *ceph_cluster_name; const char *ceph_auth_name; const char *pool_name; + const char *namespace; const char *object; uint64_t lock_duration_s; int ppid; @@ -295,15 +309,13 @@ static int ctdb_mutex_rados_mgr_reg(rados_t ceph_cluster) int main(int argc, char *argv[]) { int ret; + int opt; struct ctdb_mutex_rados_state *cmr_state; progname = argv[0]; - if ((argc != 5) && (argc != 6)) { - fprintf(stderr, "Usage: %s " - " " - "[lock duration secs]\n", - progname); + if (argc < 5) { + usage(); ret = -EINVAL; goto err_out; } @@ -325,15 +337,36 @@ int main(int argc, char *argv[]) cmr_state->ceph_auth_name = argv[2]; cmr_state->pool_name = argv[3]; cmr_state->object = argv[4]; - if (argc ==
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 4cade04d1f1 vfs_ceph: Implement SMB_VFS_FSET_DOS_ATTRIBUTES for precise btime via c36e79ef810 vfs_ceph: Simplify SMB_VFS_FGET_DOS_ATTRIBUTES from 98b443d9033 fuzzing: fix fuzz_stable_sort_r_unstable comparison https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 4cade04d1f1e7f1bbd99776bcf876a42488d0f78 Author: Anoop C S Date: Fri May 17 11:57:26 2024 +0530 vfs_ceph: Implement SMB_VFS_FSET_DOS_ATTRIBUTES for precise btime Previously we added an implementation for SMB_VFS_FGET_DOS_ATTRIBUTES so that the btime is always preserved unless explicitly changed using SMB_VFS_FNTIMES. But there are situations with open file handle where btime stored on dos attributes as create_time has to be precise for comparison because a one-to-one conversion between timepsec and nttime is not always guaranteed. Accordingly preserve btime via SMB_VFS_FSET_DOS_ATTRIBUTES so that we always compare the exact btime from fsp stat information while the file handle is still open. Signed-off-by: Anoop C S Reviewed-by: David Disseldorp Autobuild-User(master): Anoop C S Autobuild-Date(master): Mon Jun 3 11:10:11 UTC 2024 on atb-devel-224 commit c36e79ef8104b84c9df638cbec984ec3491d875b Author: Anoop C S Date: Sat May 18 12:37:44 2024 +0530 vfs_ceph: Simplify SMB_VFS_FGET_DOS_ATTRIBUTES Signed-off-by: Anoop C S Reviewed-by: David Disseldorp --- Summary of changes: source3/modules/vfs_ceph.c | 26 ++ 1 file changed, 22 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c index 6dae8a5f9e8..bb1650446c9 100644 --- a/source3/modules/vfs_ceph.c +++ b/source3/modules/vfs_ceph.c @@ -1577,9 +1577,6 @@ static NTSTATUS cephwrap_fget_dos_attributes(struct vfs_handle_struct *handle, NTSTATUS status; status = fget_ea_dos_attribute(fsp, dosmode); - if (!NT_STATUS_IS_OK(status)) { - return status; - } /* * Restore previously stored btime from statx timestamps as it should be @@ -1589,7 +1586,27 @@ static NTSTATUS cephwrap_fget_dos_attributes(struct vfs_handle_struct *handle, */ fsp->fsp_name->st.st_ex_btime = saved_btime; - return NT_STATUS_OK; + return status; +} + +static NTSTATUS cephwrap_fset_dos_attributes(struct vfs_handle_struct *handle, +struct files_struct *fsp, +uint32_t dosmode) +{ + struct timespec saved_btime = fsp->fsp_name->st.st_ex_btime; + NTSTATUS status; + + status = set_ea_dos_attribute(handle->conn, fsp->fsp_name, dosmode); + + /* +* Restore previously stored btime from statx timestamps. This is done +* to ensure that we have the exact btime in fsp stat information while +* the file handle is still open since the create_time stored as part of +* dos attributes can loose its precision when converted back to btime. +*/ + fsp->fsp_name->st.st_ex_btime = saved_btime; + + return status; } / @@ -1957,6 +1974,7 @@ static struct vfs_fn_pointers ceph_fns = { .get_real_filename_at_fn = cephwrap_get_real_filename_at, .connectpath_fn = cephwrap_connectpath, .fget_dos_attributes_fn = cephwrap_fget_dos_attributes, + .fset_dos_attributes_fn = cephwrap_fset_dos_attributes, /* EA operations. */ .getxattrat_send_fn = vfs_not_implemented_getxattrat_send, -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via dd2289eb3ae vfs_ceph: Implement SMB_VFS_FGET_DOS_ATTRIBUTES to preserve create_time via f3c185a6294 source3/smbd: Update timestamps after a successful SMB_VFS_FNTIMES from a3126ebfe57 lib: Use struct initialization in imessaging_client_init() https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit dd2289eb3ae83b6586493a14098a7e7eddc1ec63 Author: Anoop C S Date: Thu Mar 21 16:49:04 2024 +0530 vfs_ceph: Implement SMB_VFS_FGET_DOS_ATTRIBUTES to preserve create_time In order to avoid the dependency on dos attribute for create_time we now preserve the btime before parsing dos attribute which may update btime from its value with an old one unless we explicitly reset dos attribute with new create_time in SMB_VFS_FNTIMES implementation. Therefore have an implementation for SMB_VFS_FGET_DOS_ATTRIBUTES to save and restore updated create_time. Signed-off-by: Anoop C S Reviewed-by: Ralph Boehme Autobuild-User(master): Anoop C S Autobuild-Date(master): Mon Apr 1 15:24:39 UTC 2024 on atb-devel-224 commit f3c185a6294d4d92c43687a0ebe64f9cf59a4a2a Author: Anoop C S Date: Fri Mar 22 11:38:08 2024 +0530 source3/smbd: Update timestamps after a successful SMB_VFS_FNTIMES When an open file handle is used to change timestamps we fail to return updated values to clients until next open is issued. Unless we fill in the timestamps subsequent calls like GETINFO cannot see the latest value causing incorrect results. Therefore copy those timestamp values as soon as it is set on the backend. Signed-off-by: Anoop C S Reviewed-by: Ralph Boehme --- Summary of changes: source3/include/proto.h| 1 + source3/lib/system.c | 19 +++ source3/modules/vfs_ceph.c | 24 source3/smbd/dosmode.c | 8 +++- 4 files changed, 51 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source3/include/proto.h b/source3/include/proto.h index 389bb2fc935..d98bd3c09cb 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -173,6 +173,7 @@ 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); 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 1ec0ae9b1d5..2006edbed65 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -249,6 +249,25 @@ 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) +{ + if (!is_omit_timespec(>atime)) { + fsp->fsp_name->st.st_ex_atime = ft->atime; + } + + if (!is_omit_timespec(>create_time)) { + fsp->fsp_name->st.st_ex_btime = ft->create_time; + } + + if (!is_omit_timespec(>ctime)) { + fsp->fsp_name->st.st_ex_ctime = ft->ctime; + } + + if (!is_omit_timespec(>mtime)) { + fsp->fsp_name->st.st_ex_mtime = ft->mtime; + } +} + void init_stat_ex_from_stat (struct stat_ex *dst, const struct stat *src, bool fake_dir_create_times) diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c index c9ee5414f03..6dae8a5f9e8 100644 --- a/source3/modules/vfs_ceph.c +++ b/source3/modules/vfs_ceph.c @@ -1569,6 +1569,29 @@ static const char *cephwrap_connectpath( return handle->conn->connectpath; } +static NTSTATUS cephwrap_fget_dos_attributes(struct vfs_handle_struct *handle, +struct files_struct *fsp, +uint32_t *dosmode) +{ + struct timespec saved_btime = fsp->fsp_name->st.st_ex_btime; + NTSTATUS status; + + status = fget_ea_dos_attribute(fsp, dosmode); + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + /* +* Restore previously stored btime from statx timestamps as it should be +* the only source of truth. create_time from dos attribute, if any, may +* have older values which isn't trustworthy to be looked at for other +* open file handle operations. +*/ + fsp->fsp_na
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via a48f8ae3077 docs-xml: Build and install man page for wspsearch from 145194071b1 python:gp: Fix logging with gp https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit a48f8ae30775bb2dc07768c3df88968800f51470 Author: Anoop C S Date: Tue Jan 30 14:33:07 2024 +0530 docs-xml: Build and install man page for wspsearch Commit 49b6137f7c2244aeb3cf9b65fc9d46fcf0b8dc55 switched the default to install `wspsearch` client from False to True but missed to build and install the corresponding man page. Therefore adding wspsearch.1 to the list of man pages to be built and installed by default. Signed-off-by: Anoop C S Reviewed-by: Andreas Schneider Autobuild-User(master): Anoop C S Autobuild-Date(master): Tue Jan 30 14:38:58 UTC 2024 on atb-devel-224 --- Summary of changes: docs-xml/wscript_build | 1 + 1 file changed, 1 insertion(+) Changeset truncated at 500 lines: diff --git a/docs-xml/wscript_build b/docs-xml/wscript_build index 95ed08ed1d8..434afacaf1e 100644 --- a/docs-xml/wscript_build +++ b/docs-xml/wscript_build @@ -54,6 +54,7 @@ manpages=''' manpages/wbinfo.1 manpages/winbindd.8 manpages/samba-log-parser.1 + manpages/wspsearch.1 ''' pam_winbind_manpages = ''' -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 45962d416f4 source3/lib: Properly log the change in capability from 201edcb5c61 winbindd: fix listing trusted domains with NT trusts https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 45962d416f41fd88a2e35be7d3225dc0a3b298a9 Author: Anoop C S Date: Fri Jan 19 16:20:36 2024 +0530 source3/lib: Properly log the change in capability We used to log the following message for both adding and dropping capability: DBG_INFO("added capability %d\n", capability); For better clarity indicate the change as "added" or "dropped" based on available functional arguments. Signed-off-by: Anoop C S Reviewed-by: Christof Schmitt Autobuild-User(master): Anoop C S Autobuild-Date(master): Sat Jan 20 18:43:10 UTC 2024 on atb-devel-224 --- Summary of changes: source3/lib/system.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/system.c b/source3/lib/system.c index 18dc6989372..1ec0ae9b1d5 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -628,12 +628,14 @@ static bool set_process_capability(enum smbd_capability capability, cap_set_flag(cap, CAP_INHERITABLE, num_cap_vals, cap_vals, CAP_CLEAR); if (cap_set_proc(cap) == -1) { - DBG_ERR("adding capability %d: cap_set_proc failed: %s\n", + DBG_ERR("%s capability %d: cap_set_proc failed: %s\n", + enable ? "adding" : "dropping", capability, strerror(errno)); cap_free(cap); return False; } - DBG_INFO("added capability %d\n", capability); + DBG_INFO("%s capability %d\n", +enable ? "added" : "dropped", capability); cap_free(cap); return True; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 19105f51d03 vfs_ceph: Fix some uninitialized structs and pointers from 88174f48d2e vfs_fruit: ignore ENAMETOOLONG in fruit_unlink_rsrc_adouble() https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 19105f51d03f63239165839ec941d9f3947fe501 Author: Anoop C S Date: Fri Nov 17 12:16:25 2023 +0530 vfs_ceph: Fix some uninitialized structs and pointers Signed-off-by: Anoop C S Reviewed-by: Volker Lendecke Autobuild-User(master): Anoop C S Autobuild-Date(master): Fri Nov 17 18:04:43 UTC 2023 on atb-devel-224 --- Summary of changes: source3/modules/vfs_ceph.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c index aa68b5573c8..6d252d20425 100644 --- a/source3/modules/vfs_ceph.c +++ b/source3/modules/vfs_ceph.c @@ -327,7 +327,7 @@ static uint64_t cephwrap_disk_free(struct vfs_handle_struct *handle, uint64_t *dfree, uint64_t *dsize) { - struct statvfs statvfs_buf; + struct statvfs statvfs_buf = { 0 }; int ret; if (!(ret = ceph_statfs(handle->data, smb_fname->base_name, @@ -395,7 +395,7 @@ static int cephwrap_statvfs(struct vfs_handle_struct *handle, const struct smb_filename *smb_fname, struct vfs_statvfs_struct *statbuf) { - struct statvfs statvfs_buf; + struct statvfs statvfs_buf = { 0 }; int ret; ret = ceph_statfs(handle->data, smb_fname->base_name, _buf); @@ -436,7 +436,7 @@ static DIR *cephwrap_fdopendir(struct vfs_handle_struct *handle, uint32_t attributes) { int ret = 0; - struct ceph_dir_result *result; + struct ceph_dir_result *result = NULL; DBG_DEBUG("[CEPH] fdopendir(%p, %p)\n", handle, fsp); ret = ceph_opendir(handle->data, fsp->fsp_name->base_name, ); @@ -453,7 +453,7 @@ static struct dirent *cephwrap_readdir(struct vfs_handle_struct *handle, struct files_struct *dirfsp, DIR *dirp) { - struct dirent *result; + struct dirent *result = NULL; DBG_DEBUG("[CEPH] readdir(%p, %p)\n", handle, dirp); result = ceph_readdir(handle->data, (struct ceph_dir_result *) dirp); @@ -872,7 +872,7 @@ static int cephwrap_stat(struct vfs_handle_struct *handle, struct smb_filename *smb_fname) { int result = -1; - struct ceph_statx stx; + struct ceph_statx stx = { 0 }; DBG_DEBUG("[CEPH] stat(%p, %s)\n", handle, smb_fname_str_dbg(smb_fname)); @@ -896,7 +896,7 @@ static int cephwrap_stat(struct vfs_handle_struct *handle, static int cephwrap_fstat(struct vfs_handle_struct *handle, files_struct *fsp, SMB_STRUCT_STAT *sbuf) { int result = -1; - struct ceph_statx stx; + struct ceph_statx stx = { 0 }; int fd = fsp_get_pathref_fd(fsp); DBG_DEBUG("[CEPH] fstat(%p, %d)\n", handle, fd); @@ -916,7 +916,7 @@ static int cephwrap_lstat(struct vfs_handle_struct *handle, struct smb_filename *smb_fname) { int result = -1; - struct ceph_statx stx; + struct ceph_statx stx = { 0 }; DBG_DEBUG("[CEPH] lstat(%p, %s)\n", handle, smb_fname_str_dbg(smb_fname)); @@ -1606,7 +1606,7 @@ static NTSTATUS cephwrap_read_dfs_pathat(struct vfs_handle_struct *handle, #else char link_target_buf[7]; #endif - struct ceph_statx stx; + struct ceph_statx stx = { 0 }; struct smb_filename *full_fname = NULL; int ret; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 62ea6ae8c9d doc/vfs_ceph: document ceph:filesystem parameter via 5e49d4b4311 doc/vfs_ceph: update confusing default hint for ceph:user_id param via 98388e2bf0d vfs_ceph: add support to select ceph file system via e936e4d786a vfs_ceph: cache ceph mounts based on share configuration params via df073c7eedc vfs_ceph: split ceph mount logic into a new function from 5cb8805811e python: fix mutable default arguments https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 62ea6ae8c9d3341cb65185124225b55a4175e7ae Author: John Mulligan Date: Wed Feb 15 16:09:48 2023 -0500 doc/vfs_ceph: document ceph:filesystem parameter Document how the `ceph:filesystem` parameter allows one to select the cephfs file system to use for the share. Signed-off-by: John Mulligan Reviewed-by: Guenther Deschner Reviewed-by: Anoop C S Autobuild-User(master): Anoop C S Autobuild-Date(master): Fri Feb 24 05:37:57 UTC 2023 on atb-devel-224 commit 5e49d4b4311e9a7059bffd52152a6464d7da49e4 Author: John Mulligan Date: Wed Feb 15 16:04:07 2023 -0500 doc/vfs_ceph: update confusing default hint for ceph:user_id param Previously, the manpage hinted that the `ceph:user_id` parameter derived a default value from the process id. This implies that it referring to the PID but this is not what libcephfs actually does. Rather, this param is used to derive the `client.` authorization name ceph uses. This mistake probably originates in a comment in the libcephfs header. When I first started using the vfs_ceph module this confused me as I didn't know what to use to get access to my cluster. Eventually, after reading both docs and code I found that it does not use the pid but defaults to a value in the ceph client library (typically "admin"). Therefore, if you are using commands like `ceph fs authorize x client.foo` or `ceph auth get client.bar` to authorize a client you would supply smb.conf with `ceph:user_id = foo` or `ceph:user_id = bar` respectively. These entries then need corresponding entries in your ceph keyring file. Signed-off-by: John Mulligan Reviewed-by: Guenther Deschner Reviewed-by: Anoop C S commit 98388e2bf0d35405c974fa7d9671a36e055ed9a6 Author: John Mulligan Date: Wed Feb 15 15:21:43 2023 -0500 vfs_ceph: add support to select ceph file system Add a config parameter `ceph:filesystem` that will be passed to ceph_select_filesystem when provided. This allows shares on a single smbd to access multiple different cephfs file systems. The ceph_select_filesystem call was added as part of ceph 'nautilus' (v14), released on 2019-03-19 and EOLed on 2021-06-30. Since ceph 'pacific' (v16) multiple file system support is stable and ready to use. At the time of this commit, 'pacific' is the oldest actively supported version of ceph upstream. Since samba tests building on ubntu 18.04, which has ceph packages older than v14, a waf check for the function is added to test for the presence of ceph_select_filesystem and disable its use on these very old platforms. Signed-off-by: John Mulligan Reviewed-by: Guenther Deschner Reviewed-by: Anoop C S commit e936e4d786aeb76a8be82d82690c868f67f48d9e Author: John Mulligan Date: Wed Feb 15 15:12:12 2023 -0500 vfs_ceph: cache ceph mounts based on share configuration params Previously, the vfs_ceph module kept one global cached mount. This makes it impossible to support multiple ceph clusters or file systems. Add a mount cache in a similar fashion to the connection cache found in the vfs_glusterfs module. The vfs_ceph cache uses a single "cookie" value, a unique string based on config params, to ID the cache entry. Shares that produce the same cookie will share cephfs mount objects and increment a counter when multiple shares are using the same cache entry. Signed-off-by: John Mulligan Reviewed-by: Guenther Deschner Reviewed-by: Anoop C S commit df073c7eedc61fe1c95b2e26a18915b2a0c77552 Author: John Mulligan Date: Wed Feb 15 14:22:00 2023 -0500 vfs_ceph: split ceph mount logic into a new function This new function is entirely dedicated to just setting up a libcephfs mount. Handling the cmount global and samba connection params remains in cephwrap_connect. This change will later be used to avoid a single global cached connection and add improved connection handling. Signed-off-by: John Mulligan Reviewed-by: Guenther Deschner Reviewed-by: Anoop C S --- Summary of changes: docs-xml/manpages/vfs_ceph.8.xml | 19
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 00c2425c2c1 s3/rpc_server: Remove duplicate dependency listing for RPC_SERVICE from 36325f1ee90 python:tests: Don't require an emtpy 'authorization-data' to be present https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 00c2425c2c10c324868f0c5e7283da7714c009eb Author: Anoop C S Date: Fri Dec 17 15:41:25 2021 +0530 s3/rpc_server: Remove duplicate dependency listing for RPC_SERVICE Signed-off-by: Anoop C S Reviewed-by: Volker Lendecke Autobuild-User(master): Anoop C S Autobuild-Date(master): Mon Dec 20 10:14:53 UTC 2021 on sn-devel-184 --- Summary of changes: source3/rpc_server/wscript_build | 1 - 1 file changed, 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source3/rpc_server/wscript_build b/source3/rpc_server/wscript_build index db5e3763311..04ff3424d47 100644 --- a/source3/rpc_server/wscript_build +++ b/source3/rpc_server/wscript_build @@ -278,7 +278,6 @@ bld.SAMBA3_SUBSYSTEM('RPC_SERVICE', RPC_IREMOTEWINSPOOL RPC_EVENTLOG RPC_RPCECHO -RPC_SERVER RPC_EPMAPPER RPC_FSS_AGENT ''') -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 39ce7332109 s3: smbd: Add call to conn_setup_case_options() to create_conn_struct_as_root(). via ab7700177c2 s3: smbd: Factor out setting up case parameters for a share to a function - conn_setup_case_options(). from 081afc495f5 WHATSNEW: Change order. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 39ce73321093a0a5e25f574d0d32d7f88892de46 Author: Jeremy Allison Date: Tue Jan 12 11:44:44 2021 -0800 s3: smbd: Add call to conn_setup_case_options() to create_conn_struct_as_root(). Ensures temporary DFS share doesn't leave the case parameters set as zero (i.e.: conn->case sensitive = 0 conn->share_case_preserve = 0 and default case is lower which can cause problems doing a DFS_GET_REFERRALS request). BUG: https://bugzilla.samba.org/show_bug.cgi?id=14612 Signed-off-by: Jeremy Allison Reviewed-by: Anoop C S Autobuild-User(master): Anoop C S Autobuild-Date(master): Wed Jan 13 18:14:31 UTC 2021 on sn-devel-184 commit ab7700177c2badbf8ed649985be8029223b6e946 Author: Jeremy Allison Date: Tue Jan 12 11:39:51 2021 -0800 s3: smbd: Factor out setting up case parameters for a share to a function - conn_setup_case_options(). Will allow it to be reused in the msdfs temporary share code. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14612 Signed-off-by: Jeremy Allison Reviewed-by: Anoop C S --- Summary of changes: source3/smbd/conn.c| 19 +++ source3/smbd/msdfs.c | 2 ++ source3/smbd/proto.h | 1 + source3/smbd/service.c | 11 +-- 4 files changed, 23 insertions(+), 10 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/conn.c b/source3/smbd/conn.c index 003926c97f6..044242d5697 100644 --- a/source3/smbd/conn.c +++ b/source3/smbd/conn.c @@ -232,3 +232,22 @@ void conn_free(connection_struct *conn) conn_free_internal(conn); } + +/* + * Correctly initialize a share with case options. + */ +void conn_setup_case_options(connection_struct *conn) +{ + int snum = conn->params->service; + + if (lp_case_sensitive(snum) == Auto) { + /* We will be setting this per packet. Set to be case + * insensitive for now. */ + conn->case_sensitive = false; + } else { + conn->case_sensitive = (bool)lp_case_sensitive(snum); + } + + conn->case_preserve = lp_preserve_case(snum); + conn->short_case_preserve = lp_short_preserve_case(snum); +} diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c index 7b5ea251501..dc07727f007 100644 --- a/source3/smbd/msdfs.c +++ b/source3/smbd/msdfs.c @@ -317,6 +317,8 @@ static NTSTATUS create_conn_struct_as_root(TALLOC_CTX *ctx, vfs_user = get_current_username(); } + conn_setup_case_options(conn); + set_conn_connectpath(conn, connpath); /* diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 7d6f8eda607..879ec71ae94 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -156,6 +156,7 @@ connection_struct *conn_new(struct smbd_server_connection *sconn); bool conn_idle_all(struct smbd_server_connection *sconn, time_t t); void conn_clear_vuid_caches(struct smbd_server_connection *sconn, uint64_t vuid); void conn_free(connection_struct *conn); +void conn_setup_case_options(connection_struct *conn); void conn_force_tdis( struct smbd_server_connection *sconn, bool (*check_fn)(struct connection_struct *conn, diff --git a/source3/smbd/service.c b/source3/smbd/service.c index b1ea0ea6a88..afdea38b016 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -557,16 +557,7 @@ static NTSTATUS make_connection_snum(struct smbXsrv_connection *xconn, ( lp_enable_asu_support() && strequal(dev,"ADMIN$")) ); /* Case options for the share. */ - if (lp_case_sensitive(snum) == Auto) { - /* We will be setting this per packet. Set to be case -* insensitive for now. */ - conn->case_sensitive = False; - } else { - conn->case_sensitive = (bool)lp_case_sensitive(snum); - } - - conn->case_preserve = lp_preserve_case(snum); - conn->short_case_preserve = lp_short_preserve_case(snum); + conn_setup_case_options(conn); conn->encrypt_level = lp_server_smb_encrypt(snum); if (conn->encrypt_level > SMB_ENCRYPTION_OFF) { -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via a89efdfe823 libgpo: only install group policy admx files when building as DC from d93a6d2663a util: fix build on AIX by fixing the order of replace.h include https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit a89efdfe82307b3306bffddb8fa419f96ee86810 Author: Günther Deschner Date: Fri Jun 26 10:35:13 2020 +0200 libgpo: only install group policy admx files when building as DC Guenther Signed-off-by: Guenther Deschner Reviewed-by: David Mulder Reviewed-by: Anoop C S Autobuild-User(master): Anoop C S Autobuild-Date(master): Tue Jun 30 07:51:48 UTC 2020 on sn-devel-184 --- Summary of changes: libgpo/wscript_build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/libgpo/wscript_build b/libgpo/wscript_build index e6e54fe359a..cb0a40a008c 100644 --- a/libgpo/wscript_build +++ b/libgpo/wscript_build @@ -20,4 +20,5 @@ bld.SAMBA3_PYTHON('python_samba_libgpo', 'pygpo.c', deps='%s gpext talloc ads TOKEN_UTIL auth %s' % (pyparam_util, pyrpc_util), realname='samba/gpo.so') -bld.RECURSE('admx') +if bld.AD_DC_BUILD_IS_ENABLED(): +bld.RECURSE('admx') -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via c5bb40ec8c6 vfs_shadow_copy2: Fix a log message via f0904a2fba6 vfs_shadow_copy: Fix a log message from 27709178e02 python: Fix get_max_worker_count() to always have two runners https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit c5bb40ec8c6124d9dab5b0a09ef782f88208bceb Author: Anoop C S Date: Sat Jun 20 17:14:40 2020 +0530 vfs_shadow_copy2: Fix a log message Signed-off-by: Anoop C S Reviewed-by: Ralph Boehme Autobuild-User(master): Anoop C S Autobuild-Date(master): Sun Jun 21 16:20:26 UTC 2020 on sn-devel-184 commit f0904a2fba63a96194260ab93da9f24a16410a8e Author: Anoop C S Date: Sat Jun 20 17:13:49 2020 +0530 vfs_shadow_copy: Fix a log message Signed-off-by: Anoop C S Reviewed-by: Ralph Boehme --- Summary of changes: source3/modules/vfs_shadow_copy.c | 3 +-- source3/modules/vfs_shadow_copy2.c | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_shadow_copy.c b/source3/modules/vfs_shadow_copy.c index c4af04f1ec8..31333dc2239 100644 --- a/source3/modules/vfs_shadow_copy.c +++ b/source3/modules/vfs_shadow_copy.c @@ -192,8 +192,7 @@ static int shadow_copy_get_shadow_copy_data(vfs_handle_struct *handle, dir_hnd = OpenDir(talloc_tos(), handle->conn, smb_fname, NULL, 0); TALLOC_FREE(smb_fname); if (dir_hnd == NULL) { - DBG_ERR("SMB_VFS_NEXT_OPENDIR() failed for [%s]\n", - fsp->conn->connectpath); + DBG_ERR("OpenDir() failed for [%s]\n", fsp->conn->connectpath); return -1; } diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c index 6a1e560988e..3be93f985dd 100644 --- a/source3/modules/vfs_shadow_copy2.c +++ b/source3/modules/vfs_shadow_copy2.c @@ -2016,8 +2016,8 @@ static int shadow_copy2_get_shadow_copy_data( p = SMB_VFS_NEXT_FDOPENDIR(handle, dirfsp, NULL, 0); if (!p) { - DEBUG(2,("shadow_copy2: SMB_VFS_NEXT_OPENDIR() failed for '%s'" -" - %s\n", snapdir, strerror(errno))); + DBG_NOTICE("shadow_copy2: SMB_VFS_NEXT_FDOPENDIR() failed for '%s'" + " - %s\n", snapdir, strerror(errno)); errno = ENOSYS; goto done; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 5f957449245 vfs_glusterfs: Enable caching of selinux xattr by default from 0a2fae2d479 s3:lib: Make sure that have_rsrc is initialized https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 5f95744924559c866e3624b6825b57df8c90ac37 Author: Anoop C S Date: Sun May 31 22:30:53 2020 +0530 vfs_glusterfs: Enable caching of selinux xattr by default Signed-off-by: Anoop C S Reviewed-by: Guenther Deschner Autobuild-User(master): Anoop C S Autobuild-Date(master): Wed Jun 17 08:23:33 UTC 2020 on sn-devel-184 --- Summary of changes: source3/modules/vfs_glusterfs.c | 6 ++ 1 file changed, 6 insertions(+) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c index ff5382af9fb..bf7244ea3a5 100644 --- a/source3/modules/vfs_glusterfs.c +++ b/source3/modules/vfs_glusterfs.c @@ -333,6 +333,12 @@ static int vfs_gluster_connect(struct vfs_handle_struct *handle, goto done; } + ret = glfs_set_xlator_option(fs, "*-md-cache", "cache-selinux", +"true"); + if (ret < 0) { + DEBUG(0, ("%s: Failed to set xlator options\n", volume)); + goto done; + } ret = glfs_set_xlator_option(fs, "*-snapview-client", "snapdir-entry-path", -- Samba Shared Repository