Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\open.c Create Date:2022-07-28 20:00:55
Last Modify:2020-03-18 10:16:03 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:ksys_chroot

Proto:int ksys_chroot(const char __user *filename)

Type:int

Parameter:

TypeParameterName
const char __user *filename
510  lookup_flags = llow links at the end | quire a directory
511  retry :
512  error = user_path_at(Special value used to indicateopenat should use the currentworking directory. , filename, lookup_flags, & path)
513  If error Then Go to out
516  error = inode_permission( Where the name belongs to - NULL is * negative , MAY_EXEC | MAY_CHDIR)
517  If error Then Go to dput_and_out
520  error = -EPERM
521  If Not ns_capable(current_user_ns(), Allow use of chroot() ) Then Go to dput_and_out
523  error = security_path_chroot( & path)
524  If error Then Go to dput_and_out
527  set_fs_root(fs, & path)
528  error = 0
529  dput_and_out :
530  path_put( & path)
531  If ry_estale - determine whether the caller should retry an operation*@error: the error that would currently be returned*@flags: flags being used for next lookup attempt* Check to see if the error code was -ESTALE, and then determine whether Then
532  lookup_flags |= ll ->d_revalidate() to trust no cache
533  Go to retry
535  out :
536  Return error
Caller
NameDescribe
init_linuxrc
handle_initrd
SYSCALL_DEFINE1