[ 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-1572
/
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,577 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
54,239 B
SET
[ EDIT ]
|
[ DEL ]
📄 file_contexts.h
2,926 B
SET
[ EDIT ]
|
[ DEL ]
📄 file_contexts_priv.h
5,463 B
SET
[ EDIT ]
|
[ DEL ]
📄 file_handle_tools.h
2,287 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
5,980 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,331 B
SET
[ EDIT ]
|
[ DEL ]
📄 si_fp_properties.h
858 B
SET
[ EDIT ]
|
[ DEL ]
📄 si_fp_properties_x.h
17,177 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,253 B
SET
[ EDIT ]
|
[ DEL ]
📄 si_templates.h
2,452 B
SET
[ EDIT ]
|
[ DEL ]
📄 si_writer.h
7,101 B
SET
[ EDIT ]
|
[ DEL ]
📄 si_writer_common.h
12,561 B
SET
[ EDIT ]
|
[ DEL ]
📄 stringify.h
261 B
SET
[ EDIT ]
|
[ DEL ]
📄 task_info_map.c
14,965 B
SET
[ EDIT ]
|
[ DEL ]
📄 task_info_map.h
6,481 B
SET
[ EDIT ]
|
[ DEL ]
📄 task_info_map_common.h
4,248 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_path_tools.h
/** @file file_path_tools.h @brief Tools for creating and working with file paths @details Copyright (c) 2024 Acronis International GmbH @author Denis Kopyrin (denis.kopyrin@acronis.com) @since $Id: $ */ #pragma once #include "compat.h" #include "memory.h" #include "si_common.h" typedef struct { char* buf; SiSizedString str; } path_info_t; // init_empty initialize message enough so 'free' can work static inline void path_info_init_empty(path_info_t* info) { info->buf = NULL; } static inline long path_info_make_with_alloc_flags(path_info_t* info, const struct path* path, bool dir, bool nowait) { long ret = -EFAULT; char* str; info->buf = (char*) kmem_cache_alloc(names_cachep, mem_flags(nowait)); if (!info->buf) { goto err; } str = d_absolute_path_compat(path, info->buf, PATH_MAX - (dir ? 1 : 0)); if (IS_ERR(str)) { ret = PTR_ERR(str); kmem_cache_free(names_cachep, info->buf); info->buf = NULL; goto err; } info->str.value = str; info->str.length = strlen(info->str.value); if (dir) { if (str[info->str.length - 1] != '/') { str[info->str.length] = '/'; str[info->str.length + 1] = '\0'; info->str.length++; } } return 0; err: info->str = (SiSizedString) {}; return ret; } static inline long path_info_make(path_info_t* info, const struct path* path, bool dir) { return path_info_make_with_alloc_flags(info, path, dir, false /*nowait*/); } static inline long path_info_make_nowait(path_info_t* info, const struct path* path, bool dir) { return path_info_make_with_alloc_flags(info, path, dir, true /*nowait*/); } static inline long path_info_make_from_valid(path_info_t* info, const struct path* path) { return path_info_make_with_alloc_flags(info, path, S_ISDIR(path->dentry->d_inode->i_mode), false /*nowait*/); } static inline long path_info_make_from_valid_nowait(path_info_t* info, const struct path* path) { return path_info_make_with_alloc_flags(info, path, S_ISDIR(path->dentry->d_inode->i_mode), true /*nowait*/); } static inline void path_info_free(const path_info_t* info) { if (info->buf) { kmem_cache_free(names_cachep, info->buf); } }