suricata
util-privs.c File Reference
#include <grp.h>
#include <pwd.h>
#include "suricata-common.h"
#include "util-debug.h"
#include "suricata.h"
#include "util-privs.h"
Include dependency graph for util-privs.c:

Go to the source code of this file.

Functions

int 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...
 
int 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

int 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
uponsuccess it return 0

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

References group, SC_ERR_GID_FAILED, and SCLogError.

Referenced by RegisterAllModules().

Here is the caller graph for this function:

int 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
uponsuccess it return 0

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

References group, SC_ERR_GID_FAILED, SC_ERR_UID_FAILED, and SCLogError.

Referenced by RegisterAllModules().

Here is the caller graph for this function: