⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vfs_full_audit.c

📁 samba-3.0.22.tar.gz 编译smb服务器的源码
💻 C
📖 第 1 页 / 共 5 页
字号:
	       "");	return result;}static int smb_full_audit_sys_acl_set_permset(vfs_handle_struct *handle,				     connection_struct *conn,				     SMB_ACL_ENTRY_T entry,				     SMB_ACL_PERMSET_T permset){	int result;	result = SMB_VFS_NEXT_SYS_ACL_SET_PERMSET(handle, conn, entry, permset);	do_log(SMB_VFS_OP_SYS_ACL_SET_PERMSET, (result >= 0), handle,	       "");	return result;}static int smb_full_audit_sys_acl_valid(vfs_handle_struct *handle,			       connection_struct *conn,			       SMB_ACL_T theacl ){	int result;	result = SMB_VFS_NEXT_SYS_ACL_VALID(handle, conn, theacl);	do_log(SMB_VFS_OP_SYS_ACL_VALID, (result >= 0), handle,	       "");	return result;}static int smb_full_audit_sys_acl_set_file(vfs_handle_struct *handle,				  connection_struct *conn,				  const char *name, SMB_ACL_TYPE_T acltype,				  SMB_ACL_T theacl){	int result;	result = SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, conn, name, acltype,					       theacl);	do_log(SMB_VFS_OP_SYS_ACL_SET_FILE, (result >= 0), handle,	       "%s", name);	return result;}static int smb_full_audit_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,				int fd, SMB_ACL_T theacl){	int result;	result = SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, fd, theacl);	do_log(SMB_VFS_OP_SYS_ACL_SET_FD, (result >= 0), handle,	       "%s", fsp->fsp_name);	return result;}static int smb_full_audit_sys_acl_delete_def_file(vfs_handle_struct *handle,					 connection_struct *conn,					 const char *path){	int result;	result = SMB_VFS_NEXT_SYS_ACL_DELETE_DEF_FILE(handle, conn, path);	do_log(SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE, (result >= 0), handle,	       "%s", path);	return result;}static int smb_full_audit_sys_acl_get_perm(vfs_handle_struct *handle,				  connection_struct *conn,				  SMB_ACL_PERMSET_T permset,				  SMB_ACL_PERM_T perm){	int result;	result = SMB_VFS_NEXT_SYS_ACL_GET_PERM(handle, conn, permset, perm);	do_log(SMB_VFS_OP_SYS_ACL_GET_PERM, (result >= 0), handle,	       "");	return result;}static int smb_full_audit_sys_acl_free_text(vfs_handle_struct *handle,				   connection_struct *conn,				   char *text){	int result;	result = SMB_VFS_NEXT_SYS_ACL_FREE_TEXT(handle, conn, text);	do_log(SMB_VFS_OP_SYS_ACL_FREE_TEXT, (result >= 0), handle,	       "");	return result;}static int smb_full_audit_sys_acl_free_acl(vfs_handle_struct *handle,				  connection_struct *conn,				  SMB_ACL_T posix_acl){	int result;	result = SMB_VFS_NEXT_SYS_ACL_FREE_ACL(handle, conn, posix_acl);	do_log(SMB_VFS_OP_SYS_ACL_FREE_ACL, (result >= 0), handle,	       "");	return result;}static int smb_full_audit_sys_acl_free_qualifier(vfs_handle_struct *handle,					connection_struct *conn,					void *qualifier,					SMB_ACL_TAG_T tagtype){	int result;	result = SMB_VFS_NEXT_SYS_ACL_FREE_QUALIFIER(handle, conn, qualifier,						     tagtype);	do_log(SMB_VFS_OP_SYS_ACL_FREE_QUALIFIER, (result >= 0), handle,	       "");	return result;}static ssize_t smb_full_audit_getxattr(struct vfs_handle_struct *handle,			      struct connection_struct *conn, const char *path,			      const char *name, void *value, size_t size){	ssize_t result;	result = SMB_VFS_NEXT_GETXATTR(handle, conn, path, name, value, size);	do_log(SMB_VFS_OP_GETXATTR, (result >= 0), handle,	       "%s|%s", path, name);	return result;}static ssize_t smb_full_audit_lgetxattr(struct vfs_handle_struct *handle,			       struct connection_struct *conn,			       const char *path, const char *name,			       void *value, size_t size){	ssize_t result;	result = SMB_VFS_NEXT_LGETXATTR(handle, conn, path, name, value, size);	do_log(SMB_VFS_OP_LGETXATTR, (result >= 0), handle,	       "%s|%s", path, name);	return result;}static ssize_t smb_full_audit_fgetxattr(struct vfs_handle_struct *handle,			       struct files_struct *fsp, int fd,			       const char *name, void *value, size_t size){	ssize_t result;	result = SMB_VFS_NEXT_FGETXATTR(handle, fsp, fd, name, value, size);	do_log(SMB_VFS_OP_FGETXATTR, (result >= 0), handle,	       "%s|%s", fsp->fsp_name, name);	return result;}static ssize_t smb_full_audit_listxattr(struct vfs_handle_struct *handle,			       struct connection_struct *conn,			       const char *path, char *list, size_t size){	ssize_t result;	result = SMB_VFS_NEXT_LISTXATTR(handle, conn, path, list, size);	do_log(SMB_VFS_OP_LISTXATTR, (result >= 0), handle, "%s", path);	return result;}static ssize_t smb_full_audit_llistxattr(struct vfs_handle_struct *handle,				struct connection_struct *conn,				const char *path, char *list, size_t size){	ssize_t result;	result = SMB_VFS_NEXT_LLISTXATTR(handle, conn, path, list, size);	do_log(SMB_VFS_OP_LLISTXATTR, (result >= 0), handle, "%s", path);	return result;}static ssize_t smb_full_audit_flistxattr(struct vfs_handle_struct *handle,				struct files_struct *fsp, int fd, char *list,				size_t size){	ssize_t result;	result = SMB_VFS_NEXT_FLISTXATTR(handle, fsp, fd, list, size);	do_log(SMB_VFS_OP_FLISTXATTR, (result >= 0), handle,	       "%s", fsp->fsp_name);	return result;}static int smb_full_audit_removexattr(struct vfs_handle_struct *handle,			     struct connection_struct *conn, const char *path,			     const char *name){	int result;	result = SMB_VFS_NEXT_REMOVEXATTR(handle, conn, path, name);	do_log(SMB_VFS_OP_REMOVEXATTR, (result >= 0), handle,	       "%s|%s", path, name);	return result;}static int smb_full_audit_lremovexattr(struct vfs_handle_struct *handle,			      struct connection_struct *conn, const char *path,			      const char *name){	int result;	result = SMB_VFS_NEXT_LREMOVEXATTR(handle, conn, path, name);	do_log(SMB_VFS_OP_LREMOVEXATTR, (result >= 0), handle,	       "%s|%s", path, name);	return result;}static int smb_full_audit_fremovexattr(struct vfs_handle_struct *handle,			      struct files_struct *fsp, int fd,			      const char *name){	int result;	result = SMB_VFS_NEXT_FREMOVEXATTR(handle, fsp, fd, name);	do_log(SMB_VFS_OP_FREMOVEXATTR, (result >= 0), handle,	       "%s|%s", fsp->fsp_name, name);	return result;}static int smb_full_audit_setxattr(struct vfs_handle_struct *handle,			  struct connection_struct *conn, const char *path,			  const char *name, const void *value, size_t size,			  int flags){	int result;	result = SMB_VFS_NEXT_SETXATTR(handle, conn, path, name, value, size,				       flags);	do_log(SMB_VFS_OP_SETXATTR, (result >= 0), handle,	       "%s|%s", path, name);	return result;}static int smb_full_audit_lsetxattr(struct vfs_handle_struct *handle,			   struct connection_struct *conn, const char *path,			   const char *name, const void *value, size_t size,			   int flags){	int result;	result = SMB_VFS_NEXT_LSETXATTR(handle, conn, path, name, value, size,					flags);	do_log(SMB_VFS_OP_LSETXATTR, (result >= 0), handle,	       "%s|%s", path, name);	return result;}static int smb_full_audit_fsetxattr(struct vfs_handle_struct *handle,			   struct files_struct *fsp, int fd, const char *name,			   const void *value, size_t size, int flags){	int result;	result = SMB_VFS_NEXT_FSETXATTR(handle, fsp, fd, name, value, size,					flags);	do_log(SMB_VFS_OP_FSETXATTR, (result >= 0), handle,	       "%s|%s", fsp->fsp_name, name);	return result;}static int smb_full_audit_aio_read(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb){	int result;	result = SMB_VFS_NEXT_AIO_READ(handle, fsp, aiocb);	do_log(SMB_VFS_OP_AIO_READ, (result >= 0), handle,		"%s", fsp->fsp_name);	return result;}static int smb_full_audit_aio_write(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb){	int result;	result = SMB_VFS_NEXT_AIO_WRITE(handle, fsp, aiocb);	do_log(SMB_VFS_OP_AIO_WRITE, (result >= 0), handle,		"%s", fsp->fsp_name);	return result;}static ssize_t smb_full_audit_aio_return(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb){	int result;	result = SMB_VFS_NEXT_AIO_RETURN(handle, fsp, aiocb);	do_log(SMB_VFS_OP_AIO_RETURN, (result >= 0), handle,		"%s", fsp->fsp_name);	return result;}static int smb_full_audit_aio_cancel(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, SMB_STRUCT_AIOCB *aiocb){	int result;	result = SMB_VFS_NEXT_AIO_CANCEL(handle, fsp, fd, aiocb);	do_log(SMB_VFS_OP_AIO_CANCEL, (result >= 0), handle,		"%s", fsp->fsp_name);	return result;}static int smb_full_audit_aio_error(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb){	int result;	result = SMB_VFS_NEXT_AIO_ERROR(handle, fsp, aiocb);	do_log(SMB_VFS_OP_AIO_ERROR, (result >= 0), handle,		"%s", fsp->fsp_name);	return result;}static int smb_full_audit_aio_fsync(struct vfs_handle_struct *handle, struct files_struct *fsp, int op, SMB_STRUCT_AIOCB *aiocb){	int result;	result = SMB_VFS_NEXT_AIO_FSYNC(handle, fsp, op, aiocb);	do_log(SMB_VFS_OP_AIO_FSYNC, (result >= 0), handle,		"%s", fsp->fsp_name);	return result;}static int smb_full_audit_aio_suspend(struct vfs_handle_struct *handle, struct files_struct *fsp, const SMB_STRUCT_AIOCB * const aiocb[], int n, const struct timespec *ts){	int result;	result = SMB_VFS_NEXT_AIO_SUSPEND(handle, fsp, aiocb, n, ts);	do_log(SMB_VFS_OP_AIO_SUSPEND, (result >= 0), handle,		"%s", fsp->fsp_name);	return result;}NTSTATUS vfs_full_audit_init(void){	NTSTATUS ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION,					"full_audit", audit_op_tuples);		if (!NT_STATUS_IS_OK(ret))		return ret;	vfs_full_audit_debug_level = debug_add_class("full_audit");	if (vfs_full_audit_debug_level == -1) {		vfs_full_audit_debug_level = DBGC_VFS;		DEBUG(0, ("vfs_full_audit: Couldn't register custom debugging "			  "class!\n"));	} else {		DEBUG(10, ("vfs_full_audit: Debug class number of "			   "'full_audit': %d\n", vfs_full_audit_debug_level));	}		return ret;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -