clfs-1.2
clfs-2.1
clfs-3.0.0-systemd
clfs-3.0.0-sysvinit
systemd
sysvinit
Last change
on this file since 50a4c58 was 5c5752c, checked in by Jim Gifford <clfs@…>, 19 years ago |
Added: sun disklabel patches. Tar Security Patch.
|
-
Property mode
set to
100644
|
File size:
1.0 KB
|
Rev | Line | |
---|
[5c5752c] | 1 | Submitted By: Joe Ciccone <joeciccone at crazyeyesoft dot com>
|
---|
| 2 | Date: 2006-04-14
|
---|
| 3 | Initial Package Version: 2.12r
|
---|
| 4 | Upstream Status: Sent
|
---|
| 5 | Origin: Joe Ciccone
|
---|
| 6 | Description: This patch fixes fdisk so that it can properly calculate the
|
---|
| 7 | checksum of a sun disklabel.
|
---|
| 8 |
|
---|
| 9 | --- util-linux-2.12r.orig/fdisk/fdisksunlabel.c 2004-12-22 10:36:24.000000000 -0500
|
---|
| 10 | +++ util-linux-2.12r/fdisk/fdisksunlabel.c 2006-04-14 17:50:53.000000000 -0400
|
---|
| 11 | @@ -118,7 +118,7 @@
|
---|
| 12 | int
|
---|
| 13 | check_sun_label(void) {
|
---|
| 14 | unsigned short *ush;
|
---|
| 15 | - int csum;
|
---|
| 16 | + int csum = 0;
|
---|
| 17 |
|
---|
| 18 | if (sunlabel->magic != SUN_LABEL_MAGIC &&
|
---|
| 19 | sunlabel->magic != SUN_LABEL_MAGIC_SWAPPED) {
|
---|
| 20 | @@ -128,7 +128,7 @@
|
---|
| 21 | }
|
---|
| 22 | other_endian = (sunlabel->magic == SUN_LABEL_MAGIC_SWAPPED);
|
---|
| 23 | ush = ((unsigned short *) (sunlabel + 1)) - 1;
|
---|
| 24 | - for (csum = 0; ush >= (unsigned short *)sunlabel;) csum ^= *ush--;
|
---|
| 25 | + while (ush < (unsigned short *)sunlabel) csum ^= *ush--;
|
---|
| 26 | if (csum) {
|
---|
| 27 | fprintf(stderr,_("Detected sun disklabel with wrong checksum.\n"
|
---|
| 28 | "Probably you'll have to set all the values,\n"
|
---|
Note:
See
TracBrowser
for help on using the repository browser.