Gum Utils

Gum Utils — Utility functions

Functions

Object Hierarchy


Includes

#include <gum/common/gum-utils.h>

Description

Utility functions

Functions

gum_utils_generate_nonce ()

gchar *
gum_utils_generate_nonce (GChecksumType algorithm);

Generates nonce based on hashing algorithm as specified in algorithm

Parameters

algorithm

the GChecksumType algorithm

 

Returns

generate nonce if successful, NULL otherwise.

[transfer full]


gum_utils_drop_privileges ()

void
gum_utils_drop_privileges ();

Drops the privileges for the calling process. Effective uid is to real uid.


gum_utils_gain_privileges ()

void
gum_utils_gain_privileges ();

Gains the privileges for the calling process. Effective uid is to 0.


gum_utils_run_user_scripts ()

gboolean
gum_utils_run_user_scripts (const gchar *script_dir,
                            const gchar *username,
                            uid_t uid,
                            gid_t gid,
                            const gchar *homedir,
                            const gchar *usertype);

Runs the user scripts in sorted order.

Parameters

script_dir

path to the scripts directory

 

username

name of the user

 

uid

uid of the user

 

gid

gid of the user

 

homedir

home directory of the user

 

usertype

type of the user

 

Returns

TRUE if successful, FALSE otherwise


gum_utils_run_group_scripts ()

gboolean
gum_utils_run_group_scripts (const gchar *script_dir,
                             const gchar *groupname,
                             gid_t gid,
                             uid_t uid);

Runs the group scripts in sorted order.

Parameters

script_dir

path to the scripts directory

 

groupname

name of the group

 

gid

gid of the group

 

uid

uid of the calling process

 

Returns

TRUE if successful, FALSE otherwise

Types and Values