suricata
util-privs.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SC_CAP_NONE   0x01
 
#define SC_CAP_SYS_ADMIN   0x02
 
#define SC_CAP_SYS_RAW_IO   0x04
 
#define SC_CAP_IPC_LOCK   0x08
 
#define SC_CAP_NET_ADMIN   0x10
 
#define SC_CAP_NET_RAW   0x20
 
#define SC_CAP_NET_BIND_SERVICE   0x40
 
#define SC_CAP_NET_BROADCAST   0x80
 
#define SCDropCaps(...)
 
#define SCDropMainThreadCaps(...)
 
#define SCPledge(...)
 

Functions

void SCGetUserID (const char *, const char *, uint32_t *, uint32_t *)
 Function to get the user and group ID from the specified user name. More...
 
void SCGetGroupID (const char *, uint32_t *)
 Function to get the group ID from the specified group name. More...
 

Detailed Description

Macro Definition Documentation

◆ SC_CAP_IPC_LOCK

#define SC_CAP_IPC_LOCK   0x08

Definition at line 31 of file util-privs.h.

◆ SC_CAP_NET_ADMIN

#define SC_CAP_NET_ADMIN   0x10

Definition at line 32 of file util-privs.h.

◆ SC_CAP_NET_BIND_SERVICE

#define SC_CAP_NET_BIND_SERVICE   0x40

Definition at line 34 of file util-privs.h.

◆ SC_CAP_NET_BROADCAST

#define SC_CAP_NET_BROADCAST   0x80

Definition at line 35 of file util-privs.h.

◆ SC_CAP_NET_RAW

#define SC_CAP_NET_RAW   0x20

Definition at line 33 of file util-privs.h.

◆ SC_CAP_NONE

#define SC_CAP_NONE   0x01

Definition at line 28 of file util-privs.h.

◆ SC_CAP_SYS_ADMIN

#define SC_CAP_SYS_ADMIN   0x02

Definition at line 29 of file util-privs.h.

◆ SC_CAP_SYS_RAW_IO

#define SC_CAP_SYS_RAW_IO   0x04

Definition at line 30 of file util-privs.h.

◆ SCDropCaps

#define SCDropCaps (   ...)

Definition at line 90 of file util-privs.h.

◆ SCDropMainThreadCaps

#define SCDropMainThreadCaps (   ...)

Definition at line 91 of file util-privs.h.

◆ SCPledge

#define SCPledge (   ...)

Definition at line 100 of file util-privs.h.

Function Documentation

◆ SCGetGroupID()

void SCGetGroupID ( const char *  group_name,
uint32_t *  gid 
)

Function to get the group ID from the specified group name.

Parameters
group_namepointer to the given group name
gidpointer to the group id in which result will be stored
Return values
FatalErroron a failure

Definition at line 217 of file util-privs.c.

References ByteExtractStringUint32(), FatalError, and group.

Here is the call graph for this function:

◆ SCGetUserID()

void SCGetUserID ( const char *  user_name,
const char *  group_name,
uint32_t *  uid,
uint32_t *  gid 
)

Function to get the user and group ID from the specified user name.

Parameters
user_namepointer to the given user name
uidpointer to the user id in which result will be stored
gidpointer to the group id in which result will be stored
Return values
FatalErroron a failure

Definition at line 150 of file util-privs.c.

References ByteExtractStringUint32(), FatalError, and group.

Here is the call graph for this function: