ut.c File Reference

Various utility functions, mostly related to string handling. More...

#include <stdlib.h>
#include <pwd.h>
#include <grp.h>
#include "ut.h"

Include dependency graph for ut.c:

Go to the source code of this file.

Functions

int group2gid (int *gid, char *group)
 Converts a groupname into gid value.
void seed_child (unsigned int seed)
int user2uid (int *uid, int *gid, char *user)
 Converts a username into uid and gid values.

Variables

char int2str_buf [INT2STR_MAX_LEN]


Detailed Description

Various utility functions, mostly related to string handling.

Definition in file ut.c.


Function Documentation

int group2gid ( int *  gid,
char *  group 
)

Converts a groupname into gid value.

Parameters:
gid group id
group group name
Returns:
-1 on error, 0 on success

Definition at line 80 of file ut.c.

Referenced by main(), and mi_mod_init().

void seed_child ( unsigned int  seed  ) 

utility function to give each children a unique seed

Definition at line 102 of file ut.c.

Referenced by internal_fork().

int user2uid ( int *  uid,
int *  gid,
char *  user 
)

Converts a username into uid and gid values.

Parameters:
uid user id
gid group id, set to null if you don't want this
user username
Returns:
-1 on error, 0 on success

Definition at line 51 of file ut.c.

Referenced by main(), and mi_mod_init().


Variable Documentation

char int2str_buf[INT2STR_MAX_LEN]

buffer for int2str

Definition at line 41 of file ut.c.

Referenced by int2str().


Generated on Thu May 24 22:00:46 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6