fail if we get a bad owner/group
CVS patchset: 1462 CVS date: 1997/02/27 04:32:38
This commit is contained in:
parent
b40b26d020
commit
cdc098cb40
|
@ -240,6 +240,10 @@ int process_filelist(Header header, struct PackageRec *pr,
|
|||
stat(filename, &fest->statbuf);
|
||||
fest->uname = getUname(fest->statbuf.st_uid);
|
||||
fest->gname = getGname(fest->statbuf.st_gid);
|
||||
if (! (fest->uname && fest->gname)) {
|
||||
rpmError(RPMERR_BADSPEC, "Bad owner/group: %s", filename);
|
||||
return(RPMERR_BADSPEC);
|
||||
}
|
||||
strcpy(fest->file, filename);
|
||||
fest->next = fes;
|
||||
fes = fest;
|
||||
|
@ -598,6 +602,11 @@ static int add_file(struct file_entry **festack, const char *name,
|
|||
p->gname = getGname(p->statbuf.st_gid);
|
||||
}
|
||||
|
||||
if (! (p->uname && p->gname)) {
|
||||
fprintf(stderr, "Bad owner/group: %s\n", fullname);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ((! isdir) && S_ISDIR(p->statbuf.st_mode)) {
|
||||
/* This means we need to descend with ftw() */
|
||||
Gcount = 0;
|
||||
|
|
Loading…
Reference in New Issue