FreeBSD kernel kern code
kern_loginclass.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/eventhandler.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/loginclass.h>
#include <sys/malloc.h>
#include <sys/types.h>
#include <sys/priv.h>
#include <sys/proc.h>
#include <sys/queue.h>
#include <sys/racct.h>
#include <sys/rctl.h>
#include <sys/refcount.h>
#include <sys/rwlock.h>
#include <sys/sysproto.h>
#include <sys/systm.h>
Include dependency graph for kern_loginclass.c:

Go to the source code of this file.

Data Structures

struct  getloginclass_args
 
struct  setloginclass_args
 

Functions

 __FBSDID ("$FreeBSD$")
 
static MALLOC_DEFINE (M_LOGINCLASS, "loginclass", "loginclass structures")
 
 LIST_HEAD (loginclass)
 
void loginclass_free (struct loginclass *lc)
 
static struct loginclass * loginclass_lookup (const char *name)
 
struct loginclass * loginclass_find (const char *name)
 
int sys_getloginclass (struct thread *td, struct getloginclass_args *uap)
 
int sys_setloginclass (struct thread *td, struct setloginclass_args *uap)
 
void loginclass_racct_foreach (void(*callback)(struct racct *racct, void *arg2, void *arg3), void(*pre)(void), void(*post)(void), void *arg2, void *arg3)
 

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ LIST_HEAD()

LIST_HEAD ( loginclass  )

Definition at line 68 of file kern_loginclass.c.

◆ loginclass_find()

struct loginclass * loginclass_find ( const char *  name)

Definition at line 131 of file kern_loginclass.c.

References free(), lc, loginclass_lookup(), malloc(), and name.

Referenced by proc0_init(), and sys_setloginclass().

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

◆ loginclass_free()

void loginclass_free ( struct loginclass *  lc)

Definition at line 84 of file kern_loginclass.c.

References free(), and lc.

Referenced by crfree_final(), and sys_setloginclass().

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

◆ loginclass_lookup()

static struct loginclass * loginclass_lookup ( const char *  name)
static

Definition at line 109 of file kern_loginclass.c.

References lc, and name.

Referenced by loginclass_find().

Here is the caller graph for this function:

◆ loginclass_racct_foreach()

void loginclass_racct_foreach ( void(*)(struct racct *racct, void *arg2, void *arg3)  callback,
void(*)(void)  pre,
void(*)(void)  post,
void *  arg2,
void *  arg3 
)

Definition at line 247 of file kern_loginclass.c.

References callback, and lc.

◆ MALLOC_DEFINE()

static MALLOC_DEFINE ( M_LOGINCLASS  ,
"loginclass"  ,
"loginclass structures"   
)
static

◆ sys_getloginclass()

int sys_getloginclass ( struct thread *  td,
struct getloginclass_args uap 
)

Definition at line 185 of file kern_loginclass.c.

References lc, getloginclass_args::namebuf, and getloginclass_args::namelen.

◆ sys_setloginclass()

int sys_setloginclass ( struct thread *  td,
struct setloginclass_args uap 
)

Definition at line 207 of file kern_loginclass.c.

References crcopysafe(), crfree(), crget(), crhold(), loginclass_find(), loginclass_free(), setloginclass_args::namebuf, priv_check(), and proc_set_cred().

Here is the call graph for this function: