From 9e7cfa4d5ba64baf63c604426805a71671c58544 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Fri, 4 Jul 2008 16:09:42 +0300 Subject: Stuff rpmio/ugid.[ch] contents to lib/misc.[ch] - no uses outside librpm itself, and there they can be hidden away from exported ABI whereas in librpmio they cant --- lib/misc.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lib/misc.h') diff --git a/lib/misc.h b/lib/misc.h index 4029d9899..0f0c81ca5 100644 --- a/lib/misc.h +++ b/lib/misc.h @@ -22,6 +22,19 @@ extern "C" { */ rpmRC rpmMkdirPath (const char * dpath, const char * dname); +/* + * These may be called w/ a NULL argument to flush the cache -- they return + * -1 if the user can't be found. + */ +int unameToUid(const char * thisUname, uid_t * uid); +int gnameToGid(const char * thisGname, gid_t * gid); + +/* + * Call w/ -1 to flush the cache, returns NULL if the user can't be found. + */ +const char * uidToUname(uid_t uid); +const char * gidToGname(gid_t gid); + #ifdef __cplusplus } #endif -- cgit v1.2.3