logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

0017-Do-not-ignore-extra-fields-containing-Unix-Timestamp.patch (1966B)


  1. From 528161b86e74c3afbe640c70761e6734119bea1c Mon Sep 17 00:00:00 2001
  2. From: "Steven M. Schweda" <sms@antinode.info>
  3. Date: Sat, 15 Jun 2019 18:13:11 -0700
  4. Subject: [PATCH] Do not ignore extra fields containing Unix Timestamps
  5. ---
  6. process.c | 11 +++++++----
  7. 1 file changed, 7 insertions(+), 4 deletions(-)
  8. diff --git a/process.c b/process.c
  9. index df683ea..e4f2405 100644
  10. --- a/process.c
  11. +++ b/process.c
  12. @@ -2914,10 +2914,13 @@ unsigned ef_scan_for_izux(ef_buf, ef_len, ef_is_c, dos_mdatetime,
  13. break;
  14. case EF_IZUNIX2:
  15. - if (have_new_type_eb == 0) {
  16. - flags &= ~0x0ff; /* ignore any previous IZUNIX field */
  17. + if (have_new_type_eb == 0) { /* (< 1) */
  18. have_new_type_eb = 1;
  19. }
  20. + if (have_new_type_eb <= 1) {
  21. + /* Ignore any prior (EF_IZUNIX/EF_PKUNIX) UID/GID. */
  22. + flags &= 0x0ff;
  23. + }
  24. #ifdef IZ_HAVE_UXUIDGID
  25. if (have_new_type_eb > 1)
  26. break; /* IZUNIX3 overrides IZUNIX2 e.f. block ! */
  27. @@ -2933,6 +2936,8 @@ unsigned ef_scan_for_izux(ef_buf, ef_len, ef_is_c, dos_mdatetime,
  28. /* new 3rd generation Unix ef */
  29. have_new_type_eb = 2;
  30. + /* Ignore any prior EF_IZUNIX/EF_PKUNIX/EF_IZUNIX2 UID/GID. */
  31. + flags &= 0x0ff;
  32. /*
  33. Version 1 byte version of this extra field, currently 1
  34. UIDSize 1 byte Size of UID field
  35. @@ -2953,8 +2958,6 @@ unsigned ef_scan_for_izux(ef_buf, ef_len, ef_is_c, dos_mdatetime,
  36. uid_size = *((EB_HEADSIZE + 1) + ef_buf);
  37. gid_size = *((EB_HEADSIZE + uid_size + 2) + ef_buf);
  38. - flags &= ~0x0ff; /* ignore any previous UNIX field */
  39. -
  40. if ( read_ux3_value((EB_HEADSIZE + 2) + ef_buf,
  41. uid_size, &z_uidgid[0])
  42. &&
  43. --
  44. 2.20.1