Small Makefile problem with gradm 2.0.1

Discuss and suggest new grsecurity features

Small Makefile problem with gradm 2.0.1

Postby vinceh » Tue Aug 10, 2004 1:47 pm

Seems like the Makefile of the latest gradm 2.0.1 has a small problem creating the grsec /etc directory tree:

Code: Select all
# make install
mkdir -p /sbin
/usr/bin/install -c -m 0755 gradm /sbin
/usr/bin/strip /sbin/gradm
/usr/bin/install -c -m 0700 grlearn /sbin
/usr/bin/strip /sbin/grlearn
mkdir -p -m 700 /etc/grsec
mv: cannot stat `/etc/grsec/acl': No such file or directory
make: *** [install] Error 1


Code that causes the problem:

Code: Select all
@if [ ! -f $(DESTDIR)$(GRSEC_DIR)/policy ] ; then \
           if [ ! -f $(DESTDIR)$(GRSEC_DIR)/acl ] ; then \
                  mv $(DESTDIR)$(GRSEC_DIR)/acl $(DESTDIR)$(GRSEC_DIR)/policy ; \
           else \
                  $(INSTALL) -m 0600 policy $(DESTDIR)$(GRSEC_DIR) ; \
           fi \
 fi


Apparently, the
Code: Select all
if [ ! -f $(DESTDIR)$(GRSEC_DIR)/acl ]
needs to be changed to
Code: Select all
if [ -f $(DESTDIR)$(GRSEC_DIR)/acl ]
without the negating " ! " (moving a file that doesn't exist doesn't make much sense :-)).
vinceh
 
Posts: 4
Joined: Tue Aug 10, 2004 1:32 pm

Postby spender » Tue Aug 10, 2004 2:03 pm

Thanks, fixed in CVS.

-Brad
spender
 
Posts: 2185
Joined: Wed Feb 20, 2002 8:00 pm


Return to grsecurity development