FreeBSD kernel kern code
vfs_extattr.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/capsicum.h>
#include <sys/lock.h>
#include <sys/mount.h>
#include <sys/mutex.h>
#include <sys/sysproto.h>
#include <sys/fcntl.h>
#include <sys/namei.h>
#include <sys/filedesc.h>
#include <sys/limits.h>
#include <sys/vnode.h>
#include <sys/proc.h>
#include <sys/extattr.h>
#include <security/audit/audit.h>
#include <security/mac/mac_framework.h>
Include dependency graph for vfs_extattr.c:

Go to the source code of this file.

Data Structures

struct  extattrctl_args
 
struct  extattr_set_fd_args
 
struct  extattr_set_file_args
 
struct  extattr_set_link_args
 
struct  extattr_get_fd_args
 
struct  extattr_get_file_args
 
struct  extattr_get_link_args
 
struct  extattr_delete_fd_args
 
struct  extattr_delete_file_args
 
struct  extattr_delete_link_args
 
struct  extattr_list_fd_args
 
struct  extattr_list_file_args
 
struct  extattr_list_link_args
 

Functions

 __FBSDID ("$FreeBSD$")
 
static int kern_extattr_set_path (struct thread *td, const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes, int follow)
 
static int kern_extattr_get_path (struct thread *td, const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes, int follow)
 
static int kern_extattr_delete_path (struct thread *td, const char *path, int attrnamespace, const char *attrname, int follow)
 
static int kern_extattr_list_path (struct thread *td, const char *path, int attrnamespace, void *data, size_t nbytes, int follow)
 
int sys_extattrctl (struct thread *td, struct extattrctl_args *uap)
 
static int extattr_set_vp (struct vnode *vp, int attrnamespace, const char *attrname, void *data, size_t nbytes, struct thread *td)
 
int sys_extattr_set_fd (struct thread *td, struct extattr_set_fd_args *uap)
 
int sys_extattr_set_file (struct thread *td, struct extattr_set_file_args *uap)
 
int sys_extattr_set_link (struct thread *td, struct extattr_set_link_args *uap)
 
static int extattr_get_vp (struct vnode *vp, int attrnamespace, const char *attrname, void *data, size_t nbytes, struct thread *td)
 
int sys_extattr_get_fd (struct thread *td, struct extattr_get_fd_args *uap)
 
int sys_extattr_get_file (struct thread *td, struct extattr_get_file_args *uap)
 
int sys_extattr_get_link (struct thread *td, struct extattr_get_link_args *uap)
 
static int extattr_delete_vp (struct vnode *vp, int attrnamespace, const char *attrname, struct thread *td)
 
int sys_extattr_delete_fd (struct thread *td, struct extattr_delete_fd_args *uap)
 
int sys_extattr_delete_file (struct thread *td, struct extattr_delete_file_args *uap)
 
int sys_extattr_delete_link (struct thread *td, struct extattr_delete_link_args *uap)
 
static int extattr_list_vp (struct vnode *vp, int attrnamespace, void *data, size_t nbytes, struct thread *td)
 
int sys_extattr_list_fd (struct thread *td, struct extattr_list_fd_args *uap)
 
struct extattr_list_file_args sys_extattr_list_file (struct thread *td, struct extattr_list_file_args *uap)
 
int sys_extattr_list_link (struct thread *td, struct extattr_list_link_args *uap)
 

Variables

const char * path
 
int attrnamespace
 
void * data
 
size_t nbytes
 
struct extattr_list_link_args sys_extattr_list_file
 

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ extattr_delete_vp()

static int extattr_delete_vp ( struct vnode *  vp,
int  attrnamespace,
const char *  attrname,
struct thread *  td 
)
static

Definition at line 494 of file vfs_extattr.c.

References attrnamespace, vn_finished_write(), and vn_start_write().

Referenced by kern_extattr_delete_path(), and sys_extattr_delete_fd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ extattr_get_vp()

static int extattr_get_vp ( struct vnode *  vp,
int  attrnamespace,
const char *  attrname,
void *  data,
size_t  nbytes,
struct thread *  td 
)
static

Definition at line 329 of file vfs_extattr.c.

References attrnamespace, data, and nbytes.

Referenced by kern_extattr_get_path(), and sys_extattr_get_fd().

Here is the caller graph for this function:

◆ extattr_list_vp()

static int extattr_list_vp ( struct vnode *  vp,
int  attrnamespace,
void *  data,
size_t  nbytes,
struct thread *  td 
)
static

Definition at line 624 of file vfs_extattr.c.

References attrnamespace, data, and nbytes.

Referenced by kern_extattr_list_path(), and sys_extattr_list_fd().

Here is the caller graph for this function:

◆ extattr_set_vp()

static int extattr_set_vp ( struct vnode *  vp,
int  attrnamespace,
const char *  attrname,
void *  data,
size_t  nbytes,
struct thread *  td 
)
static

Definition at line 173 of file vfs_extattr.c.

References attrnamespace, data, nbytes, vn_finished_write(), and vn_start_write().

Referenced by kern_extattr_set_path(), and sys_extattr_set_fd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kern_extattr_delete_path()

static int kern_extattr_delete_path ( struct thread *  td,
const char *  path,
int  attrnamespace,
const char *  attrname,
int  follow 
)
static

Definition at line 589 of file vfs_extattr.c.

References attrnamespace, extattr_delete_vp(), namei(), NDFREE(), path, and vrele().

Referenced by sys_extattr_delete_file(), and sys_extattr_delete_link().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kern_extattr_get_path()

static int kern_extattr_get_path ( struct thread *  td,
const char *  path,
int  attrnamespace,
const char *  attrname,
void *  data,
size_t  nbytes,
int  follow 
)
static

Definition at line 457 of file vfs_extattr.c.

References attrnamespace, data, extattr_get_vp(), namei(), nbytes, NDFREE(), path, and vrele().

Referenced by sys_extattr_get_file(), and sys_extattr_get_link().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kern_extattr_list_path()

static int kern_extattr_list_path ( struct thread *  td,
const char *  path,
int  attrnamespace,
void *  data,
size_t  nbytes,
int  follow 
)
static

Definition at line 738 of file vfs_extattr.c.

References attrnamespace, data, extattr_list_vp(), namei(), nbytes, NDFREE(), path, and vrele().

Referenced by sys_extattr_list_link().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kern_extattr_set_path()

static int kern_extattr_set_path ( struct thread *  td,
const char *  path,
int  attrnamespace,
const char *  attrname,
void *  data,
size_t  nbytes,
int  follow 
)
static

Definition at line 292 of file vfs_extattr.c.

References attrnamespace, data, extattr_set_vp(), namei(), nbytes, NDFREE(), path, and vrele().

Referenced by sys_extattr_set_file(), and sys_extattr_set_link().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_extattr_delete_fd()

int sys_extattr_delete_fd ( struct thread *  td,
struct extattr_delete_fd_args uap 
)

Definition at line 533 of file vfs_extattr.c.

References extattr_delete_fd_args::attrname, extattr_delete_fd_args::attrnamespace, extattr_delete_vp(), extattr_delete_fd_args::fd, and getvnode_path().

Here is the call graph for this function:

◆ sys_extattr_delete_file()

int sys_extattr_delete_file ( struct thread *  td,
struct extattr_delete_file_args uap 
)

◆ sys_extattr_delete_link()

int sys_extattr_delete_link ( struct thread *  td,
struct extattr_delete_link_args uap 
)

◆ sys_extattr_get_fd()

int sys_extattr_get_fd ( struct thread *  td,
struct extattr_get_fd_args uap 
)

◆ sys_extattr_get_file()

int sys_extattr_get_file ( struct thread *  td,
struct extattr_get_file_args uap 
)

◆ sys_extattr_get_link()

int sys_extattr_get_link ( struct thread *  td,
struct extattr_get_link_args uap 
)

◆ sys_extattr_list_fd()

int sys_extattr_list_fd ( struct thread *  td,
struct extattr_list_fd_args uap 
)

◆ sys_extattr_list_file()

struct extattr_list_file_args sys_extattr_list_file ( struct thread *  td,
struct extattr_list_file_args uap 
)

Definition at line 685 of file vfs_extattr.c.

◆ sys_extattr_list_link()

int sys_extattr_list_link ( struct thread *  td,
struct extattr_list_link_args uap 
)

◆ sys_extattr_set_fd()

int sys_extattr_set_fd ( struct thread *  td,
struct extattr_set_fd_args uap 
)

◆ sys_extattr_set_file()

int sys_extattr_set_file ( struct thread *  td,
struct extattr_set_file_args uap 
)

◆ sys_extattr_set_link()

int sys_extattr_set_link ( struct thread *  td,
struct extattr_set_link_args uap 
)

◆ sys_extattrctl()

int sys_extattrctl ( struct thread *  td,
struct extattrctl_args uap 
)

Variable Documentation

◆ attrnamespace

◆ data

◆ nbytes

◆ path

◆ sys_extattr_list_file

struct extattr_list_link_args sys_extattr_list_file