Lines 6082-6087
Link Here
|
6082 |
|
6082 |
|
6083 |
self.updateprotect() |
6083 |
self.updateprotect() |
6084 |
|
6084 |
|
|
|
6085 |
nlinkobjs=[] |
6085 |
#process symlinks second-to-last, directories last. |
6086 |
#process symlinks second-to-last, directories last. |
6086 |
mydirs=[] |
6087 |
mydirs=[] |
6087 |
mysyms=[] |
6088 |
mysyms=[] |
Lines 6108-6113
Link Here
|
6108 |
|
6109 |
|
6109 |
lstatobj=os.lstat(obj) |
6110 |
lstatobj=os.lstat(obj) |
6110 |
lmtime=str(lstatobj[stat.ST_MTIME]) |
6111 |
lmtime=str(lstatobj[stat.ST_MTIME]) |
|
|
6112 |
lmode=lstatobj[stat.ST_MODE] |
6111 |
if (pkgfiles[obj][0] not in ("dir","fif","dev","sym")) and (lmtime != pkgfiles[obj][1]): |
6113 |
if (pkgfiles[obj][0] not in ("dir","fif","dev","sym")) and (lmtime != pkgfiles[obj][1]): |
6112 |
print "--- !mtime", pkgfiles[obj][0], obj |
6114 |
print "--- !mtime", pkgfiles[obj][0], obj |
6113 |
continue |
6115 |
continue |
Lines 6128-6133
Link Here
|
6128 |
continue |
6130 |
continue |
6129 |
mymd5=portage_checksum.perform_md5(obj, calc_prelink=1) |
6131 |
mymd5=portage_checksum.perform_md5(obj, calc_prelink=1) |
6130 |
|
6132 |
|
|
|
6133 |
# keep track of suid/sgid binaries with multiple links |
6134 |
if lmode & stat.S_ISUID or lmode & stat.S_ISGID: |
6135 |
if lstatobj[stat.ST_NLINK] > 1: |
6136 |
nlinkobjs.append(obj) |
6137 |
|
6131 |
# string.lower is needed because db entries used to be in upper-case. The |
6138 |
# string.lower is needed because db entries used to be in upper-case. The |
6132 |
# string.lower allows for backwards compatibility. |
6139 |
# string.lower allows for backwards compatibility. |
6133 |
if mymd5 != string.lower(pkgfiles[obj][2]): |
6140 |
if mymd5 != string.lower(pkgfiles[obj][2]): |
Lines 6281-6286
Link Here
|
6281 |
writemsg("!!! FAILED postrm: "+str(a)+"\n") |
6288 |
writemsg("!!! FAILED postrm: "+str(a)+"\n") |
6282 |
sys.exit(123) |
6289 |
sys.exit(123) |
6283 |
|
6290 |
|
|
|
6291 |
if nlinkobjs: |
6292 |
for x in nlinkobjs: |
6293 |
print red("*"), "WARNING: suid/sgid file", x, "has remaining hardlinks." |
6294 |
print red("*"), "WARNING: see gentoo security guide for advice on how to proceed." |
6295 |
|
6284 |
self.unlockdb() |
6296 |
self.unlockdb() |
6285 |
|
6297 |
|
6286 |
def isowner(self,filename,destroot): |
6298 |
def isowner(self,filename,destroot): |