The branch, master has been updated via 70be41c s3:onefs: remove all onefs related code as it not maintained anymore from bfe4a2b Fix the overwriting of errno before use in a DEBUG statement and use the return value from store_acl_blob_fsp rather than ignoring it.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 70be41c772d69d36ea8f434187be8bfd6b5f38a0 Author: Stefan Metzmacher <me...@samba.org> Date: Wed May 16 09:26:12 2012 +0200 s3:onefs: remove all onefs related code as it not maintained anymore See https://lists.samba.org/archive/samba-technical/2012-May/083631.html for the discussion. metze Autobuild-User: Stefan Metzmacher <me...@samba.org> Autobuild-Date: Wed May 16 11:23:05 CEST 2012 on sn-devel-104 ----------------------------------------------------------------------- Summary of changes: source3/Makefile.in | 20 +- source3/configure.in | 24 - source3/include/oplock_onefs.h | 50 - source3/modules/onefs.h | 185 --- source3/modules/onefs_acl.c | 979 -------------- source3/modules/onefs_cbrl.c | 593 --------- source3/modules/onefs_config.c | 278 ---- source3/modules/onefs_config.h | 160 --- source3/modules/onefs_dir.c | 622 --------- source3/modules/onefs_notify.c | 682 ---------- source3/modules/onefs_open.c | 2200 ------------------------------- source3/modules/onefs_shadow_copy.c | 783 ----------- source3/modules/onefs_shadow_copy.h | 32 - source3/modules/onefs_streams.c | 771 ----------- source3/modules/onefs_system.c | 782 ----------- source3/modules/perfcount_onefs.c | 481 ------- source3/modules/vfs_onefs.c | 299 ----- source3/modules/vfs_onefs_shadow_copy.c | 685 ---------- source3/modules/wscript_build | 28 - source3/smbd/oplock.c | 3 - source3/smbd/oplock_onefs.c | 733 ---------- source3/smbd/proto.h | 4 - source3/wscript_build | 3 +- 23 files changed, 2 insertions(+), 10395 deletions(-) delete mode 100644 source3/include/oplock_onefs.h delete mode 100644 source3/modules/onefs.h delete mode 100644 source3/modules/onefs_acl.c delete mode 100644 source3/modules/onefs_cbrl.c delete mode 100644 source3/modules/onefs_config.c delete mode 100644 source3/modules/onefs_config.h delete mode 100644 source3/modules/onefs_dir.c delete mode 100644 source3/modules/onefs_notify.c delete mode 100644 source3/modules/onefs_open.c delete mode 100644 source3/modules/onefs_shadow_copy.c delete mode 100644 source3/modules/onefs_shadow_copy.h delete mode 100644 source3/modules/onefs_streams.c delete mode 100644 source3/modules/onefs_system.c delete mode 100644 source3/modules/perfcount_onefs.c delete mode 100644 source3/modules/vfs_onefs.c delete mode 100644 source3/modules/vfs_onefs_shadow_copy.c delete mode 100644 source3/smbd/oplock_onefs.c Changeset truncated at 500 lines: diff --git a/source3/Makefile.in b/source3/Makefile.in index dce7f77..486ec72 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -833,8 +833,7 @@ PROFILES_OBJ = utils/profiles.o \ $(POPT_LIB_OBJ) \ $(REGFIO_OBJ) -OPLOCK_OBJ = smbd/oplock.o smbd/oplock_irix.o smbd/oplock_linux.o \ - smbd/oplock_onefs.o +OPLOCK_OBJ = smbd/oplock.o smbd/oplock_irix.o smbd/oplock_linux.o NOTIFY_OBJ = smbd/notify.o smbd/notify_inotify.o smbd/notify_internal.o \ librpc/gen_ndr/ndr_notify.o @@ -884,11 +883,6 @@ VFS_SYNCOPS_OBJ = modules/vfs_syncops.o VFS_ACL_XATTR_OBJ = modules/vfs_acl_xattr.o VFS_ACL_TDB_OBJ = modules/vfs_acl_tdb.o VFS_SMB_TRAFFIC_ANALYZER_OBJ = modules/vfs_smb_traffic_analyzer.o -VFS_ONEFS_OBJ = modules/vfs_onefs.o modules/onefs_acl.o modules/onefs_system.o \ - modules/onefs_open.o modules/onefs_streams.o modules/onefs_dir.o \ - modules/onefs_cbrl.o modules/onefs_notify.o modules/onefs_config.o -VFS_ONEFS_SHADOW_COPY_OBJ = modules/vfs_onefs_shadow_copy.o modules/onefs_shadow_copy.o -PERFCOUNT_ONEFS_OBJ = modules/perfcount_onefs.o PERFCOUNT_TEST_OBJ = modules/perfcount_test.o VFS_DIRSORT_OBJ = modules/vfs_dirsort.o VFS_SCANNEDONLY_OBJ = modules/vfs_scannedonly.o @@ -3099,18 +3093,6 @@ bin/acl_tdb.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_ACL_TDB_OBJ) @echo "Building plugin $@" @$(SHLD_MODULE) $(VFS_ACL_TDB_OBJ) -bin/onefs.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_ONEFS_OBJ) - @echo "Building plugin $@" - @$(SHLD_MODULE) $(VFS_ONEFS_OBJ) @ONEFS_LIBS@ - -bin/onefs_shadow_copy.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_ONEFS_SHADOW_COPY_OBJ) - @echo "Building plugin $@" - @$(SHLD_MODULE) $(VFS_ONEFS_SHADOW_COPY_OBJ) - -bin/pc_onefs.@SHLIBEXT@: $(BINARY_PREREQS) $(PERFCOUNT_ONEFS_OBJ) - @echo "Building plugin $@" - @$(SHLD_MODULE) $(PERFCOUNT_ONEFS_OBJ) - bin/pc_test.@SHLIBEXT@: $(BINARY_PREREQS) $(PERFCOUNT_TEST_OBJ) @echo "Building plugin $@" @$(SHLD_MODULE) $(PERFCOUNT_TEST_OBJ) diff --git a/source3/configure.in b/source3/configure.in index 2794990..43a090d 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -1005,27 +1005,6 @@ if test x"$ac_cv_header_gpfs_gpl_h" = x"yes"; then default_shared_modules="$default_shared_modules vfs_gpfs_hsm_notify" fi -############################################# -# check if building on Isilon OneFS -printf "%s" "checking for Isilon OneFS... " -save_LIBS="$LIBS" -LIBS="$LIBS -lisi_version" -AC_TRY_LINK([#include <isi_version/isi_version.h>], - [get_isilon_copyright()], - samba_cv_HAVE_ONEFS=yes, - samba_cv_HAVE_ONEFS=no) -echo $samba_cv_HAVE_ONEFS -if test x"$samba_cv_HAVE_ONEFS" = x"yes"; then - AC_DEFINE(HAVE_ONEFS,1,[Whether building on Isilon OneFS]) - default_shared_modules="$default_shared_modules vfs_onefs vfs_onefs_shadow_copy perfcount_onefs" - default_static_modules="$default_static_modules" - ONEFS_LIBS="-lisi_acl -lisi_ecs -lisi_event -lisi_util" - # Need to also add general libs for oplocks support - save_LIBS="$save_LIBS -lisi_ecs -lisi_event -lisi_util -ldevstat" -fi -AC_SUBST(ONEFS_LIBS) -LIBS="$save_LIBS" - # Note that all the libunwind symbols in the API are defined to internal # platform-specific version, so we must include libunwind.h before checking # any of them. @@ -6544,8 +6523,6 @@ SMB_MODULE(vfs_notify_fam, \$(VFS_NOTIFY_FAM_OBJ), "bin/notify_fam.$SHLIBEXT", V SMB_MODULE(vfs_acl_xattr, \$(VFS_ACL_XATTR_OBJ), "bin/acl_xattr.$SHLIBEXT", VFS) SMB_MODULE(vfs_acl_tdb, \$(VFS_ACL_TDB_OBJ), "bin/acl_tdb.$SHLIBEXT", VFS) SMB_MODULE(vfs_smb_traffic_analyzer, \$(VFS_SMB_TRAFFIC_ANALYZER_OBJ), "bin/smb_traffic_analyzer.$SHLIBEXT", VFS) -SMB_MODULE(vfs_onefs, \$(VFS_ONEFS), "bin/onefs.$SHLIBEXT", VFS) -SMB_MODULE(vfs_onefs_shadow_copy, \$(VFS_ONEFS_SHADOW_COPY), "bin/onefs_shadow_copy.$SHLIBEXT", VFS) SMB_MODULE(vfs_dirsort, \$(VFS_DIRSORT_OBJ), "bin/dirsort.$SHLIBEXT", VFS) SMB_MODULE(vfs_scannedonly, \$(VFS_SCANNEDONLY_OBJ), "bin/scannedonly.$SHLIBEXT", VFS) SMB_MODULE(vfs_crossrename, \$(VFS_CROSSRENAME_OBJ), "bin/crossrename.$SHLIBEXT", VFS) @@ -6554,7 +6531,6 @@ SMB_MODULE(vfs_time_audit, \$(VFS_TIME_AUDIT_OBJ), "bin/time_audit.$SHLIBEXT", V SMB_SUBSYSTEM(VFS,smbd/vfs.o) -SMB_MODULE(perfcount_onefs, \$(PERFCOUNT_ONEFS), "bin/pc_onefs.$SHLIBEXT", PERFCOUNT) SMB_MODULE(perfcount_test, \$(PERFCOUNT_TEST), "bin/pc_test.$SHLIBEXT", PERFCOUNT) SMB_SUBSYSTEM(PERFCOUNT,smbd/perfcount.o) diff --git a/source3/include/oplock_onefs.h b/source3/include/oplock_onefs.h deleted file mode 100644 index a20becd..0000000 --- a/source3/include/oplock_onefs.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Unix SMB/CIFS implementation. - * Support for OneFS kernel oplocks - * - * Copyright (C) Tim Prouty, 2009 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see <http://www.gnu.org/licenses/>. - */ - -#ifndef _OPLOCK_ONEFS_H -#define _OPLOCK_ONEFS_H - -#if HAVE_ONEFS - -#include <sys/isi_oplock.h> - -struct deferred_open_record { - bool delayed_for_oplocks; - bool failed; /* added for onefs_oplocks */ - struct file_id id; -}; - -/* - * OneFS oplock utility functions - */ -const char *onefs_oplock_str(enum oplock_type onefs_oplock_type); -int onefs_oplock_to_samba_oplock(enum oplock_type onefs_oplock); -enum oplock_type onefs_samba_oplock_to_oplock(int samba_oplock_type); - -/* - * OneFS oplock callback tracking - */ -void destroy_onefs_callback_record(uint64 id); -uint64 onefs_oplock_wait_record(uint16 mid); -void onefs_set_oplock_callback(uint64 id, files_struct *fsp); - -#endif /* HAVE_ONEFS */ - -#endif /* _OPLOCK_ONEFS_H */ diff --git a/source3/modules/onefs.h b/source3/modules/onefs.h deleted file mode 100644 index b12a67e..0000000 --- a/source3/modules/onefs.h +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Unix SMB/CIFS implementation. - * Support for OneFS - * - * Copyright (C) Steven Danneman, 2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see <http://www.gnu.org/licenses/>. - */ - -#ifndef _ONEFS_H -#define _ONEFS_H - -/* - * vfs interface handlers - */ -DIR *onefs_opendir(struct vfs_handle_struct *handle, - const char *fname, const char *mask, - uint32 attributes); - -struct dirent *onefs_readdir(struct vfs_handle_struct *handle, - DIR *dirp, SMB_STRUCT_STAT *sbuf); - -void onefs_seekdir(struct vfs_handle_struct *handle, DIR *dirp, - long offset); - -long onefs_telldir(struct vfs_handle_struct *handle, DIR *dirp); - -void onefs_rewinddir(struct vfs_handle_struct *handle, DIR *dirp); - -int onefs_closedir(struct vfs_handle_struct *handle, DIR *dir); - -void onefs_init_search_op(struct vfs_handle_struct *handle, - DIR *dirp); - -NTSTATUS onefs_create_file(vfs_handle_struct *handle, - struct smb_request *req, - uint16_t root_dir_fid, - struct smb_filename *smb_fname, - uint32_t access_mask, - uint32_t share_access, - uint32_t create_disposition, - uint32_t create_options, - uint32_t file_attributes, - uint32_t oplock_request, - uint64_t allocation_size, - struct security_descriptor *sd, - struct ea_list *ea_list, - files_struct **result, - int *pinfo); - -int onefs_close(vfs_handle_struct *handle, struct files_struct *fsp); - -int onefs_rename(vfs_handle_struct *handle, - const struct smb_filename *smb_fname_src, - const struct smb_filename *smb_fname_dst); - -int onefs_stat(vfs_handle_struct *handle, struct smb_filename *smb_fname); - -int onefs_fstat(vfs_handle_struct *handle, struct files_struct *fsp, - SMB_STRUCT_STAT *sbuf); - -int onefs_lstat(vfs_handle_struct *handle, struct smb_filename *smb_fname); - -int onefs_unlink(vfs_handle_struct *handle, - const struct smb_filename *smb_fname); - -NTSTATUS onefs_streaminfo(vfs_handle_struct *handle, - struct files_struct *fsp, - const char *fname, - TALLOC_CTX *mem_ctx, - unsigned int *num_streams, - struct stream_struct **streams); - -int onefs_vtimes_streams(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - int flags, struct timespec times[3]); - -NTSTATUS onefs_brl_lock_windows(vfs_handle_struct *handle, - struct byte_range_lock *br_lck, - struct lock_struct *plock, - bool blocking_lock, - struct blocking_lock_record *blr); - -bool onefs_brl_unlock_windows(vfs_handle_struct *handle, - struct messaging_context *msg_ctx, - struct byte_range_lock *br_lck, - const struct lock_struct *plock); - -bool onefs_brl_cancel_windows(vfs_handle_struct *handle, - struct byte_range_lock *br_lck, - struct lock_struct *plock, - struct blocking_lock_record *blr); - -bool onefs_strict_lock(vfs_handle_struct *handle, - files_struct *fsp, - struct lock_struct *plock); - -void onefs_strict_unlock(vfs_handle_struct *handle, - files_struct *fsp, - struct lock_struct *plock); - -NTSTATUS onefs_notify_watch(vfs_handle_struct *vfs_handle, - struct sys_notify_context *ctx, - struct notify_entry *e, - void (*callback)(struct sys_notify_context *ctx, - void *private_data, - struct notify_event *ev), - void *private_data, - void *handle_p); - -NTSTATUS onefs_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp, - uint32 security_info, struct security_descriptor **ppdesc); - -NTSTATUS onefs_get_nt_acl(vfs_handle_struct *handle, const char* name, - uint32 security_info, struct security_descriptor **ppdesc); - -NTSTATUS onefs_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp, - uint32 security_info_sent, - const struct security_descriptor *psd); - -/* - * Utility functions - */ -struct ifs_security_descriptor; -NTSTATUS onefs_samba_sd_to_sd(uint32_t security_info_sent, - const struct security_descriptor *psd, - struct ifs_security_descriptor *sd, int snum, - uint32_t *security_info_effective); - -NTSTATUS onefs_stream_prep_smb_fname(TALLOC_CTX *ctx, - const struct smb_filename *smb_fname_in, - struct smb_filename **smb_fname_out); - -int onefs_rdp_add_dir_state(connection_struct *conn, DIR *dirp); - -/* - * System Interfaces - */ -int onefs_sys_create_file(connection_struct *conn, - int base_fd, - const char *path, - uint32_t access_mask, - uint32_t open_access_mask, - uint32_t share_access, - uint32_t create_options, - int flags, - mode_t mode, - int oplock_request, - uint64_t id, - struct security_descriptor *sd, - uint32_t ntfs_flags, - int *granted_oplock); - -ssize_t onefs_sys_sendfile(connection_struct *conn, int tofd, int fromfd, - const DATA_BLOB *header, off_t offset, - size_t count); - -ssize_t onefs_sys_recvfile(int fromfd, int tofd, off_t offset, - size_t count); - -void init_stat_ex_from_onefs_stat(struct stat_ex *dst, const struct stat *src); - -int onefs_sys_stat(const char *fname, SMB_STRUCT_STAT *sbuf); - -int onefs_sys_fstat(int fd, SMB_STRUCT_STAT *sbuf); - -int onefs_sys_fstat_at(int base_fd, const char *fname, SMB_STRUCT_STAT *sbuf, - int flags); - -int onefs_sys_lstat(const char *fname, SMB_STRUCT_STAT *sbuf); - - - -#endif /* _ONEFS_H */ diff --git a/source3/modules/onefs_acl.c b/source3/modules/onefs_acl.c deleted file mode 100644 index 749ddec..0000000 --- a/source3/modules/onefs_acl.c +++ /dev/null @@ -1,979 +0,0 @@ -/* - * Unix SMB/CIFS implementation. - * - * Support for OneFS native NTFS ACLs - * - * Copyright (C) Steven Danneman, 2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see <http://www.gnu.org/licenses/>. - */ - -#include "includes.h" -#include "smbd/smbd.h" -#include "onefs.h" -#include "onefs_config.h" - -#include <isi_acl/isi_acl_util.h> -#include <ifs/ifs_syscalls.h> -#include <sys/isi_acl.h> - -const struct enum_list enum_onefs_acl_wire_format[] = { - {ACL_FORMAT_RAW, "No Format"}, - {ACL_FORMAT_WINDOWS_SD, "Format Windows SD"}, - {ACL_FORMAT_ALWAYS, "Always Format SD"}, - {-1, NULL} -}; - -/** - * Turn SID into UID/GID and setup a struct ifs_identity - */ -static bool -onefs_sid_to_identity(const struct dom_sid *sid, struct ifs_identity *id, - bool is_group) -{ - enum ifs_identity_type type = IFS_ID_TYPE_LAST+1; - uid_t uid = 0; - gid_t gid = 0; - - if (!sid || dom_sid_equal(sid, &global_sid_NULL)) - type = IFS_ID_TYPE_NULL; - else if (dom_sid_equal(sid, &global_sid_World)) - type = IFS_ID_TYPE_EVERYONE; - else if (dom_sid_equal(sid, &global_sid_Creator_Owner)) - type = IFS_ID_TYPE_CREATOR_OWNER; - else if (dom_sid_equal(sid, &global_sid_Creator_Group)) - type = IFS_ID_TYPE_CREATOR_GROUP; - else if (is_group) { - if (!sid_to_gid(sid, &gid)) - return false; - type = IFS_ID_TYPE_GID; - } else { - if (sid_to_uid(sid, &uid)) - type = IFS_ID_TYPE_UID; - else if (sid_to_gid(sid, &gid)) - type = IFS_ID_TYPE_GID; - else - return false; - } - - if (aclu_initialize_identity(id, type, uid, gid, is_group)) { - DEBUG(3, ("Call to aclu_initialize_identity failed! id=%x, " - "type=%d, uid=%u, gid=%u, is_group=%d\n", - (unsigned int)id, type, uid, gid, is_group)); - return false; - } - - return true; -} - -/** - * Turn struct ifs_identity into SID - */ -static bool -onefs_identity_to_sid(struct ifs_identity *id, struct dom_sid *sid) -{ - if (!id || !sid) - return false; - - if (id->type >= IFS_ID_TYPE_LAST) - return false; - - switch (id->type) { - case IFS_ID_TYPE_UID: - uid_to_sid(sid, id->id.uid); - break; - case IFS_ID_TYPE_GID: - gid_to_sid(sid, id->id.gid); - break; - case IFS_ID_TYPE_EVERYONE: - sid_copy(sid, &global_sid_World); - break; - case IFS_ID_TYPE_NULL: - sid_copy(sid, &global_sid_NULL); - break; - case IFS_ID_TYPE_CREATOR_OWNER: - sid_copy(sid, &global_sid_Creator_Owner); - break; - case IFS_ID_TYPE_CREATOR_GROUP: - sid_copy(sid, &global_sid_Creator_Group); - break; - default: - DEBUG(0, ("Unknown identity type: %d\n", id->type)); - return false; - } - - return true; -} - -static bool -onefs_og_to_identity(struct dom_sid *sid, struct ifs_identity * ident, - bool is_group, int snum) -{ - const struct dom_sid *b_admin_sid = &global_sid_Builtin_Administrators; - - if (!onefs_sid_to_identity(sid, ident, is_group)) { - if (!lp_parm_bool(snum, PARM_ONEFS_TYPE, - PARM_UNMAPPABLE_SIDS_IGNORE, - PARM_UNMAPPABLE_SIDS_IGNORE_DEFAULT)) { - DEBUG(3, ("Unresolvable SID (%s) found.\n", - sid_string_dbg(sid))); - return false; - } - if (!onefs_sid_to_identity(b_admin_sid, ident, is_group)) { - return false; - } - DEBUG(3, ("Mapping unresolvable owner SID (%s) to Builtin " - "Administrators group.\n", - sid_string_dbg(sid))); - } - return true; -} - -static bool -sid_in_ignore_list(struct dom_sid * sid, int snum) -{ - const char ** sid_list = NULL; - struct dom_sid match; - - sid_list = lp_parm_string_list(snum, PARM_ONEFS_TYPE, - PARM_UNMAPPABLE_SIDS_IGNORE_LIST, - PARM_UNMAPPABLE_SIDS_IGNORE_LIST_DEFAULT); - - /* Fast path a NULL list */ -- Samba Shared Repository