Skip to content
Browse files

Support for Samba 3.6 (partial; missing i386 VFS .so module)

  • Loading branch information...
1 parent 04937fd commit 3f714c886e0a0ef3ddade9ad81f1aea1ae2ef574 @gboudreau committed Nov 29, 2011
View
6 DEBIAN/Makefile
@@ -58,11 +58,13 @@ build:
ifeq ($(ARCH), amd64)
mkdir -p $(DESTDIR)usr/lib64/samba/vfs/
mkdir -p $(DESTDIR)usr/lib64/greyhole/
- install -m 0644 -D -p samba-module/bin/greyhole-x86_64.so $(DESTDIR)usr/lib64/greyhole/greyhole-samba.so
+ install -m 0644 -D -p samba-module/bin/3.4/greyhole-x86_64.so $(DESTDIR)usr/lib64/greyhole/greyhole-samba34.so
install -m 0644 -D -p samba-module/bin/3.5/greyhole-x86_64.so $(DESTDIR)usr/lib64/greyhole/greyhole-samba35.so
+ install -m 0644 -D -p samba-module/bin/3.6/greyhole-x86_64.so $(DESTDIR)usr/lib64/greyhole/greyhole-samba36.so
else
mkdir -p $(DESTDIR)usr/lib/samba/vfs/
mkdir -p $(DESTDIR)usr/lib/greyhole/
- install -m 0644 -D -p samba-module/bin/greyhole-i386.so $(DESTDIR)usr/lib/greyhole/greyhole-samba.so
+ install -m 0644 -D -p samba-module/bin/3.4/greyhole-i386.so $(DESTDIR)usr/lib/greyhole/greyhole-samba34.so
install -m 0644 -D -p samba-module/bin/3.5/greyhole-i386.so $(DESTDIR)usr/lib/greyhole/greyhole-samba35.so
+ install -m 0644 -D -p samba-module/bin/3.6/greyhole-i386.so $(DESTDIR)usr/lib/greyhole/greyhole-samba36.so
endif
View
6 DEBIAN/postinst
@@ -15,12 +15,14 @@ fi
SMB_VERSION="`smbd --version | awk '{print $2}' | awk -F'-' '{print $1}' | awk -F'.' '{print $1,$2}'`"
if [ "$SMB_VERSION" = "3 5" ]; then
ln -s ${LIBDIR}/greyhole/greyhole-samba35.so ${LIBDIR}/samba/vfs/greyhole.so
+elif [ "$SMB_VERSION" = "3 6" ]; then
+ ln -s ${LIBDIR}/greyhole/greyhole-samba36.so ${LIBDIR}/samba/vfs/greyhole.so
else
- ln -s ${LIBDIR}/greyhole/greyhole-samba.so ${LIBDIR}/samba/vfs/greyhole.so
+ ln -s ${LIBDIR}/greyhole/greyhole-samba34.so ${LIBDIR}/samba/vfs/greyhole.so
fi
# For Ubuntu 11.10, where even x86_64 install use /usr/lib
-if [ "`uname -m`" = "x86_64" ]; then
+if [ "`uname -m`" = "x86_64" -a -x /usr/lib/samba/vfs/ ]; then
ln -s ${LIBDIR}/samba/vfs/greyhole.so /usr/lib/samba/vfs/greyhole.so
fi
View
14 INSTALL
@@ -69,8 +69,13 @@ Note: Samba 3.4.3 (and 3.3.9) fix a bug that affects Greyhole functionnality.
Ubuntu: /etc/init.d/samba restart, or restart smbd
Debian: service samba restart
-3. For Samba other than 3.4/3.5: The greyhole.so files packaged with Greyhole won't work on your system.
+3. For Samba other than 3.4/3.5/3.6: The greyhole.so files packaged with Greyhole won't work on your system.
You'll need to compile your own VFS module. You'll just need to compile vfs_greyhole.c, and install it.
+
+ Note: if, for some reason, you need to compile the VFS module with Samba 3.4 or 3.6, you'll need to use the proper version number in the cp and patch commands below.
+ For example, for Samba 3.6:
+ cp ${GREYHOLE_INSTALL_DIR}/samba-module/vfs_greyhole-samba-3.6.c modules/vfs_greyhole.c
+ patch -p1 < ${GREYHOLE_INSTALL_DIR}/samba-module/Makefile-samba-3.6.patch
Fedora:
yumdownloader --source samba
@@ -90,16 +95,13 @@ Note: Samba 3.4.3 (and 3.3.9) fix a bug that affects Greyhole functionnality.
cp ${GREYHOLE_INSTALL_DIR}/samba-module/vfs_greyhole-samba-3.5.c modules/vfs_greyhole.c
patch -p1 < ${GREYHOLE_INSTALL_DIR}/samba-module/Makefile-samba-3.5.patch
make
- if [ -x /usr/lib64/samba/vfs/ ]; then cp bin/greyhole.so /usr/lib64/samba/vfs/greyhole.so; else cp bin/greyhole.so /usr/lib/samba/vfs/greyhole.so; fi
+ if [ -x /usr/lib64/samba/vfs/ ]; then cp bin/greyhole.so /usr/lib64/samba/vfs/greyhole.so; fi
+ if [ -x /usr/lib/samba/vfs/ ]; then cp bin/greyhole.so /usr/lib/samba/vfs/greyhole.so; fi
Fedora: service smb restart
Ubuntu (< 10): /etc/init.d/samba restart
Ubuntu (10+): restart smbd
Debian: service samba restart
-
- Note: if, for some reason, you need to compile the VFS module with Samba 3.4, use the following instead of the above cp & patch commands, after running ./configure, then continue with make:
- cp ${GREYHOLE_INSTALL_DIR}/samba-module/vfs_greyhole.c modules/
- patch -p1 < ${GREYHOLE_INSTALL_DIR}/samba-module/Makefile.patch
4. Add Greyhole to services that start on boot:
View
16 greyhole.spec
@@ -47,15 +47,18 @@ install -m 0644 -D -p docs/greyhole-dfree.1.gz ${RPM_BUILD_ROOT}/usr/share/man/m
install -m 0644 -D -p docs/greyhole.conf.5.gz ${RPM_BUILD_ROOT}/usr/share/man/man5/
%ifarch x86_64
- install -m 0644 -D -p samba-module/bin/greyhole-x86_64.so ${RPM_BUILD_ROOT}%{_libdir}/greyhole/greyhole-samba.so
+ install -m 0644 -D -p samba-module/bin/3.4/greyhole-x86_64.so ${RPM_BUILD_ROOT}%{_libdir}/greyhole/greyhole-samba34.so
install -m 0644 -D -p samba-module/bin/3.5/greyhole-x86_64.so ${RPM_BUILD_ROOT}%{_libdir}/greyhole/greyhole-samba35.so
+ install -m 0644 -D -p samba-module/bin/3.6/greyhole-x86_64.so ${RPM_BUILD_ROOT}%{_libdir}/greyhole/greyhole-samba36.so
%else
%ifarch %{arm}
- install -m 0644 -D -p samba-module/bin/greyhole-arm.so ${RPM_BUILD_ROOT}%{_libdir}/greyhole/greyhole-samba.so
+ install -m 0644 -D -p samba-module/bin/3.4/greyhole-arm.so ${RPM_BUILD_ROOT}%{_libdir}/greyhole/greyhole-samba34.so
install -m 0644 -D -p samba-module/bin/3.5/greyhole-arm.so ${RPM_BUILD_ROOT}%{_libdir}/greyhole/greyhole-samba35.so
+ #install -m 0644 -D -p samba-module/bin/3.6/greyhole-arm.so ${RPM_BUILD_ROOT}%{_libdir}/greyhole/greyhole-samba36.so
%else
- install -m 0644 -D -p samba-module/bin/greyhole-i386.so ${RPM_BUILD_ROOT}%{_libdir}/greyhole/greyhole-samba.so
+ install -m 0644 -D -p samba-module/bin/3.4/greyhole-i386.so ${RPM_BUILD_ROOT}%{_libdir}/greyhole/greyhole-samba34.so
install -m 0644 -D -p samba-module/bin/3.5/greyhole-i386.so ${RPM_BUILD_ROOT}%{_libdir}/greyhole/greyhole-samba35.so
+ install -m 0644 -D -p samba-module/bin/3.6/greyhole-i386.so ${RPM_BUILD_ROOT}%{_libdir}/greyhole/greyhole-samba36.so
%endif
%endif
@@ -83,9 +86,12 @@ SMB_VERSION="`smbd --version | awk '{print $2}' | awk -F'-' '{print $1}' | awk -
if [ "$SMB_VERSION" = "3 5" ]; then
echo " Detected Samba 3.5; creating symlink pointing to greyhole-samba35.so"
ln -s ${LIBDIR}/greyhole/greyhole-samba35.so ${LIBDIR}/samba/vfs/greyhole.so
+elif [ "$SMB_VERSION" = "3 6" ]; then
+ echo " Detected Samba 3.6; creating symlink pointing to greyhole-samba36.so"
+ ln -s ${LIBDIR}/greyhole/greyhole-samba36.so ${LIBDIR}/samba/vfs/greyhole.so
else
- echo " Detected Samba 3.4; creating symlink pointing to greyhole-samba.so"
- ln -s ${LIBDIR}/greyhole/greyhole-samba.so ${LIBDIR}/samba/vfs/greyhole.so
+ echo " Detected Samba 3.4; creating symlink pointing to greyhole-samba34.so"
+ ln -s ${LIBDIR}/greyhole/greyhole-samba34.so ${LIBDIR}/samba/vfs/greyhole.so
fi
if [ ! -f ${LIBDIR}/samba/vfs/greyhole.so ]; then
View
0 samba-module/Makefile.patch → samba-module/Makefile-samba-3.4.patch
File renamed without changes.
View
68 samba-module/Makefile-samba-3.6.patch
@@ -1,30 +1,42 @@
--- a/Makefile 2011-09-02 18:04:57.940490759 +0100
+++ b/Makefile 2011-09-02 18:08:11.953803089 +0100
-@@ -250,7 +250,7 @@
-
- SCRIPTS = $(srcdir)/script/smbtar $(builddir)/script/findsmb
-
--VFS_MODULES = bin/recycle.so bin/audit.so bin/extd_audit.so bin/full_audit.so bin/netatalk.so bin/fake_perms.so bin/default_quota.so bin/readonly.so bin/cap.so bin/expand_msdfs.so bin/shadow_copy.so bin/shadow_copy2.so bin/xattr_tdb.so bin/catia.so bin/streams_xattr.so bin/streams_depot.so bin/readahead.so bin/fileid.so bin/preopen.so bin/syncops.so bin/acl_xattr.so bin/acl_tdb.so bin/smb_traffic_analyzer.so bin/dirsort.so bin/scannedonly.so
-+VFS_MODULES = bin/recycle.so bin/audit.so bin/greyhole.so bin/extd_audit.so bin/full_audit.so bin/netatalk.so bin/fake_perms.so bin/default_quota.so bin/readonly.so bin/cap.so bin/expand_msdfs.so bin/shadow_copy.so bin/shadow_copy2.so bin/xattr_tdb.so bin/catia.so bin/streams_xattr.so bin/streams_depot.so bin/readahead.so bin/fileid.so bin/preopen.so bin/syncops.so bin/acl_xattr.so bin/acl_tdb.so bin/smb_traffic_analyzer.so bin/dirsort.so bin/scannedonly.so
- PERFCOUNT_MODULES =
- PDB_MODULES =
- IDMAP_MODULES = bin/autorid.so
-@@ -796,6 +796,7 @@
- VFS_DEFAULT_OBJ = modules/vfs_default.o
- VFS_AUDIT_OBJ = modules/vfs_audit.o
- VFS_EXTD_AUDIT_OBJ = modules/vfs_extd_audit.o
-+VFS_GREYHOLE_OBJ = modules/vfs_greyhole.o
- VFS_FULL_AUDIT_OBJ = modules/vfs_full_audit.o
- VFS_FAKE_PERMS_OBJ = modules/vfs_fake_perms.o
- VFS_RECYCLE_OBJ = modules/vfs_recycle.o
-@@ -2889,6 +2890,10 @@
- @echo "Building plugin $@"
- @$(SHLD_MODULE) $(VFS_AUDIT_OBJ)
-
-+bin/greyhole.so: $(BINARY_PREREQS) $(VFS_GREYHOLE_OBJ)
-+ @echo "Building plugin $@"
-+ @$(SHLD_MODULE) $(VFS_GREYHOLE_OBJ)
-+
- bin/extd_audit.so: $(BINARY_PREREQS) $(VFS_EXTD_AUDIT_OBJ)
- @echo "Building plugin $@"
- @$(SHLD_MODULE) $(VFS_EXTD_AUDIT_OBJ)
+***************
+*** 250,256 ****
+
+ SCRIPTS = $(srcdir)/script/smbtar $(builddir)/script/findsmb
+
+! VFS_MODULES = bin/recycle.so bin/audit.so bin/extd_audit.so bin/full_audit.so bin/netatalk.so bin/fake_perms.so bin/default_quota.so bin/readonly.so bin/cap.so bin/expand_msdfs.so bin/shadow_copy.so bin/shadow_copy2.so bin/xattr_tdb.so bin/catia.so bin/streams_xattr.so bin/streams_depot.so bin/readahead.so bin/fileid.so bin/preopen.so bin/syncops.so bin/acl_xattr.so bin/acl_tdb.so bin/smb_traffic_analyzer.so bin/dirsort.so bin/scannedonly.so bin/crossrename.so bin/linux_xfs_sgid.so bin/time_audit.so
+ PERFCOUNT_MODULES =
+ PDB_MODULES =
+ IDMAP_MODULES = bin/autorid.so
+--- 250,256 ----
+
+ SCRIPTS = $(srcdir)/script/smbtar $(builddir)/script/findsmb
+
+! VFS_MODULES = bin/recycle.so bin/audit.so bin/greyhole.so bin/extd_audit.so bin/full_audit.so bin/netatalk.so bin/fake_perms.so bin/default_quota.so bin/readonly.so bin/cap.so bin/expand_msdfs.so bin/shadow_copy.so bin/shadow_copy2.so bin/xattr_tdb.so bin/catia.so bin/streams_xattr.so bin/streams_depot.so bin/readahead.so bin/fileid.so bin/preopen.so bin/syncops.so bin/acl_xattr.so bin/acl_tdb.so bin/smb_traffic_analyzer.so bin/dirsort.so bin/scannedonly.so bin/crossrename.so bin/linux_xfs_sgid.so bin/time_audit.so
+ PERFCOUNT_MODULES =
+ PDB_MODULES =
+ IDMAP_MODULES = bin/autorid.so
+***************
+*** 796,801 ****
+--- 796,802 ----
+ VFS_DEFAULT_OBJ = modules/vfs_default.o
+ VFS_AUDIT_OBJ = modules/vfs_audit.o
+ VFS_EXTD_AUDIT_OBJ = modules/vfs_extd_audit.o
++ VFS_GREYHOLE_OBJ = modules/vfs_greyhole.o
+ VFS_FULL_AUDIT_OBJ = modules/vfs_full_audit.o
+ VFS_FAKE_PERMS_OBJ = modules/vfs_fake_perms.o
+ VFS_RECYCLE_OBJ = modules/vfs_recycle.o
+***************
+*** 2889,2894 ****
+--- 2890,2899 ----
+ @echo "Building plugin $@"
+ @$(SHLD_MODULE) $(VFS_AUDIT_OBJ)
+
++ bin/greyhole.so: $(BINARY_PREREQS) $(VFS_GREYHOLE_OBJ)
++ @echo "Building plugin $@"
++ @$(SHLD_MODULE) $(VFS_GREYHOLE_OBJ)
++
+ bin/extd_audit.so: $(BINARY_PREREQS) $(VFS_EXTD_AUDIT_OBJ)
+ @echo "Building plugin $@"
+ @$(SHLD_MODULE) $(VFS_EXTD_AUDIT_OBJ)
View
0 samba-module/bin/greyhole-arm.so → samba-module/bin/3.4/greyhole-arm.so
File renamed without changes.
View
0 samba-module/bin/greyhole-i386.so → samba-module/bin/3.4/greyhole-i386.so
File renamed without changes.
View
0 samba-module/bin/greyhole-x86_64.so → samba-module/bin/3.4/greyhole-x86_64.so
File renamed without changes.
View
BIN samba-module/bin/3.6/greyhole-x86_64.so
Binary file not shown.
View
0 samba-module/vfs_greyhole.c → samba-module/vfs_greyhole-samba-3.4.c
File renamed without changes.
View
259 samba-module/vfs_greyhole-samba-3.6.c
@@ -0,0 +1,259 @@
+/*
+Copyright Guillaume Boudreau, 2009
+
+This file is part of Greyhole.
+
+It was created based on vfs_extd_audit.c, by Tim Potter, Alexander
+Bokovoy, John H Terpstra & Stefan (metze) Metzmacher.
+
+Greyhole 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.
+
+Greyhole 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 Greyhole. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "includes.h"
+#include "system/filesys.h"
+#include "system/syslog.h"
+#include "smbd/smbd.h"
+
+static int vfs_greyhole_debug_level = DBGC_VFS;
+
+#undef DBGC_CLASS
+#define DBGC_CLASS vfs_greyhole_debug_level
+
+#define vfs_greyhole_init init_samba_module
+
+/* Function prototypes */
+
+static int greyhole_connect(vfs_handle_struct *handle, const char *svc, const char *user);
+static int greyhole_mkdir(vfs_handle_struct *handle, const char *path, mode_t mode);
+static int greyhole_rmdir(vfs_handle_struct *handle, const char *path);
+static int greyhole_open(vfs_handle_struct *handle, struct smb_filename *fname, files_struct *fsp, int flags, mode_t mode);
+static int greyhole_close(vfs_handle_struct *handle, files_struct *fsp);
+static int greyhole_rename(vfs_handle_struct *handle, const struct smb_filename *oldname, const struct smb_filename *newname);
+static int greyhole_unlink(vfs_handle_struct *handle, const struct smb_filename *path);
+
+/* VFS operations */
+
+static struct vfs_fn_pointers vfs_greyhole_fns = {
+
+ /* Disk operations */
+
+ .connect_fn = greyhole_connect,
+
+ /* Directory operations */
+
+ .mkdir = greyhole_mkdir,
+ .rmdir = greyhole_rmdir,
+
+ /* File operations */
+
+ .open_fn = greyhole_open,
+ .close_fn = greyhole_close,
+ .rename = greyhole_rename,
+ .unlink = greyhole_unlink
+};
+
+static int greyhole_syslog_facility(vfs_handle_struct *handle)
+{
+ static const struct enum_list enum_log_facilities[] = {
+ { LOG_USER, "USER" },
+ { LOG_LOCAL0, "LOCAL0" },
+ { LOG_LOCAL1, "LOCAL1" },
+ { LOG_LOCAL2, "LOCAL2" },
+ { LOG_LOCAL3, "LOCAL3" },
+ { LOG_LOCAL4, "LOCAL4" },
+ { LOG_LOCAL5, "LOCAL5" },
+ { LOG_LOCAL6, "LOCAL6" },
+ { LOG_LOCAL7, "LOCAL7" }
+ };
+
+ int facility;
+
+ facility = lp_parm_enum(SNUM(handle->conn), "greyhole", "facility", enum_log_facilities, LOG_LOCAL6);
+
+ return facility;
+}
+
+/* Implementation of vfs_ops. Pass everything on to the default
+ operation but log event first. */
+
+static int greyhole_connect(vfs_handle_struct *handle, const char *svc, const char *user)
+{
+ int result;
+
+ if (!handle) {
+ return -1;
+ }
+
+ openlog("smbd_greyhole", 0, greyhole_syslog_facility(handle));
+
+ result = SMB_VFS_NEXT_CONNECT(handle, svc, user);
+
+ return result;
+}
+
+static int greyhole_mkdir(vfs_handle_struct *handle, const char *path, mode_t mode)
+{
+ int result;
+ FILE *spoolf;
+ char filename[38];
+ struct timeval tp;
+
+ result = SMB_VFS_NEXT_MKDIR(handle, path, mode);
+
+ if (result >= 0) {
+ gettimeofday(&tp, (struct timezone *) NULL);
+ snprintf(filename, 37, "/var/spool/greyhole/%.0f", ((double) (tp.tv_sec)*1000000.0) + (((double) tp.tv_usec)));
+ spoolf = fopen(filename, "wt");
+ fprintf(spoolf, "mkdir\n%s\n%s\n\n",
+ lp_servicename(handle->conn->params->service),
+ path);
+ fclose(spoolf);
+ }
+
+ return result;
+}
+
+static int greyhole_rmdir(vfs_handle_struct *handle, const char *path)
+{
+ int result;
+ FILE *spoolf;
+ char filename[38];
+ struct timeval tp;
+
+ result = SMB_VFS_NEXT_RMDIR(handle, path);
+
+ if (result >= 0) {
+ gettimeofday(&tp, (struct timezone *) NULL);
+ snprintf(filename, 37, "/var/spool/greyhole/%.0f", ((double) (tp.tv_sec)*1000000.0) + (((double) tp.tv_usec)));
+ spoolf = fopen(filename, "wt");
+ fprintf(spoolf, "rmdir\n%s\n%s\n\n",
+ lp_servicename(handle->conn->params->service),
+ path);
+ fclose(spoolf);
+ }
+
+ return result;
+}
+
+static int greyhole_open(vfs_handle_struct *handle, struct smb_filename *fname, files_struct *fsp, int flags, mode_t mode)
+{
+ int result;
+ FILE *spoolf;
+ char filename[38];
+ struct timeval tp;
+
+ result = SMB_VFS_NEXT_OPEN(handle, fname, fsp, flags, mode);
+
+ if (result >= 0) {
+ if ((flags & O_WRONLY) || (flags & O_RDWR)) {
+ gettimeofday(&tp, (struct timezone *) NULL);
+ snprintf(filename, 37, "/var/spool/greyhole/%.0f", ((double) (tp.tv_sec)*1000000.0) + (((double) tp.tv_usec)));
+ spoolf = fopen(filename, "wt");
+ fprintf(spoolf, "open\n%s\n%s\n%d\n%s\n",
+ lp_servicename(handle->conn->params->service),
+ fname->base_name,
+ result,
+ "for writing ");
+ fclose(spoolf);
+ }
+ }
+
+ return result;
+}
+
+static int greyhole_close(vfs_handle_struct *handle, files_struct *fsp)
+{
+ int result;
+ FILE *spoolf;
+ char filename[38];
+ struct timeval tp;
+
+ result = SMB_VFS_NEXT_CLOSE(handle, fsp);
+
+ if (result >= 0) {
+ gettimeofday(&tp, (struct timezone *) NULL);
+ snprintf(filename, 37, "/var/spool/greyhole/%.0f", ((double) (tp.tv_sec)*1000000.0) + (((double) tp.tv_usec)));
+ spoolf = fopen(filename, "wt");
+ fprintf(spoolf, "close\n%s\n%d\n\n",
+ lp_servicename(handle->conn->params->service),
+ fsp->fh->fd);
+ fclose(spoolf);
+ }
+
+ return result;
+}
+
+static int greyhole_rename(vfs_handle_struct *handle, const struct smb_filename *oldname, const struct smb_filename *newname)
+{
+ int result;
+ FILE *spoolf;
+ char filename[38];
+ struct timeval tp;
+
+ result = SMB_VFS_NEXT_RENAME(handle, oldname, newname);
+
+ if (result >= 0) {
+ gettimeofday(&tp, (struct timezone *) NULL);
+ snprintf(filename, 37, "/var/spool/greyhole/%.0f", ((double) (tp.tv_sec)*1000000.0) + (((double) tp.tv_usec)));
+ spoolf = fopen(filename, "wt");
+ fprintf(spoolf, "rename\n%s\n%s\n%s\n\n",
+ lp_servicename(handle->conn->params->service),
+ oldname->base_name,
+ newname->base_name);
+ fclose(spoolf);
+ }
+
+ return result;
+}
+
+static int greyhole_unlink(vfs_handle_struct *handle, const struct smb_filename *path)
+{
+ int result;
+ FILE *spoolf;
+ char filename[38];
+ struct timeval tp;
+
+ result = SMB_VFS_NEXT_UNLINK(handle, path);
+
+ if (result >= 0) {
+ gettimeofday(&tp, (struct timezone *) NULL);
+ snprintf(filename, 37, "/var/spool/greyhole/%.0f", ((double) (tp.tv_sec)*1000000.0) + (((double) tp.tv_usec)));
+ spoolf = fopen(filename, "wt");
+ fprintf(spoolf, "unlink\n%s\n%s\n\n",
+ lp_servicename(handle->conn->params->service),
+ path->base_name);
+ fclose(spoolf);
+ }
+
+ return result;
+}
+
+NTSTATUS vfs_greyhole_init(void);
+NTSTATUS vfs_greyhole_init(void)
+{
+ NTSTATUS ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "greyhole", &vfs_greyhole_fns);
+
+ if (!NT_STATUS_IS_OK(ret))
+ return ret;
+
+ vfs_greyhole_debug_level = debug_add_class("greyhole");
+ if (vfs_greyhole_debug_level == -1) {
+ vfs_greyhole_debug_level = DBGC_VFS;
+ DEBUG(0, ("vfs_greyhole: Couldn't register custom debugging class!\n"));
+ } else {
+ DEBUG(10, ("vfs_greyhole: Debug class number of 'greyhole': %d\n", vfs_greyhole_debug_level));
+ }
+
+ return ret;
+}

0 comments on commit 3f714c8

Please sign in to comment.
Something went wrong with that request. Please try again.