struct connection_struct *conn,
enum SMB_QUOTA_TYPE qtype, unid_t id,
SMB_DISK_QUOTA *qt);
+static int smb_full_audit_get_shadow_copy_data(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ SHADOW_COPY_DATA *shadow_copy_data, BOOL labels);
+
static DIR *smb_full_audit_opendir(vfs_handle_struct *handle, connection_struct *conn,
const char *fname);
static SMB_STRUCT_DIRENT *smb_full_audit_readdir(vfs_handle_struct *handle,
connection_struct *conn, DIR *dirp);
+static void smb_full_audit_seekdir(vfs_handle_struct *handle, connection_struct *conn,
+ DIR *dirp, long offset);
+static long smb_full_audit_telldir(vfs_handle_struct *handle, connection_struct *conn,
+ DIR *dirp);
+static void smb_full_audit_rewinddir(vfs_handle_struct *handle, connection_struct *conn,
+ DIR *dirp);
static int smb_full_audit_mkdir(vfs_handle_struct *handle, connection_struct *conn,
const char *path, mode_t mode);
static int smb_full_audit_rmdir(vfs_handle_struct *handle, connection_struct *conn,
const DATA_BLOB *hdr, SMB_OFF_T offset,
size_t n);
static int smb_full_audit_rename(vfs_handle_struct *handle, connection_struct *conn,
- const char *old, const char *new);
+ const char *oldname, const char *newname);
static int smb_full_audit_fsync(vfs_handle_struct *handle, files_struct *fsp, int fd);
static int smb_full_audit_stat(vfs_handle_struct *handle, connection_struct *conn,
const char *fname, SMB_STRUCT_STAT *sbuf);
SMB_VFS_LAYER_LOGGER},
{SMB_VFS_OP(smb_full_audit_set_quota), SMB_VFS_OP_SET_QUOTA,
SMB_VFS_LAYER_LOGGER},
+ {SMB_VFS_OP(smb_full_audit_get_shadow_copy_data), SMB_VFS_OP_GET_SHADOW_COPY_DATA,
+ SMB_VFS_LAYER_LOGGER},
/* Directory operations */
SMB_VFS_LAYER_LOGGER},
{SMB_VFS_OP(smb_full_audit_readdir), SMB_VFS_OP_READDIR,
SMB_VFS_LAYER_LOGGER},
+ {SMB_VFS_OP(smb_full_audit_seekdir), SMB_VFS_OP_SEEKDIR,
+ SMB_VFS_LAYER_LOGGER},
+ {SMB_VFS_OP(smb_full_audit_telldir), SMB_VFS_OP_TELLDIR,
+ SMB_VFS_LAYER_LOGGER},
+ {SMB_VFS_OP(smb_full_audit_rewinddir), SMB_VFS_OP_REWINDDIR,
+ SMB_VFS_LAYER_LOGGER},
{SMB_VFS_OP(smb_full_audit_mkdir), SMB_VFS_OP_MKDIR,
SMB_VFS_LAYER_LOGGER},
{SMB_VFS_OP(smb_full_audit_rmdir), SMB_VFS_OP_RMDIR,
/* POSIX ACL operations. */
- {SMB_VFS_OP(smb_full_audit_chmod_acl), SMB_VFS_OP_CHMOD,
+ {SMB_VFS_OP(smb_full_audit_chmod_acl), SMB_VFS_OP_CHMOD_ACL,
SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_fchmod_acl), SMB_VFS_OP_FCHMOD,
+ {SMB_VFS_OP(smb_full_audit_fchmod_acl), SMB_VFS_OP_FCHMOD_ACL,
SMB_VFS_LAYER_LOGGER},
{SMB_VFS_OP(smb_full_audit_sys_acl_get_entry), SMB_VFS_OP_SYS_ACL_GET_ENTRY,
SMB_VFS_LAYER_LOGGER},
{ SMB_VFS_OP_GET_SHADOW_COPY_DATA, "get_shadow_copy_data" },
{ SMB_VFS_OP_OPENDIR, "opendir" },
{ SMB_VFS_OP_READDIR, "readdir" },
+ { SMB_VFS_OP_SEEKDIR, "seekdir" },
+ { SMB_VFS_OP_TELLDIR, "telldir" },
+ { SMB_VFS_OP_REWINDDIR, "rewinddir" },
{ SMB_VFS_OP_MKDIR, "mkdir" },
{ SMB_VFS_OP_RMDIR, "rmdir" },
{ SMB_VFS_OP_CLOSEDIR, "closedir" },
}
for (i=0; i<SMB_VFS_OP_LAST; i++) {
+ if (vfs_op_names[i].name == NULL) {
+ smb_panic("vfs_full_audit.c: name table not "
+ "in sync with vfs.h\n");
+ }
+
if (strequal(*ops, vfs_op_names[i].name)) {
bitmap_set(*bm, i);
found = True;
return result;
}
+static int smb_full_audit_get_shadow_copy_data(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ SHADOW_COPY_DATA *shadow_copy_data, BOOL labels)
+{
+ int result;
+
+ result = SMB_VFS_NEXT_GET_SHADOW_COPY_DATA(handle, fsp, shadow_copy_data, labels);
+
+ do_log(SMB_VFS_OP_GET_SHADOW_COPY_DATA, (result >= 0), handle, "");
+
+ return result;
+}
+
static DIR *smb_full_audit_opendir(vfs_handle_struct *handle, connection_struct *conn,
const char *fname)
{
return result;
}
-static struct dirent *smb_full_audit_readdir(vfs_handle_struct *handle,
+static SMB_STRUCT_DIRENT *smb_full_audit_readdir(vfs_handle_struct *handle,
connection_struct *conn, DIR *dirp)
{
- struct dirent *result;
+ SMB_STRUCT_DIRENT *result;
result = SMB_VFS_NEXT_READDIR(handle, conn, dirp);
return result;
}
+static void smb_full_audit_seekdir(vfs_handle_struct *handle, connection_struct *conn,
+ DIR *dirp, long offset)
+{
+ SMB_VFS_NEXT_SEEKDIR(handle, conn, dirp, offset);
+
+ do_log(SMB_VFS_OP_SEEKDIR, True, handle, "");
+ return;
+}
+
+static long smb_full_audit_telldir(vfs_handle_struct *handle, connection_struct *conn,
+ DIR *dirp)
+{
+ long result;
+
+ result = SMB_VFS_NEXT_TELLDIR(handle, conn, dirp);
+
+ do_log(SMB_VFS_OP_OPENDIR, True, handle, "");
+
+ return result;
+}
+
+static void smb_full_audit_rewinddir(vfs_handle_struct *handle, connection_struct *conn,
+ DIR *dirp)
+{
+ SMB_VFS_NEXT_REWINDDIR(handle, conn, dirp);
+
+ do_log(SMB_VFS_OP_REWINDDIR, True, handle, "");
+ return;
+}
+
static int smb_full_audit_mkdir(vfs_handle_struct *handle, connection_struct *conn,
const char *path, mode_t mode)
{
}
static int smb_full_audit_rename(vfs_handle_struct *handle, connection_struct *conn,
- const char *old, const char *new)
+ const char *oldname, const char *newname)
{
int result;
- result = SMB_VFS_NEXT_RENAME(handle, conn, old, new);
+ result = SMB_VFS_NEXT_RENAME(handle, conn, oldname, newname);
- do_log(SMB_VFS_OP_RENAME, (result >= 0), handle, "%s|%s", old, new);
+ do_log(SMB_VFS_OP_RENAME, (result >= 0), handle, "%s|%s", oldname, newname);
return result;
}