bb_xget[pw/gr]nam were horribly misnamed - fixed.

uidgid_get -> get_uidgid, add additional param
(numeric_ok). Make chown use it.
chown: fix "chown user: ...."
install: fix incorrect use of bb_xget[pw/gr]nam
This commit is contained in:
Denis Vlasenko
2006-12-28 05:44:47 +00:00
parent ba092336f0
commit 9a44c4f91c
12 changed files with 186 additions and 152 deletions

View File

@ -348,8 +348,8 @@ static void fileaction_dobackup(char *filename, int fileref)
static void fileaction_setowngrp(char *filename, int fileref)
{
int uid, gid;
uid = bb_xgetpwnam(rpm_getstr(TAG_FILEUSERNAME, fileref));
gid = bb_xgetgrnam(rpm_getstr(TAG_FILEGROUPNAME, fileref));
uid = xuname2uid(rpm_getstr(TAG_FILEUSERNAME, fileref));
gid = xgroup2gid(rpm_getstr(TAG_FILEGROUPNAME, fileref));
chown(filename, uid, gid);
}