s3: Fix bug 7326 -- can't write with vfs_full_audit active
authorVolker Lendecke <vl@samba.org>
Mon, 5 Apr 2010 22:16:22 +0000 (15:16 -0700)
committerKarolin Seeger <kseeger@samba.org>
Tue, 6 Apr 2010 07:13:52 +0000 (09:13 +0200)
source3/modules/vfs_full_audit.c

index ebe89ec5fd82a46aa275722eac44317914c40dc1..ac7f7a3cc87d38efcbbdecf568f33f149e7f0dea 100644 (file)
@@ -158,7 +158,7 @@ static int smb_full_audit_fstat(vfs_handle_struct *handle, files_struct *fsp,
                       SMB_STRUCT_STAT *sbuf);
 static int smb_full_audit_lstat(vfs_handle_struct *handle,
                       const char *path, SMB_STRUCT_STAT *sbuf);
-static int smb_full_audit_get_alloc_size(vfs_handle_struct *handle,
+static uint64_t smb_full_audit_get_alloc_size(vfs_handle_struct *handle,
                       files_struct *fsp, const SMB_STRUCT_STAT *sbuf);
 static int smb_full_audit_unlink(vfs_handle_struct *handle,
                        const char *path);
@@ -1396,14 +1396,14 @@ static int smb_full_audit_lstat(vfs_handle_struct *handle,
        return result;    
 }
 
-static int smb_full_audit_get_alloc_size(vfs_handle_struct *handle,
+static uint64_t smb_full_audit_get_alloc_size(vfs_handle_struct *handle,
                       files_struct *fsp, const SMB_STRUCT_STAT *sbuf)
 {
-       int result;
+       uint64_t result;
 
        result = SMB_VFS_NEXT_GET_ALLOC_SIZE(handle, fsp, sbuf);
 
-       do_log(SMB_VFS_OP_GET_ALLOC_SIZE, (result >= 0), handle, "%d", result);
+       do_log(SMB_VFS_OP_GET_ALLOC_SIZE, (result != (uint64_t)-1), handle, "%llu", result);
 
        return result;
 }