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

📄 vfs_full_audit.c

📁 samba-3.0.22.tar.gz 编译smb服务器的源码
💻 C
📖 第 1 页 / 共 5 页
字号:
	return result;}static int smb_full_audit_fchown(vfs_handle_struct *handle, files_struct *fsp, int fd,			uid_t uid, gid_t gid){	int result;	result = SMB_VFS_NEXT_FCHOWN(handle, fsp, fd, uid, gid);	do_log(SMB_VFS_OP_FCHOWN, (result >= 0), handle, "%s|%ld|%ld",	       fsp->fsp_name, (long int)uid, (long int)gid);	return result;}static int smb_full_audit_chdir(vfs_handle_struct *handle, connection_struct *conn,		       const char *path){	int result;	result = SMB_VFS_NEXT_CHDIR(handle, conn, path);	do_log(SMB_VFS_OP_CHDIR, (result >= 0), handle, "chdir|%s", path);	return result;}static char *smb_full_audit_getwd(vfs_handle_struct *handle, connection_struct *conn,			 char *path){	char *result;	result = SMB_VFS_NEXT_GETWD(handle, conn, path);		do_log(SMB_VFS_OP_GETWD, (result != NULL), handle, "%s", path);	return result;}static int smb_full_audit_utime(vfs_handle_struct *handle, connection_struct *conn,		       const char *path, struct utimbuf *times){	int result;	result = SMB_VFS_NEXT_UTIME(handle, conn, path, times);	do_log(SMB_VFS_OP_UTIME, (result >= 0), handle, "%s", path);	return result;}static int smb_full_audit_ftruncate(vfs_handle_struct *handle, files_struct *fsp,			   int fd, SMB_OFF_T len){	int result;	result = SMB_VFS_NEXT_FTRUNCATE(handle, fsp, fd, len);	do_log(SMB_VFS_OP_FTRUNCATE, (result >= 0), handle,	       "%s", fsp->fsp_name);	return result;}static BOOL smb_full_audit_lock(vfs_handle_struct *handle, files_struct *fsp, int fd,		       int op, SMB_OFF_T offset, SMB_OFF_T count, int type){	BOOL result;	result = SMB_VFS_NEXT_LOCK(handle, fsp, fd, op, offset, count, type);	do_log(SMB_VFS_OP_LOCK, (result >= 0), handle, "%s", fsp->fsp_name);	return result;}static int smb_full_audit_symlink(vfs_handle_struct *handle, connection_struct *conn,			 const char *oldpath, const char *newpath){	int result;	result = SMB_VFS_NEXT_SYMLINK(handle, conn, oldpath, newpath);	do_log(SMB_VFS_OP_SYMLINK, (result >= 0), handle,	       "%s|%s", oldpath, newpath);	return result;}static int smb_full_audit_readlink(vfs_handle_struct *handle, connection_struct *conn,			  const char *path, char *buf, size_t bufsiz){	int result;	result = SMB_VFS_NEXT_READLINK(handle, conn, path, buf, bufsiz);	do_log(SMB_VFS_OP_READLINK, (result >= 0), handle, "%s", path);	return result;}static int smb_full_audit_link(vfs_handle_struct *handle, connection_struct *conn,		      const char *oldpath, const char *newpath){	int result;	result = SMB_VFS_NEXT_LINK(handle, conn, oldpath, newpath);	do_log(SMB_VFS_OP_LINK, (result >= 0), handle,	       "%s|%s", oldpath, newpath);	return result;}static int smb_full_audit_mknod(vfs_handle_struct *handle, connection_struct *conn,		       const char *pathname, mode_t mode, SMB_DEV_T dev){	int result;	result = SMB_VFS_NEXT_MKNOD(handle, conn, pathname, mode, dev);	do_log(SMB_VFS_OP_MKNOD, (result >= 0), handle, "%s", pathname);	return result;}static char *smb_full_audit_realpath(vfs_handle_struct *handle, connection_struct *conn,			    const char *path, char *resolved_path){	char *result;	result = SMB_VFS_NEXT_REALPATH(handle, conn, path, resolved_path);	do_log(SMB_VFS_OP_REALPATH, (result != NULL), handle, "%s", path);	return result;}static size_t smb_full_audit_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,				int fd, uint32 security_info,				SEC_DESC **ppdesc){	size_t result;	result = SMB_VFS_NEXT_FGET_NT_ACL(handle, fsp, fd, security_info,					  ppdesc);	do_log(SMB_VFS_OP_FGET_NT_ACL, (result > 0), handle,	       "%s", fsp->fsp_name);	return result;}static size_t smb_full_audit_get_nt_acl(vfs_handle_struct *handle, files_struct *fsp,			       const char *name, uint32 security_info,			       SEC_DESC **ppdesc){	size_t result;	result = SMB_VFS_NEXT_GET_NT_ACL(handle, fsp, name, security_info,					 ppdesc);	do_log(SMB_VFS_OP_GET_NT_ACL, (result > 0), handle,	       "%s", fsp->fsp_name);	return result;}static BOOL smb_full_audit_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,			      int fd, uint32 security_info_sent,			      SEC_DESC *psd){	BOOL result;	result = SMB_VFS_NEXT_FSET_NT_ACL(handle, fsp, fd, security_info_sent,					  psd);	do_log(SMB_VFS_OP_FSET_NT_ACL, result, handle, "%s", fsp->fsp_name);	return result;}static BOOL smb_full_audit_set_nt_acl(vfs_handle_struct *handle, files_struct *fsp,			     const char *name, uint32 security_info_sent,			     SEC_DESC *psd){	BOOL result;	result = SMB_VFS_NEXT_SET_NT_ACL(handle, fsp, name, security_info_sent,					 psd);	do_log(SMB_VFS_OP_SET_NT_ACL, result, handle, "%s", fsp->fsp_name);	return result;}static int smb_full_audit_chmod_acl(vfs_handle_struct *handle, connection_struct *conn,			   const char *path, mode_t mode){	int result;		result = SMB_VFS_NEXT_CHMOD_ACL(handle, conn, path, mode);	do_log(SMB_VFS_OP_CHMOD_ACL, (result >= 0), handle,	       "%s|%o", path, mode);	return result;}static int smb_full_audit_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp,			    int fd, mode_t mode){	int result;		result = SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, fd, mode);	do_log(SMB_VFS_OP_FCHMOD_ACL, (result >= 0), handle,	       "%s|%o", fsp->fsp_name, mode);	return result;}static int smb_full_audit_sys_acl_get_entry(vfs_handle_struct *handle,				   connection_struct *conn,				   SMB_ACL_T theacl, int entry_id,				   SMB_ACL_ENTRY_T *entry_p){	int result;	result = SMB_VFS_NEXT_SYS_ACL_GET_ENTRY(handle, conn, theacl, entry_id,						entry_p);	do_log(SMB_VFS_OP_SYS_ACL_GET_ENTRY, (result >= 0), handle,	       "");	return result;}static int smb_full_audit_sys_acl_get_tag_type(vfs_handle_struct *handle,				      connection_struct *conn,				      SMB_ACL_ENTRY_T entry_d,				      SMB_ACL_TAG_T *tag_type_p){	int result;	result = SMB_VFS_NEXT_SYS_ACL_GET_TAG_TYPE(handle, conn, entry_d,						   tag_type_p);	do_log(SMB_VFS_OP_SYS_ACL_GET_TAG_TYPE, (result >= 0), handle,	       "");	return result;}static int smb_full_audit_sys_acl_get_permset(vfs_handle_struct *handle,				     connection_struct *conn,				     SMB_ACL_ENTRY_T entry_d,				     SMB_ACL_PERMSET_T *permset_p){	int result;	result = SMB_VFS_NEXT_SYS_ACL_GET_PERMSET(handle, conn, entry_d,						  permset_p);	do_log(SMB_VFS_OP_SYS_ACL_GET_PERMSET, (result >= 0), handle,	       "");	return result;}static void * smb_full_audit_sys_acl_get_qualifier(vfs_handle_struct *handle,					  connection_struct *conn,					  SMB_ACL_ENTRY_T entry_d){	void *result;	result = SMB_VFS_NEXT_SYS_ACL_GET_QUALIFIER(handle, conn, entry_d);	do_log(SMB_VFS_OP_SYS_ACL_GET_QUALIFIER, (result != NULL), handle,	       "");	return result;}static SMB_ACL_T smb_full_audit_sys_acl_get_file(vfs_handle_struct *handle,					connection_struct *conn,					const char *path_p,					SMB_ACL_TYPE_T type){	SMB_ACL_T result;	result = SMB_VFS_NEXT_SYS_ACL_GET_FILE(handle, conn, path_p, type);	do_log(SMB_VFS_OP_SYS_ACL_GET_FILE, (result != NULL), handle,	       "%s", path_p);	return result;}static SMB_ACL_T smb_full_audit_sys_acl_get_fd(vfs_handle_struct *handle,				      files_struct *fsp, int fd){	SMB_ACL_T result;	result = SMB_VFS_NEXT_SYS_ACL_GET_FD(handle, fsp, fd);	do_log(SMB_VFS_OP_SYS_ACL_GET_FD, (result != NULL), handle,	       "%s", fsp->fsp_name);	return result;}static int smb_full_audit_sys_acl_clear_perms(vfs_handle_struct *handle,				     connection_struct *conn,				     SMB_ACL_PERMSET_T permset){	int result;	result = SMB_VFS_NEXT_SYS_ACL_CLEAR_PERMS(handle, conn, permset);	do_log(SMB_VFS_OP_SYS_ACL_CLEAR_PERMS, (result >= 0), handle,	       "");	return result;}static int smb_full_audit_sys_acl_add_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_ADD_PERM(handle, conn, permset, perm);	do_log(SMB_VFS_OP_SYS_ACL_ADD_PERM, (result >= 0), handle,	       "");	return result;}static char * smb_full_audit_sys_acl_to_text(vfs_handle_struct *handle,				    connection_struct *conn, SMB_ACL_T theacl,				    ssize_t *plen){	char * result;	result = SMB_VFS_NEXT_SYS_ACL_TO_TEXT(handle, conn, theacl, plen);	do_log(SMB_VFS_OP_SYS_ACL_TO_TEXT, (result != NULL), handle,	       "");	return result;}static SMB_ACL_T smb_full_audit_sys_acl_init(vfs_handle_struct *handle,				    connection_struct *conn,				    int count){	SMB_ACL_T result;	result = SMB_VFS_NEXT_SYS_ACL_INIT(handle, conn, count);	do_log(SMB_VFS_OP_SYS_ACL_INIT, (result != NULL), handle,	       "");	return result;}static int smb_full_audit_sys_acl_create_entry(vfs_handle_struct *handle,				      connection_struct *conn, SMB_ACL_T *pacl,				      SMB_ACL_ENTRY_T *pentry){	int result;	result = SMB_VFS_NEXT_SYS_ACL_CREATE_ENTRY(handle, conn, pacl, pentry);	do_log(SMB_VFS_OP_SYS_ACL_CREATE_ENTRY, (result >= 0), handle,	       "");	return result;}static int smb_full_audit_sys_acl_set_tag_type(vfs_handle_struct *handle,				      connection_struct *conn,				      SMB_ACL_ENTRY_T entry,				      SMB_ACL_TAG_T tagtype){	int result;	result = SMB_VFS_NEXT_SYS_ACL_SET_TAG_TYPE(handle, conn, entry,						   tagtype);	do_log(SMB_VFS_OP_SYS_ACL_SET_TAG_TYPE, (result >= 0), handle,	       "");	return result;}static int smb_full_audit_sys_acl_set_qualifier(vfs_handle_struct *handle,				       connection_struct *conn,				       SMB_ACL_ENTRY_T entry,				       void *qual){	int result;	result = SMB_VFS_NEXT_SYS_ACL_SET_QUALIFIER(handle, conn, entry, qual);	do_log(SMB_VFS_OP_SYS_ACL_SET_QUALIFIER, (result >= 0), handle,

⌨️ 快捷键说明

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