Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 100965 Details for
Bug 125517
CVE-2005-4889 rpm: Updates leave hardlinked copies untouched.
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh92 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Proposed patch
secu.diff (text/plain), 3.28 KB, created by
Michael Schröder
on 2004-06-08 13:57:40 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Michael Schröder
Created:
2004-06-08 13:57:40 UTC
Size:
3.28 KB
patch
obsolete
>--- ./lib/cpio.h.orig 2003-03-03 16:41:24.000000000 +0000 >+++ ./lib/cpio.h 2004-03-17 15:28:19.000000000 +0000 >@@ -61,7 +61,8 @@ > CPIO_MAP_ABSOLUTE = (1 << 5), > CPIO_MAP_ADDDOT = (1 << 6), > CPIO_ALL_HARDLINKS = (1 << 7), /*!< fail if hardlinks are missing. */ >- CPIO_MAP_TYPE = (1 << 8) /*!< only for building. */ >+ CPIO_MAP_TYPE = (1 << 8), /*!< only for building. */ >+ CPIO_SBIT_CHECK = (1 << 9) > } cpioMapFlags; > > #define CPIO_NEWC_MAGIC "070701" >--- ./lib/fsm.c.orig 2003-03-03 21:28:12.000000000 +0000 >+++ ./lib/fsm.c 2004-03-17 15:28:19.000000000 +0000 >@@ -1990,6 +2005,11 @@ > /*@notreached@*/ break; > > case FSM_UNLINK: >+ if (fsm->mapFlags & CPIO_SBIT_CHECK) { >+ struct stat stb; >+ if (Lstat(fsm->path, &stb) == 0 && S_ISREG(stb.st_mode) && (stb.st_mode & 06000) != 0) >+ chmod(fsm->path, stb.st_mode & 0777); >+ } > rc = Unlink(fsm->path); > if (_fsm_debug && (stage & FSM_SYSCALL)) > rpmMessage(RPMMESS_DEBUG, " %8s (%s) %s\n", cur, >@@ -1997,6 +2017,11 @@ > if (rc < 0) rc = CPIOERR_UNLINK_FAILED; > break; > case FSM_RENAME: >+ if (fsm->mapFlags & CPIO_SBIT_CHECK) { >+ struct stat stb; >+ if (Lstat(fsm->path, &stb) == 0 && S_ISREG(stb.st_mode) && (stb.st_mode & 06000) != 0) >+ chmod(fsm->path, stb.st_mode & 0777); >+ } > rc = Rename(fsm->opath, fsm->path); > #if defined(ETXTBSY) > if (rc && errno == ETXTBSY) { >--- ./lib/psm.c.orig 2003-03-06 18:01:47.000000000 +0000 >+++ ./lib/psm.c 2004-03-17 15:28:19.000000000 +0000 >@@ -1479,7 +1470,7 @@ > fi->striplen = (xx ? strlen(p) + 1 : 1); > } > fi->mapflags = >- CPIO_MAP_PATH | CPIO_MAP_MODE | CPIO_MAP_UID | CPIO_MAP_GID; >+ CPIO_MAP_PATH | CPIO_MAP_MODE | CPIO_MAP_UID | CPIO_MAP_GID | (fi->mapflags & CPIO_SBIT_CHECK); > > if (headerIsEntry(fi->h, RPMTAG_ORIGBASENAMES)) > rpmfiBuildFNames(fi->h, RPMTAG_ORIGBASENAMES, &fi->apath, NULL); >--- ./lib/transaction.c.orig 2003-03-03 19:32:07.000000000 +0000 >+++ ./lib/transaction.c 2004-03-17 15:28:19.000000000 +0000 >@@ -279,6 +279,13 @@ > if (XFA_SKIPPING(fi->actions[fileNum])) > continue; > >+ if (!(fi->mapflags & CPIO_SBIT_CHECK)) { >+ int_16 omode = rpmfiFMode(otherFi); >+ if (S_ISREG(omode) && (omode & 06000) != 0) { >+ fi->mapflags |= CPIO_SBIT_CHECK; >+ } >+ } >+ > if (filecmp(otherFi, fi)) { > /* Report conflicts only for packages/files of same color. */ > if (tscolor == 0 || (tecolor == otecolor && ficolor == oficolor)) >@@ -1345,6 +1509,20 @@ > case TR_REMOVED: > /*@switchbreak@*/ break; > } >+ /* check for s-bit files to be removed */ >+ if (rpmteType(p) == TR_REMOVED) { >+ fi = rpmfiInit(fi, 0); >+ while ((i = rpmfiNext(fi)) >= 0) { >+ int_16 mode; >+ if (XFA_SKIPPING(fi->actions[i])) >+ continue; >+ (void) rpmfiSetFX(fi, i); >+ mode = rpmfiFMode(fi); >+ if (S_ISREG(mode) && (mode & 06000) != 0) { >+ fi->mapflags |= CPIO_SBIT_CHECK; >+ } >+ } >+ } > } > pi = rpmtsiFree(pi); > ps = rpmpsFree(ps); >@@ -1509,6 +1682,7 @@ > { > char * fstates = fi->fstates; > fileAction * actions = fi->actions; >+ int mapflags = fi->mapflags; > rpmte savep; > > fi->fstates = NULL; >@@ -1525,6 +1699,8 @@ > fi->fstates = fstates; > fi->actions = _free(fi->actions); > fi->actions = actions; >+ if (mapflags & CPIO_SBIT_CHECK) >+ fi->mapflags |= CPIO_SBIT_CHECK; > p->fi = fi; > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 125517
: 100965 |
419033