File: hardening.patch

package info (click to toggle)
python-gnatpython 54-3
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch, wheezy
  • size: 628 kB
  • ctags: 590
  • sloc: python: 3,056; ansic: 1,477; makefile: 38
file content (12 lines) | stat: -rw-r--r-- 586 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
Patch to include hardening flags in compilation of rlimit
--- a/setup.py
+++ b/setup.py
@@ -43,7 +43,7 @@
         if 'Windows' in platform.system() or 'CYGWIN' in platform.system():
             os.system('gcc -o scripts/rlimit src/rlimit/rlimit-NT.c')
         else:
-            os.system('gcc -o scripts/rlimit src/rlimit/rlimit.c')
+            os.system('gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wl,-z,relro -o scripts/rlimit src/rlimit/rlimit.c')
         # Update the scripts list
         self.scripts = glob.glob('scripts/*')