rpm
5.4.10
|
Simple user/group name/id cache (plus hostname and buildtime) More...
#include "system.h"
#include <rpmio.h>
#include <rpmiotypes.h>
#include <rpmlog.h>
#include "rpmbuild.h"
#include "debug.h"
Go to the source code of this file.
Typedefs | |
typedef const char * | ugstr_t |
Functions | |
void | freeNames (void) |
Destroy uid/gid caches. More... | |
const char * | getUname (uid_t uid) |
Return cached user name from user id. More... | |
const char * | getUnameS (const char *uname) |
Return cached user name. More... | |
uid_t | getUidS (const char *uname) |
Return cached user id. More... | |
const char * | getGname (gid_t gid) |
Return cached group name from group id. More... | |
const char * | getGnameS (const char *gname) |
Return cached group name. More... | |
gid_t | getGidS (const char *gname) |
Return cached group id. More... | |
rpmuint32_t * | getBuildTime (void) |
Return build time stamp. More... | |
const char * | buildHost (void) |
Return build hostname. More... | |
Variables | |
static uid_t | uids [1024] |
static ugstr_t | unames [1024] |
static int | uid_used = 0 |
static gid_t | gids [1024] |
static ugstr_t | gnames [1024] |
static int | gid_used = 0 |
Simple user/group name/id cache (plus hostname and buildtime)
Definition in file names.c.
const char* buildHost | ( | void | ) |
Return build hostname.
Definition at line 206 of file names.c.
References _, rpmlog(), and RPMLOG_WARNING.
Referenced by rpmlibMarkers(), and writeRPM().
void freeNames | ( | void | ) |
rpmuint32_t* getBuildTime | ( | void | ) |
Return build time stamp.
Definition at line 197 of file names.c.
Referenced by rpmlibMarkers(), and writeRPM().
gid_t getGidS | ( | const char * | gname | ) |
const char* getGname | ( | gid_t | gid | ) |
Return cached group name from group id.
gid | group id |
Definition at line 119 of file names.c.
References _, gid_used, gids, gnames, rpmlog(), RPMLOG_CRIT, and xstrdup().
Referenced by addFile(), checkOwners(), and processSourceFiles().
const char* getGnameS | ( | const char * | gname | ) |
uid_t getUidS | ( | const char * | uname | ) |
const char* getUname | ( | uid_t | uid | ) |
Return cached user name from user id.
uid | user id |
Definition at line 41 of file names.c.
References _, rpmlog(), RPMLOG_CRIT, uid_used, uids, unames, and xstrdup().
Referenced by addFile(), checkOwners(), and processSourceFiles().
const char* getUnameS | ( | const char * | uname | ) |
|
static |
Definition at line 30 of file names.c.
Referenced by freeNames(), getGidS(), getGname(), and getGnameS().
|
static |
Definition at line 26 of file names.c.
Referenced by getGidS(), getGname(), and getGnameS().
|
static |
Definition at line 28 of file names.c.
Referenced by freeNames(), getGidS(), getGname(), and getGnameS().
|
static |
Definition at line 23 of file names.c.
Referenced by freeNames(), getUidS(), getUname(), and getUnameS().
|
static |
Definition at line 19 of file names.c.
Referenced by getUidS(), getUname(), and getUnameS().
|
static |
Definition at line 21 of file names.c.
Referenced by freeNames(), getUidS(), getUname(), and getUnameS().