tar: cache [ug]id->username/groupname mappings. Cuts down amount

of open/read/close of /etc/passwd and /etc/group
dramatically (we were rereading those for each untarred file!!!)
This commit is contained in:
Denis Vlasenko
2006-11-24 14:57:31 +00:00
parent 4fbb584a0e
commit c50f370f98
3 changed files with 52 additions and 24 deletions

View File

@ -567,6 +567,7 @@ pid_t *find_pid_by_name(const char* procName);
pid_t *pidlist_reverse(pid_t *pidList);
void clear_username_cache(void);
const char* get_cached_username(uid_t uid);
const char* get_cached_groupname(gid_t gid);
extern const char bb_uuenc_tbl_base64[];