summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_time_audit.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/modules/vfs_time_audit.c')
-rw-r--r--source3/modules/vfs_time_audit.c357
1 files changed, 0 insertions, 357 deletions
diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c
index 9b42ec9d2d..4a400bd17d 100644
--- a/source3/modules/vfs_time_audit.c
+++ b/source3/modules/vfs_time_audit.c
@@ -1680,88 +1680,6 @@ static int smb_time_audit_fchmod_acl(vfs_handle_struct *handle,
return result;
}
-static int smb_time_audit_sys_acl_get_entry(vfs_handle_struct *handle,
- SMB_ACL_T theacl, int entry_id,
- SMB_ACL_ENTRY_T *entry_p)
-{
- int result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_SYS_ACL_GET_ENTRY(handle, theacl, entry_id,
- entry_p);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("sys_acl_get_entry", timediff);
- }
-
- return result;
-}
-
-static int smb_time_audit_sys_acl_get_tag_type(vfs_handle_struct *handle,
- SMB_ACL_ENTRY_T entry_d,
- SMB_ACL_TAG_T *tag_type_p)
-{
- int result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_SYS_ACL_GET_TAG_TYPE(handle, entry_d,
- tag_type_p);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("sys_acl_get_tag_type", timediff);
- }
-
- return result;
-}
-
-static int smb_time_audit_sys_acl_get_permset(vfs_handle_struct *handle,
- SMB_ACL_ENTRY_T entry_d,
- SMB_ACL_PERMSET_T *permset_p)
-{
- int result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_SYS_ACL_GET_PERMSET(handle, entry_d,
- permset_p);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("sys_acl_get_permset", timediff);
- }
-
- return result;
-}
-
-static void * smb_time_audit_sys_acl_get_qualifier(vfs_handle_struct *handle,
- SMB_ACL_ENTRY_T entry_d)
-{
- void *result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_SYS_ACL_GET_QUALIFIER(handle, entry_d);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("sys_acl_get_qualifier", timediff);
- }
-
- return result;
-}
-
static SMB_ACL_T smb_time_audit_sys_acl_get_file(vfs_handle_struct *handle,
const char *path_p,
SMB_ACL_TYPE_T type)
@@ -1801,184 +1719,6 @@ static SMB_ACL_T smb_time_audit_sys_acl_get_fd(vfs_handle_struct *handle,
return result;
}
-static int smb_time_audit_sys_acl_clear_perms(vfs_handle_struct *handle,
- SMB_ACL_PERMSET_T permset)
-{
- int result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_SYS_ACL_CLEAR_PERMS(handle, permset);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("sys_acl_clear_perms", timediff);
- }
-
- return result;
-}
-
-static int smb_time_audit_sys_acl_add_perm(vfs_handle_struct *handle,
- SMB_ACL_PERMSET_T permset,
- SMB_ACL_PERM_T perm)
-{
- int result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_SYS_ACL_ADD_PERM(handle, permset, perm);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("sys_acl_add_perm", timediff);
- }
-
- return result;
-}
-
-static char * smb_time_audit_sys_acl_to_text(vfs_handle_struct *handle,
- SMB_ACL_T theacl,
- ssize_t *plen)
-{
- char * result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_SYS_ACL_TO_TEXT(handle, theacl, plen);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("sys_acl_to_text", timediff);
- }
-
- return result;
-}
-
-static SMB_ACL_T smb_time_audit_sys_acl_init(vfs_handle_struct *handle,
- int count)
-{
- SMB_ACL_T result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_SYS_ACL_INIT(handle, count);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("sys_acl_init", timediff);
- }
-
- return result;
-}
-
-static int smb_time_audit_sys_acl_create_entry(vfs_handle_struct *handle,
- SMB_ACL_T *pacl,
- SMB_ACL_ENTRY_T *pentry)
-{
- int result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_SYS_ACL_CREATE_ENTRY(handle, pacl, pentry);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("sys_acl_create_entry", timediff);
- }
-
- return result;
-}
-
-static int smb_time_audit_sys_acl_set_tag_type(vfs_handle_struct *handle,
- SMB_ACL_ENTRY_T entry,
- SMB_ACL_TAG_T tagtype)
-{
- int result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_SYS_ACL_SET_TAG_TYPE(handle, entry,
- tagtype);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("sys_acl_set_tag_type", timediff);
- }
-
- return result;
-}
-
-static int smb_time_audit_sys_acl_set_qualifier(vfs_handle_struct *handle,
- SMB_ACL_ENTRY_T entry,
- void *qual)
-{
- int result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_SYS_ACL_SET_QUALIFIER(handle, entry, qual);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("sys_acl_set_qualifier", timediff);
- }
-
- return result;
-}
-
-static int smb_time_audit_sys_acl_set_permset(vfs_handle_struct *handle,
- SMB_ACL_ENTRY_T entry,
- SMB_ACL_PERMSET_T permset)
-{
- int result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_SYS_ACL_SET_PERMSET(handle, entry, permset);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("sys_acl_set_permset", timediff);
- }
-
- return result;
-}
-
-static int smb_time_audit_sys_acl_valid(vfs_handle_struct *handle,
- SMB_ACL_T theacl)
-{
- int result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_SYS_ACL_VALID(handle, theacl);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("sys_acl_valid", timediff);
- }
-
- return result;
-}
-
static int smb_time_audit_sys_acl_set_file(vfs_handle_struct *handle,
const char *name,
SMB_ACL_TYPE_T acltype,
@@ -2040,85 +1780,6 @@ static int smb_time_audit_sys_acl_delete_def_file(vfs_handle_struct *handle,
return result;
}
-static int smb_time_audit_sys_acl_get_perm(vfs_handle_struct *handle,
- SMB_ACL_PERMSET_T permset,
- SMB_ACL_PERM_T perm)
-{
- int result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_SYS_ACL_GET_PERM(handle, permset, perm);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("sys_acl_get_perm", timediff);
- }
-
- return result;
-}
-
-static int smb_time_audit_sys_acl_free_text(vfs_handle_struct *handle,
- char *text)
-{
- int result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_SYS_ACL_FREE_TEXT(handle, text);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("sys_acl_free_text", timediff);
- }
-
- return result;
-}
-
-static int smb_time_audit_sys_acl_free_acl(vfs_handle_struct *handle,
- SMB_ACL_T posix_acl)
-{
- int result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_SYS_ACL_FREE_ACL(handle, posix_acl);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("sys_acl_free_acl", timediff);
- }
-
- return result;
-}
-
-static int smb_time_audit_sys_acl_free_qualifier(vfs_handle_struct *handle,
- void *qualifier,
- SMB_ACL_TAG_T tagtype)
-{
- int result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_SYS_ACL_FREE_QUALIFIER(handle, qualifier,
- tagtype);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("sys_acl_free_qualifier", timediff);
- }
-
- return result;
-}
-
static ssize_t smb_time_audit_getxattr(struct vfs_handle_struct *handle,
const char *path, const char *name,
void *value, size_t size)
@@ -2382,28 +2043,10 @@ static struct vfs_fn_pointers vfs_time_audit_fns = {
.fset_nt_acl_fn = smb_time_audit_fset_nt_acl,
.chmod_acl_fn = smb_time_audit_chmod_acl,
.fchmod_acl_fn = smb_time_audit_fchmod_acl,
- .sys_acl_get_entry_fn = smb_time_audit_sys_acl_get_entry,
- .sys_acl_get_tag_type_fn = smb_time_audit_sys_acl_get_tag_type,
- .sys_acl_get_permset_fn = smb_time_audit_sys_acl_get_permset,
- .sys_acl_get_qualifier_fn = smb_time_audit_sys_acl_get_qualifier,
.sys_acl_get_file_fn = smb_time_audit_sys_acl_get_file,
.sys_acl_get_fd_fn = smb_time_audit_sys_acl_get_fd,
- .sys_acl_clear_perms_fn = smb_time_audit_sys_acl_clear_perms,
- .sys_acl_add_perm_fn = smb_time_audit_sys_acl_add_perm,
- .sys_acl_to_text_fn = smb_time_audit_sys_acl_to_text,
- .sys_acl_init_fn = smb_time_audit_sys_acl_init,
- .sys_acl_create_entry_fn = smb_time_audit_sys_acl_create_entry,
- .sys_acl_set_tag_type_fn = smb_time_audit_sys_acl_set_tag_type,
- .sys_acl_set_qualifier_fn = smb_time_audit_sys_acl_set_qualifier,
- .sys_acl_set_permset_fn = smb_time_audit_sys_acl_set_permset,
- .sys_acl_valid_fn = smb_time_audit_sys_acl_valid,
.sys_acl_set_file_fn = smb_time_audit_sys_acl_set_file,
.sys_acl_set_fd_fn = smb_time_audit_sys_acl_set_fd,
- .sys_acl_delete_def_file_fn = smb_time_audit_sys_acl_delete_def_file,
- .sys_acl_get_perm_fn = smb_time_audit_sys_acl_get_perm,
- .sys_acl_free_text_fn = smb_time_audit_sys_acl_free_text,
- .sys_acl_free_acl_fn = smb_time_audit_sys_acl_free_acl,
- .sys_acl_free_qualifier_fn = smb_time_audit_sys_acl_free_qualifier,
.getxattr_fn = smb_time_audit_getxattr,
.fgetxattr_fn = smb_time_audit_fgetxattr,
.listxattr_fn = smb_time_audit_listxattr,