diff options
author | root <devnull@localhost> | 1997-02-27 04:32:38 +0000 |
---|---|---|
committer | root <devnull@localhost> | 1997-02-27 04:32:38 +0000 |
commit | cdc098cb403643b08384b66b8acec5e9430ec098 (patch) | |
tree | 7fdf3c908542984124340475f21de13c322149f7 /build/files.c | |
parent | b40b26d0200d676a8aa6427f82a3e9c12765b060 (diff) | |
download | librpm-tizen-cdc098cb403643b08384b66b8acec5e9430ec098.tar.gz librpm-tizen-cdc098cb403643b08384b66b8acec5e9430ec098.tar.bz2 librpm-tizen-cdc098cb403643b08384b66b8acec5e9430ec098.zip |
fail if we get a bad owner/group
CVS patchset: 1462
CVS date: 1997/02/27 04:32:38
Diffstat (limited to 'build/files.c')
-rw-r--r-- | build/files.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/build/files.c b/build/files.c index 444794bd5..da661f909 100644 --- a/build/files.c +++ b/build/files.c @@ -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; |