fix-permissions.patch 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. From d9498d10d0e8241749835dbc9fa229465d4fdfd7 Mon Sep 17 00:00:00 2001
  2. From: Kai Kang <kai.kang@windriver.com>
  3. Date: Wed, 6 Feb 2019 13:58:04 +0000
  4. Subject: [PATCH] Fix permissions
  5. Update permissions of executable files that remove setuid bit and make
  6. everyone could read.
  7. Upstream-Status: Inappropriate [embedded specific]
  8. Signed-off-by: Kai Kang <kai.kang@windriver.com>
  9. ---
  10. Makefile | 10 +++++-----
  11. 1 file changed, 5 insertions(+), 5 deletions(-)
  12. diff --git a/Makefile b/Makefile
  13. index 3bf5929..1221ee4 100644
  14. --- a/Makefile
  15. +++ b/Makefile
  16. @@ -72,7 +72,7 @@ systemdinstall: genericinstall
  17. chmod 0644 $(DESTDIR)$(SYSDPATH)/atopacct.service
  18. cp atop.cronsystemd $(DESTDIR)$(CRNPATH)/atop
  19. cp atop-pm.sh $(DESTDIR)$(PMPATHD)
  20. - chmod 0711 $(DESTDIR)$(PMPATHD)/atop-pm.sh
  21. + chmod 0755 $(DESTDIR)$(PMPATHD)/atop-pm.sh
  22. #
  23. # only when making on target system:
  24. #
  25. @@ -97,11 +97,11 @@ sysvinstall: genericinstall
  26. #
  27. if [ -d $(DESTDIR)$(PMPATH1) ]; \
  28. then cp 45atoppm $(DESTDIR)$(PMPATH1); \
  29. - chmod 0711 $(DESTDIR)$(PMPATH1)/45atoppm; \
  30. + chmod 0755 $(DESTDIR)$(PMPATH1)/45atoppm; \
  31. fi
  32. if [ -d $(DESTDIR)$(PMPATH2) ]; \
  33. then cp 45atoppm $(DESTDIR)$(PMPATH2); \
  34. - chmod 0711 $(DESTDIR)$(PMPATH2)/45atoppm; \
  35. + chmod 0755 $(DESTDIR)$(PMPATH2)/45atoppm; \
  36. fi
  37. #
  38. #
  39. @@ -145,7 +145,7 @@ genericinstall: atop atopacctd atopconvert
  40. #
  41. cp atop $(DESTDIR)$(BINPATH)/atop
  42. chown root $(DESTDIR)$(BINPATH)/atop
  43. - chmod 04711 $(DESTDIR)$(BINPATH)/atop
  44. + chmod 0755 $(DESTDIR)$(BINPATH)/atop
  45. ln -sf atop $(DESTDIR)$(BINPATH)/atopsar
  46. cp atopacctd $(DESTDIR)$(SBINPATH)/atopacctd
  47. chown root $(DESTDIR)$(SBINPATH)/atopacctd
  48. @@ -159,7 +159,7 @@ genericinstall: atop atopacctd atopconvert
  49. chown root $(DESTDIR)$(BINPATH)/atopconvert
  50. chmod 0711 $(DESTDIR)$(BINPATH)/atopconvert
  51. cp atop.daily $(DESTDIR)$(SCRPATH)
  52. - chmod 0711 $(DESTDIR)$(SCRPATH)/atop.daily
  53. + chmod 0755 $(DESTDIR)$(SCRPATH)/atop.daily
  54. cp man/atop.1 $(DESTDIR)$(MAN1PATH)
  55. cp man/atopsar.1 $(DESTDIR)$(MAN1PATH)
  56. cp man/atopconvert.1 $(DESTDIR)$(MAN1PATH)