Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12:Update
rpm
unpackmode0.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File unpackmode0.diff of Package rpm
--- ./lib/fsm.c.orig 2013-06-10 15:55:10.000000000 +0000 +++ ./lib/fsm.c 2014-12-11 14:56:46.948898563 +0000 @@ -726,12 +726,18 @@ static int expandRegular(FSM_t fsm, rpmp { FD_t wfd = NULL; const struct stat * st = &fsm->sb; - rpm_loff_t left = st->st_size; + rpm_loff_t size = rpmfiFSizeIndex(fsmGetFi(fsm), fsm->ix); + rpm_loff_t left = size; const unsigned char * fidigest = NULL; pgpHashAlgo digestalgo = 0; int rc = 0; - wfd = Fopen(fsm->path, "w.ufdio"); + /* Create the file with 000 permissions. */ + { + mode_t old_umask = umask(0777); + wfd = Fopen(fsm->path, "w.ufdio"); + umask(old_umask); + } if (Ferror(wfd)) { rc = CPIOERR_OPEN_FAILED; goto exit; @@ -743,7 +749,7 @@ static int expandRegular(FSM_t fsm, rpmp fidigest = rpmfiFDigestIndex(fi, fsm->ix, NULL, NULL); } - if (st->st_size > 0 && fidigest) + if (size > 0 && fidigest) fdInitDigest(wfd, digestalgo, 0); while (left) { @@ -765,7 +771,7 @@ static int expandRegular(FSM_t fsm, rpmp rpmpsmNotify(psm, RPMCALLBACK_INST_PROGRESS, rpmcpioTell(archive)); } - if (st->st_size > 0 && fidigest) { + if (size > 0 && fidigest) { void * digest = NULL; (void) Fflush(wfd);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor