HEX
Server: Apache
System: Linux dinesh8149 5.15.98-grsec-sharedvalley-2.lc.el8.x86_64 #1 SMP Thu Mar 9 09:07:30 -03 2023 x86_64
User: usesambura1 (1212012)
PHP: 7.0.33
Disabled: apache_child_terminate,dl,escapeshellarg,escapeshellcmd,exec,link,mail,openlog,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,php_check_syntax,php_strip_whitespace,popen,proc_close,proc_open,shell_exec,symlink,system
Upload Files
File: //usr/share/makedumpfile/eppic_scripts/dir_names_3_14_to_4_8.c
string
vfs_opt()
{
	    return "l";
}

string
vfs_usage()
{
	    return "\n";
}

static void
vfs_showusage()
{
	    printf("usage : vfs %s", vfs_usage());
}

string
vfs_help()
{
	    return "Help";
}

void
rm_names(struct dentry *dir)
{
	struct list_head *next, *head;
	unsigned int hash_len;
	int i;

	memset(dir->d_iname, 0, 0x20);
	hash_len = *((unsigned int *)&dir->d_name);
	memset(dir->d_name.name, 0, hash_len);

	head = (struct list_head *)&(dir->d_subdirs);
	next = (struct list_head *)dir->d_subdirs.next;

	while (next != head)
	{
		struct dentry *child, *off = 0;

		child = (struct dentry *)((unsigned long)next - (unsigned long)&(off->d_child));
		rm_names(child);
		next = child->d_child.next;
	}

	return;
}

int
vfs()
{
	int i;
	struct hlist_bl_head *tab;
	unsigned int d_hash_size = d_hash_mask;

	tab = (struct hlist_bl_head *)dentry_hashtable;

	for (i = 0; i < d_hash_size; i++)
	{
		struct hlist_bl_head *head;
		struct hlist_bl_node *head_node, *next;

		head = (struct hlist_bl_head *) (tab + i);
		head_node = head->first;
		if (!head_node)
			continue;

		next = head_node;

		while (next)
		{
			struct dentry *root, *off = 0;

			root = (struct dentry *)((unsigned long)next - (unsigned long)&(off->d_hash));
			rm_names(root);
			next = next->next;
		}
	}
	return 1;
}