suricata
util-privs.c File Reference
#include "suricata-common.h"
#include "util-debug.h"
#include "suricata.h"
#include "util-privs.h"
#include "util-byte.h"
Include dependency graph for util-privs.c:

Go to the source code of this file.

Functions

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. More...
 
void SCGetGroupID (const char *group_name, uint32_t *gid)
 Function to get the group ID from the specified group name. More...
 

Detailed Description

Author
Gurvinder Singh gurvi.nosp@m.nder.nosp@m.singh.nosp@m.dahi.nosp@m.ya@gm.nosp@m.ail..nosp@m.com

File to drop the engine capabilities using libcap-ng by Steve Grubb

Definition in file util-privs.c.

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 208 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 141 of file util-privs.c.

References ByteExtractStringUint32(), FatalError, and group.

Here is the call graph for this function: