[ SYSTEM ]: Linux srv.persadacompanies.com 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64
[ SERVER ]: Apache | PHP: 8.4.19
[ USER ]: persadamedika | IP: 45.64.1.108
GEFORCE FILE MANAGER
/
usr
/
src
/
file_protector-1.1-1583
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📁 common
SET
[ DEL ]
📁 ftrace_hooks
SET
[ DEL ]
📁 lsm_hooks
SET
[ DEL ]
📁 syscall_hooks
SET
[ DEL ]
📁 transport
SET
[ DEL ]
📄 Kbuild
10,535 B
SET
[ EDIT ]
|
[ DEL ]
📄 Makefile
2,282 B
SET
[ EDIT ]
|
[ DEL ]
📄 compat.c
8,625 B
SET
[ EDIT ]
|
[ DEL ]
📄 compat.h
12,265 B
SET
[ EDIT ]
|
[ DEL ]
📄 debug.h
3,649 B
SET
[ EDIT ]
|
[ DEL ]
📄 dkms.conf
146 B
SET
[ EDIT ]
|
[ DEL ]
📄 file_contexts.c
61,880 B
SET
[ EDIT ]
|
[ DEL ]
📄 file_contexts.h
6,360 B
SET
[ EDIT ]
|
[ DEL ]
📄 file_contexts_priv.h
5,615 B
SET
[ EDIT ]
|
[ DEL ]
📄 file_handle_tools.h
2,590 B
SET
[ EDIT ]
|
[ DEL ]
📄 file_key_tools.h
950 B
SET
[ EDIT ]
|
[ DEL ]
📄 file_path_tools.h
2,140 B
SET
[ EDIT ]
|
[ DEL ]
📄 hashtable_compat.h
2,798 B
SET
[ EDIT ]
|
[ DEL ]
📄 hook_trampoline_common.h
4,395 B
SET
[ EDIT ]
|
[ DEL ]
📄 interval_tree.h
779 B
SET
[ EDIT ]
|
[ DEL ]
📄 memory.c
3,393 B
SET
[ EDIT ]
|
[ DEL ]
📄 memory.h
3,059 B
SET
[ EDIT ]
|
[ DEL ]
📄 module.c
2,739 B
SET
[ EDIT ]
|
[ DEL ]
📄 module_ref.h
421 B
SET
[ EDIT ]
|
[ DEL ]
📄 module_rundown_protection.c
3,731 B
SET
[ EDIT ]
|
[ DEL ]
📄 module_rundown_protection.h
743 B
SET
[ EDIT ]
|
[ DEL ]
📄 path_tools.h
6,209 B
SET
[ EDIT ]
|
[ DEL ]
📄 rundown_protection.c
4,301 B
SET
[ EDIT ]
|
[ DEL ]
📄 rundown_protection.h
2,899 B
SET
[ EDIT ]
|
[ DEL ]
📄 safe_kobject.h
1,315 B
SET
[ EDIT ]
|
[ DEL ]
📄 si_common.h
4,400 B
SET
[ EDIT ]
|
[ DEL ]
📄 si_fp_properties.h
858 B
SET
[ EDIT ]
|
[ DEL ]
📄 si_fp_properties_x.h
18,970 B
SET
[ EDIT ]
|
[ DEL ]
📄 si_fp_value_types.h
515 B
SET
[ EDIT ]
|
[ DEL ]
📄 si_fp_value_types_x.h
1,279 B
SET
[ EDIT ]
|
[ DEL ]
📄 si_size.h
4,364 B
SET
[ EDIT ]
|
[ DEL ]
📄 si_templates.h
3,066 B
SET
[ EDIT ]
|
[ DEL ]
📄 si_writer.h
7,704 B
SET
[ EDIT ]
|
[ DEL ]
📄 si_writer_common.h
14,984 B
SET
[ EDIT ]
|
[ DEL ]
📄 stringify.h
261 B
SET
[ EDIT ]
|
[ DEL ]
📄 task_info_map.c
17,506 B
SET
[ EDIT ]
|
[ DEL ]
📄 task_info_map.h
6,481 B
SET
[ EDIT ]
|
[ DEL ]
📄 task_tools.h
1,370 B
SET
[ EDIT ]
|
[ DEL ]
📄 tracepoints.c
3,668 B
SET
[ EDIT ]
|
[ DEL ]
📄 tracepoints.h
299 B
SET
[ EDIT ]
|
[ DEL ]
📄 write_protection.h
2,257 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: file_handle_tools.h
/** @file file_handle_tools.h @brief Tools for creating and working with file handles @details Copyright (c) 2024 Acronis International GmbH @author Bruce Wang (bruce.wang@acronis.com) @since $Id: $ */ #pragma once #include "compat.h" #include "memory.h" typedef struct { uint32_t handle_bytes; int handle_type; int mnt_id; unsigned char* f_handle; } file_handle_info_t; #ifndef BPF_PROGRAM // init_empty initialize message enough so 'free' can work static inline void file_handle_info_init_empty(file_handle_info_t* info) { info->f_handle = NULL; } #ifndef FILEID_INVALID #define FILEID_INVALID 0xff #endif // It is a bit counterintuitive but 'info->mnt_id' is always filled in despite the return value. // If 'f_handle' is non-null, it can be used static inline int file_handle_info_make_with_alloc_flags(file_handle_info_t* info, const struct path *path, bool nowait) { int dwords = MAX_HANDLE_SZ >> 2; struct dentry *dentry = path->dentry; struct vfsmount* mnt = path->mnt; info->mnt_id = mnt ? get_mnt_id(mnt) : 0; info->f_handle = NULL; info->handle_bytes = 0; #ifdef HAVE_EXPORTFS_ENCODE_INODE_FH if (!dentry || !dentry->d_inode || !dentry->d_inode->i_sb || !dentry->d_inode->i_sb->s_export_op) { return -EFAULT; } #else if (!dentry || !dentry->d_sb || !dentry->d_sb->s_export_op) { return -EFAULT; } #endif info->f_handle = kmem_cache_alloc(g_handles_cache, mem_flags(nowait)); if (!info->f_handle) { return -ENOMEM; } // Returns an enum fid_type or a negative on errno. info->handle_type = exportfs_encode_fh(dentry, (struct fid *)info->f_handle, &dwords, 0); // original codes are here: https://elixir.bootlin.com/linux/v6.16.1/source/fs/fhandle.c#L64 if (info->handle_type < 0 || info->handle_type == FILEID_INVALID) { goto err; } info->handle_bytes = dwords * sizeof(u32); if (info->handle_bytes > MAX_HANDLE_SZ) { info->handle_bytes = MAX_HANDLE_SZ; } return 0; err: kmem_cache_free(g_handles_cache, info->f_handle); info->f_handle = NULL; info->handle_bytes = 0; return info->handle_type; } static inline int file_handle_info_make(file_handle_info_t* info, const struct path *path) { return file_handle_info_make_with_alloc_flags(info, path, false /*nowait*/); } static inline int file_handle_info_make_nowait(file_handle_info_t* info, const struct path *path) { return file_handle_info_make_with_alloc_flags(info, path, true /*nowait*/); } static inline void file_handle_info_free(file_handle_info_t* info) { if (info->f_handle) { kmem_cache_free(g_handles_cache, info->f_handle); } } #endif