8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 18:43:02 +01:00

Make Firebird 2.0 Linux CS install prefix-aware and secure

This commit is contained in:
skidder 2003-09-23 22:38:48 +00:00
parent d0567b3316
commit 1bce3be919
16 changed files with 38 additions and 66 deletions

View File

@ -31,7 +31,7 @@
# Contributor(s):
#
#
# $Id: postinstall.sh.in,v 1.1 2003-07-08 22:59:57 brodsom Exp $
# $Id: postinstall.sh.in,v 1.2 2003-09-23 22:38:44 skidder Exp $
#
# The post install script for Firebird Classic
@ -367,9 +367,6 @@ fixFilePermissions() {
chmod a=rx isql
chmod a=rx qli
# fix up permissions for fbintl
chmod a=rx intl/fbintl
# SUID is still needed for group direct access. General users
# cannot run though.
for i in fb_lock_mgr gds_drop fb_inet_server
@ -415,6 +412,9 @@ fixFilePermissions() {
cd ..
done
# fix up permissions for loadable plugins
chmod ug=rx,o= intl/fbintl UDF/fbudf.so UDF/ib_udf.so
# Set a default of read all files in examples
cd examples
@ -518,8 +518,8 @@ fixFilePermissionsRoot() {
chmod a=rw help/help.fdb
chmod a=rw security.fdb
# fix up permissions for fbintl
chmod a=rx intl/fbintl
# fix up permissions for loadable plugins
chmod a=rx intl/fbintl UDF/fbudf.so UDF/ib_udf.so
# Set a default of read all files in examples
@ -627,12 +627,12 @@ createLinksForBackCompatibility() {
if [ ! -e /usr/lib/libgds.so ]
then
ln -s ../../$FBRootDir/lib/libfbembed.so /usr/lib/libgds.so
ln -s $FBRootDir/lib/libfbembed.so /usr/lib/libgds.so
fi
if [ ! -e /usr/lib/libgds.so.0 ]
then
ln -s ../../$FBRootDir/lib/libfbembed.so /usr/lib/libgds.so.0
ln -s $FBRootDir/lib/libfbembed.so /usr/lib/libgds.so.0
fi
@ -655,8 +655,8 @@ createLinksForBackCompatibility() {
FBRootDir=$FirebirdInstallPrefix
FBBin=$FBRootDir/bin
RunUser=root
# RunUser=firebird
# RunUser=root
RunUser=firebird
# Update /etc/services

View File

@ -15,7 +15,7 @@
. /etc/rc.d/init.d/functions
: ${FIREBIRD:=/usr/local/firebird}
: ${FIREBIRD:=@prefix@}
: ${ISC_USER:=SYSDBA}
: ${ISC_PASSWORD:=masterke}
: ${FBRunUser:=firebird}

View File

@ -55,9 +55,9 @@ generateNewDBAPassword() {
echo "daemon init routine in the file /etc/rc.d/init.d/firebird)" >> $DBAPasswordFile
echo "" >> $DBAPasswordFile
echo "Your password can be changed to a more suitable one using the" >> $DBAPasswordFile
echo "/usr/local/firebird/bin/gsec program as show below:" >> $DBAPasswordFile
echo "@prefix@/bin/gsec program as show below:" >> $DBAPasswordFile
echo "" >> $DBAPasswordFile
echo ">cd /usr/local/firebird" >> $DBAPasswordFile
echo ">cd @prefix@" >> $DBAPasswordFile
echo ">bin/gsec -user sysdba -password <password>" >> $DBAPasswordFile
echo "GSEC>modify sysdba -pw <newpassword>" >> $DBAPasswordFile
echo "GSEC>quit" >> $DBAPasswordFile
@ -129,7 +129,7 @@ changeDBAPassword() {
#= Main Post ===============================================================
IBRootDir=/usr/local/firebird
IBRootDir=@prefix@
IBBin=$IBRootDir/bin
RunUser=firebird

View File

@ -111,9 +111,9 @@ keepOrigDBAPassword() {
echo "daemon init routine in the file /etc/rc.d/init.d/firebird)" >> $DBAPasswordFile
echo "" >> $DBAPasswordFile
echo "Your should password can be changed to a more suitable one using the" >> $DBAPasswordFile
echo "/usr/local/firebird/bin/gsec program as show below:" >> $DBAPasswordFile
echo "@prefix@/bin/gsec program as show below:" >> $DBAPasswordFile
echo "" >> $DBAPasswordFile
echo ">cd /usr/local/firebird" >> $DBAPasswordFile
echo ">cd @prefix@" >> $DBAPasswordFile
echo ">bin/gsec -user sysdba -password <password>" >> $DBAPasswordFile
echo "GSEC>modify sysdba -pw <newpassword>" >> $DBAPasswordFile
echo "GSEC>quit" >> $DBAPasswordFile
@ -264,14 +264,14 @@ addFirebirdUser() {
#= Main Post ===============================================================
# Make sure the links are in place
if [ ! -L /usr/local/firebird -a ! -d /usr/local/firebird ]
if [ ! -L @prefix@ -a ! -d /usr/local/firebird ]
then
# Main link and...
ln -s $RPM_INSTALL_PREFIX/interbase /usr/local/firebird
ln -s $RPM_INSTALL_PREFIX/interbase @prefix@
fi
IBRootDir=/usr/local/firebird
IBRootDir=@prefix@
export IBRootDir
IBBin=$IBRootDir/bin
export IBBin

View File

@ -212,7 +212,7 @@ checkForRPMInstall() {
#== Main Pre =================================================================
IBRootDir=/usr/local/firebird
IBRootDir=@prefix@
IBBin=$IBRootDir/bin
ArchiveDateTag=`date +"%Y%m%d_%H%M"`
ArchiveMainFile="${IBRootDir}_${ArchiveDateTag}.tar.gz"

View File

@ -22,7 +22,7 @@ stopServerIfRunning() {
IBRootDir=/usr/local/firebird
IBRootDir=@prefix@
IBBin=$IBRootDir/bin
SecurityDatabase=isc4.gdb

View File

@ -1,4 +1,4 @@
/usr/local/firebird
@prefix@
/usr/lib/libfbclient.so.1.5.0
/usr/lib/libfbclient.so.1

View File

@ -306,7 +306,7 @@ resetInetdServer() {
#= Main Program ============================================================
IBRootDir=/usr/local/firebird
IBRootDir=@prefix@
IBBin=$IBRootDir/bin

View File

@ -211,7 +211,7 @@ resetInetdServer() {
#== Main Start ==============================================================
IBRootDir=/usr/local/firebird
IBRootDir=@prefix@
IBBin=$IBRootDir/bin

View File

@ -173,7 +173,7 @@ EOF
}
IBRootDir=/usr/local/firebird
IBRootDir=@prefix@
IBBin=$IBRootDir/bin

View File

@ -173,7 +173,7 @@ EOF
}
IBRootDir=/usr/local/firebird
IBRootDir=@prefix@
IBBin=$IBRootDir/bin

View File

@ -54,9 +54,9 @@ generateNewDBAPassword() {
echo "daemon init routine in the file /etc/rc.d/init.d/firebird)" >> $DBAPasswordFile
echo "" >> $DBAPasswordFile
echo "Your password can be changed to a more suitable one using the" >> $DBAPasswordFile
echo "/usr/local/firebird/bin/gsec program as show below:" >> $DBAPasswordFile
echo "@prefix@/bin/gsec program as show below:" >> $DBAPasswordFile
echo "" >> $DBAPasswordFile
echo ">cd /usr/local/firebird" >> $DBAPasswordFile
echo ">cd @prefix@" >> $DBAPasswordFile
echo ">bin/gsec -user sysdba -password <password>" >> $DBAPasswordFile
echo "GSEC>modify sysdba -pw <newpassword>" >> $DBAPasswordFile
echo "GSEC>quit" >> $DBAPasswordFile

View File

@ -9,7 +9,7 @@
: ${INTERBASE:=/usr/local/firebird}
: ${INTERBASE:=@prefix@}
: ${ISC_USER:=SYSDBA}
: ${ISC_PASSWORD:=masterkey}
: ${FBRunUser:=root}

View File

@ -15,7 +15,7 @@
. /etc/rc.d/init.d/functions
: ${INTERBASE:=/usr/local/firebird}
: ${INTERBASE:=@prefix@}
: ${ISC_USER:=SYSDBA}
: ${ISC_PASSWORD:=masterkey}
: ${FBRunUser:=root}

View File

@ -27,7 +27,7 @@
# Contributor(s):
#
#
# $Id: Makefile.in.firebird,v 1.44 2003-09-05 10:05:28 alexpeshkoff Exp $
# $Id: Makefile.in.firebird,v 1.45 2003-09-23 22:38:48 skidder Exp $
#
ROOT=..
@ -327,7 +327,7 @@ includes: include_generic
examples_cp:
$(MAKE) -f Makefile.examples -C $(GEN_ROOT)/examples/
otherfiles: misc_files script_files
otherfiles: misc_files
#_ Embedded Firebird Targets (Classic)_______________________________________
@ -502,39 +502,6 @@ $(FIREBIRD)/misc/% :: $(BLD_ROOT)/install/misc/%
#___________________________________________________________________________
#
#CLASSIC_ScriptFiles = CSchangeRunUser.sh CSrestoreRootRunUser.sh
#SUPER_ScriptFiles = SSchangeRunUser.sh SSrestoreRootRunUser.sh
#ifeq ($(ArchType),super)
#INSTALL_ScriptFiles = $(addprefix $(BIN)/, $(SUPER_ScriptFiles))
#else
#INSTALL_ScriptFiles = $(addprefix $(BIN)/, $(CLASSIC_ScriptFiles))
#endif
ScriptFiles = CSchangeRunUser.sh CSrestoreRootRunUser.sh SSchangeRunUser.sh SSrestoreRootRunUser.sh
INSTALL_ScriptFiles = $(addprefix $(BIN)/, $(ScriptFiles))
script_files : $(INSTALL_ScriptFiles)
$(BIN)/% :: $(BLD_ROOT)/install/classic/%
$(CP) $^ $@
$(CHMOD) ugo=rx $@
$(BIN)/% :: $(BLD_ROOT)/install/super/%
$(CP) $^ $@
$(CHMOD) ugo=rx $@
$(BIN)/% :: $(BLD_ROOT)/install/misc/%
$(CP) $^ $@
$(CHMOD) ugo=rx $@
#___________________________________________________________________________
#

View File

@ -1,4 +1,4 @@
dnl $Id: configure.in,v 1.155 2003-09-08 20:23:29 skidder Exp $
dnl $Id: configure.in,v 1.156 2003-09-23 22:38:42 skidder Exp $
dnl ############################# INITIALISATION ###############################
@ -703,6 +703,11 @@ case "$PLATFORM" in
gen/install/scripts/rpmfiles.txt:${INSTALL_SRC_DIR}/rpmfiles.txt.in
gen/firebird/misc/firebird.xinetd:builds/install/arch-specific/linux/misc/firebird.xinetd.in
gen/firebird/bin/changeDBAPassword.sh:builds/install/arch-specific/linux/misc/changeDBAPassword.sh.in
gen/firebird/bin/SSchangePasswd.sh:builds/install/arch-specific/linux/super/SSchangePasswd.sh.in
gen/firebird/bin/CSchangeRunUser.sh:builds/install/misc/CSchangeRunUser.sh.in
gen/firebird/bin/CSrestoreRootRunUser.sh:builds/install/misc/CSrestoreRootRunUser.sh.in
gen/firebird/bin/SSchangeRunUser.sh:builds/install/misc/SSchangeRunUser.sh.in
gen/firebird/bin/SSrestoreRootRunUser.sh:builds/install/misc/SSrestoreRootRunUser.sh.in
],[chmod a+x gen/install/scripts/*.sh gen/install/*sh 2>/dev/null])
;;