| 1 | Descriptionscip-debian debian tar 1.35+dfsg-4 tar/patches/`oldgnu-unknown-mode-bits.patch`#Description.: Do not encode unknown mode bits with oldgnu format. |
| 2 | The oldgnu format can encode large header fields in base-256. On the Hurd, |
| 3 | for example, a fifo is a translator and its mode bits contain at least the |
| 4 | S_IROOT (040000000) bit set. For the v7 and ustar formats all unknown |
| 5 | mode bits are masked at the call site, and ustar, posix and gnu formats |
| 6 | only encode known mode bits. But oldgnu is left unmasked and encoding all |
| 7 | unknown bits, which is very unexpected as these are system-specific internal |
| 8 | details on how to represent fifos (or other translators). |
| 9 | . |
| 10 | GNU tar should consider oldgnu in the same way as the gnu, posix and ustar |
| 11 | formats, and ignore unknown bits when encoding the mode. |
| 12 | Authorscip-debian debian tar 1.35+dfsg-4 tar/patches/`oldgnu-unknown-mode-bits.patch`#Author.: Guillem Jover <[email protected]scip-debian . . . identity/`[email protected]`.> |
| 13 | Originscip-debian debian tar 1.35+dfsg-4 tar/patches/`oldgnu-unknown-mode-bits.patch`#Origin.: vendor |
| 14 | Forwardedscip-debian debian tar 1.35+dfsg-4 tar/patches/`oldgnu-unknown-mode-bits.patch`#Forwarded.: no |
| 15 | Last-Updatescip-debian debian tar 1.35+dfsg-4 tar/patches/`oldgnu-unknown-mode-bits.patch`#Last-Update.: 2018-10-14 |
| 16 | |
| 17 | --- |
| 18 | |
| 19 | Index: tar.git/src/create.cscip-debian debian tar 1.35+dfsg-4 tar/upstream/`tar.git/src/create.c`: |
| 20 | =================================================================== |
| 21 | --- tar.git.orig/src/create.cscip-debian debian tar 1.35+dfsg-4 tar/upstream/`tar.git.orig/src/create.c`: 2020-11-20 14:29:25.259596846 +0000 |
| 22 | +++ tar.git/src/create.c 2020-11-20 14:29:25.259596846 +0000 |
| 23 | @@ -384,7 +384,7 @@ |
| 24 | mode_to_chars (mode_t v, char *p, size_t s) |
| 25 | { |
| 26 | /* In the common case where the internal and external mode bits are the same, |
| 27 | - and we are not using POSIX or GNU format, |
| 28 | + and we are not using POSIX or GNU formats, |
| 29 | propagate all unknown bits to the external mode. |
| 30 | This matches historical practice. |
| 31 | Otherwise, just copy the bits we know about. */ |
| 32 | @@ -396,6 +396,7 @@ |
| 33 | && S_IROTH == TOREAD && S_IWOTH == TOWRITE && S_IXOTH == TOEXEC |
| 34 | && archive_format != POSIX_FORMAT |
| 35 | && archive_format != USTAR_FORMAT |
| 36 | + && archive_format != OLDGNU_FORMAT |
| 37 | && archive_format != GNU_FORMAT) |
| 38 | { |
| 39 | negative = v < 0; |