Apply ASLR to attr 01/147601/1 accepted/tizen/base/20170928.072418 submit/tizen_base/20170905.054017 submit/tizen_base/20170921.104228
authorMyungki Lee <mk5004.lee@samsung.com>
Tue, 5 Sep 2017 05:23:52 +0000 (14:23 +0900)
committerMyungki Lee <mk5004.lee@samsung.com>
Tue, 5 Sep 2017 05:23:52 +0000 (14:23 +0900)
Change-Id: I61c90c3621156c7bdb6a649ef3bba02d18e8fe0a
Signed-off-by: Myungki Lee <mk5004.lee@samsung.com>
packaging/attr.spec

index 4b123b6..809726e 100644 (file)
@@ -55,7 +55,7 @@ statically linked programs which make use of extended attributes.
 cp %{SOURCE1001} .
 
 %build
-export OPTIMIZER="$RPM_OPT_FLAGS -fPIC"
+export OPTIMIZER="$RPM_OPT_FLAGS"
 export DEBUG=-DNDEBUG
 CFLAGS="$RPM_OPT_FLAGS" \
 %configure \
@@ -66,7 +66,9 @@ CFLAGS="$RPM_OPT_FLAGS" \
        --libdir=%{_libdir} \
        --libexecdir=%{_libdir} \
        --with-pic
-%{__make} %{?_smp_mflags}
+%{__make} libattr %{?_smp_mflags}
+CFLAGS="$CFLAGS -fPIE" LDFLAGS="$LDFLAGS -pie" \
+%{__make} attr getfattr setfattr %{?_smp_mflags}
 
 %install
 DIST_ROOT="$RPM_BUILD_ROOT"