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