Rich Salz
rsalz at zolera.com
Thu Jan 3 12:34:19 EST 2002
configure[.in] has code to set AP_SRC_OWN and AP_SRC_GRP by parsing the output of "ls -ld". It wants that information so that it can chown the files it copies into the apache source tree. There are a number of problems with this. 0. it requires root privs. 1. the operation is often unnecessary, as the installer of mod-python should be the apache owner. 2. if they are not the same, masking the owner looses accountability :) 3. the output of "ls -l" is different across platforms, including the placement of the fields (for extraction via awk) and some versions put a "total nnnn" line out first. I believe the best solution is to not chown things; we patch the Makefile so that the install targets do not do that. The attached diff, however, merely makes mod_python's configure more robust in the fact of multi-line "ls" output. It does not address the more fundamental problem, which is that the output of "ls" puts those fields in different places on different hosts. One way to address that would be to gather the values via a short python program. /r$ -- Zolera Systems, Your Key to Online Integrity Securing Web services: XML, SOAP, Dig-sig, Encryption http://www.zolera.com -------------- next part -------------- *** configure.in.ORIG Thu Jan 3 12:17:06 2002 --- configure.in Thu Jan 3 12:25:34 2002 *************** *** 163,170 **** AP_INCLUDES="-I${AP_SRC}/src/include -I${AP_SRC}/src/os/unix" # note who owns the apache source directory ! AP_SRC_OWN="`ls -ld $AP_SRC | awk '{print $3}'`" ! AP_SRC_GRP="`ls -ld $AP_SRC | awk '{print $4}'`" ], AC_MSG_RESULT(no)) --- 163,170 ---- AP_INCLUDES="-I${AP_SRC}/src/include -I${AP_SRC}/src/os/unix" # note who owns the apache source directory ! AP_SRC_OWN="`ls -ld $AP_SRC | awk '{print $3}' | tr -d '[\012\015]'`" ! AP_SRC_GRP="`ls -ld $AP_SRC | awk '{print $4}' | tr -d '[\012\015]'`" ], AC_MSG_RESULT(no))
|