summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-08-02 09:19:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:29:09 -0500
commit564e6841d60ec5ae573a707f73fcc0ab80a41394 (patch)
tree3692f3970a11227074ca6614cf89d1137e87a090 /source3/modules
parent4b15f31f106f1dd69fdda721b5c3b787f5245a80 (diff)
downloadsamba-564e6841d60ec5ae573a707f73fcc0ab80a41394.tar.gz
samba-564e6841d60ec5ae573a707f73fcc0ab80a41394.tar.bz2
samba-564e6841d60ec5ae573a707f73fcc0ab80a41394.zip
r24123: add file_id_create() to some vfs modules
metze (This used to be commit 0bc5a9cd0136f8512e963a30b6e7b009667fb0bf)
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_full_audit.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index 65748db36f..47646e248f 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -184,6 +184,8 @@ static NTSTATUS smb_full_audit_notify_watch(struct vfs_handle_struct *handle,
void *private_data, void *handle_p);
static int smb_full_audit_chflags(vfs_handle_struct *handle,
const char *path, uint flags);
+static struct file_id smb_full_audit_file_id_create(struct vfs_handle_struct *handle,
+ SMB_DEV_T dev, SMB_INO_T inode);
static size_t smb_full_audit_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
int fd, uint32 security_info,
SEC_DESC **ppdesc);
@@ -413,6 +415,8 @@ static vfs_op_tuple audit_op_tuples[] = {
SMB_VFS_LAYER_LOGGER},
{SMB_VFS_OP(smb_full_audit_chflags), SMB_VFS_OP_CHFLAGS,
SMB_VFS_LAYER_LOGGER},
+ {SMB_VFS_OP(smb_full_audit_file_id_create), SMB_VFS_OP_FILE_ID_CREATE,
+ SMB_VFS_LAYER_LOGGER},
/* NT ACL operations. */
@@ -579,6 +583,7 @@ static struct {
{ SMB_VFS_OP_REALPATH, "realpath" },
{ SMB_VFS_OP_NOTIFY_WATCH, "notify_watch" },
{ SMB_VFS_OP_CHFLAGS, "chflags" },
+ { SMB_VFS_OP_FILE_ID_CREATE, "file_id_create" },
{ SMB_VFS_OP_FGET_NT_ACL, "fget_nt_acl" },
{ SMB_VFS_OP_GET_NT_ACL, "get_nt_acl" },
{ SMB_VFS_OP_FSET_NT_ACL, "fset_nt_acl" },
@@ -1466,6 +1471,23 @@ static int smb_full_audit_chflags(vfs_handle_struct *handle,
return result;
}
+static struct file_id smb_full_audit_file_id_create(struct vfs_handle_struct *handle,
+ SMB_DEV_T dev, SMB_INO_T inode)
+{
+ struct file_id id_zero;
+ struct file_id result;
+
+ ZERO_STRUCT(id_zero);
+
+ result = SMB_VFS_NEXT_FILE_ID_CREATE(handle, dev, inode);
+
+ do_log(SMB_VFS_OP_FILE_ID_CREATE,
+ !file_id_equal(&id_zero, &result),
+ handle, "%s", file_id_static_string(&result));
+
+ 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)