mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-02-02 10:40:38 +01:00
Make Firebird 2.0 Linux CS install prefix-aware and secure
This commit is contained in:
parent
d0567b3316
commit
1bce3be919
@ -31,7 +31,7 @@
|
|||||||
# Contributor(s):
|
# 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
|
# The post install script for Firebird Classic
|
||||||
@ -367,9 +367,6 @@ fixFilePermissions() {
|
|||||||
chmod a=rx isql
|
chmod a=rx isql
|
||||||
chmod a=rx qli
|
chmod a=rx qli
|
||||||
|
|
||||||
# fix up permissions for fbintl
|
|
||||||
chmod a=rx intl/fbintl
|
|
||||||
|
|
||||||
# SUID is still needed for group direct access. General users
|
# SUID is still needed for group direct access. General users
|
||||||
# cannot run though.
|
# cannot run though.
|
||||||
for i in fb_lock_mgr gds_drop fb_inet_server
|
for i in fb_lock_mgr gds_drop fb_inet_server
|
||||||
@ -415,6 +412,9 @@ fixFilePermissions() {
|
|||||||
cd ..
|
cd ..
|
||||||
done
|
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
|
# Set a default of read all files in examples
|
||||||
|
|
||||||
cd examples
|
cd examples
|
||||||
@ -518,8 +518,8 @@ fixFilePermissionsRoot() {
|
|||||||
chmod a=rw help/help.fdb
|
chmod a=rw help/help.fdb
|
||||||
chmod a=rw security.fdb
|
chmod a=rw security.fdb
|
||||||
|
|
||||||
# fix up permissions for fbintl
|
# fix up permissions for loadable plugins
|
||||||
chmod a=rx intl/fbintl
|
chmod a=rx intl/fbintl UDF/fbudf.so UDF/ib_udf.so
|
||||||
|
|
||||||
# Set a default of read all files in examples
|
# Set a default of read all files in examples
|
||||||
|
|
||||||
@ -627,12 +627,12 @@ createLinksForBackCompatibility() {
|
|||||||
|
|
||||||
if [ ! -e /usr/lib/libgds.so ]
|
if [ ! -e /usr/lib/libgds.so ]
|
||||||
then
|
then
|
||||||
ln -s ../../$FBRootDir/lib/libfbembed.so /usr/lib/libgds.so
|
ln -s $FBRootDir/lib/libfbembed.so /usr/lib/libgds.so
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -e /usr/lib/libgds.so.0 ]
|
if [ ! -e /usr/lib/libgds.so.0 ]
|
||||||
then
|
then
|
||||||
ln -s ../../$FBRootDir/lib/libfbembed.so /usr/lib/libgds.so.0
|
ln -s $FBRootDir/lib/libfbembed.so /usr/lib/libgds.so.0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@ -655,8 +655,8 @@ createLinksForBackCompatibility() {
|
|||||||
|
|
||||||
FBRootDir=$FirebirdInstallPrefix
|
FBRootDir=$FirebirdInstallPrefix
|
||||||
FBBin=$FBRootDir/bin
|
FBBin=$FBRootDir/bin
|
||||||
RunUser=root
|
# RunUser=root
|
||||||
# RunUser=firebird
|
RunUser=firebird
|
||||||
|
|
||||||
|
|
||||||
# Update /etc/services
|
# Update /etc/services
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
. /etc/rc.d/init.d/functions
|
. /etc/rc.d/init.d/functions
|
||||||
|
|
||||||
|
|
||||||
: ${FIREBIRD:=/usr/local/firebird}
|
: ${FIREBIRD:=@prefix@}
|
||||||
: ${ISC_USER:=SYSDBA}
|
: ${ISC_USER:=SYSDBA}
|
||||||
: ${ISC_PASSWORD:=masterke}
|
: ${ISC_PASSWORD:=masterke}
|
||||||
: ${FBRunUser:=firebird}
|
: ${FBRunUser:=firebird}
|
||||||
|
@ -55,9 +55,9 @@ generateNewDBAPassword() {
|
|||||||
echo "daemon init routine in the file /etc/rc.d/init.d/firebird)" >> $DBAPasswordFile
|
echo "daemon init routine in the file /etc/rc.d/init.d/firebird)" >> $DBAPasswordFile
|
||||||
echo "" >> $DBAPasswordFile
|
echo "" >> $DBAPasswordFile
|
||||||
echo "Your password can be changed to a more suitable one using the" >> $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 "" >> $DBAPasswordFile
|
||||||
echo ">cd /usr/local/firebird" >> $DBAPasswordFile
|
echo ">cd @prefix@" >> $DBAPasswordFile
|
||||||
echo ">bin/gsec -user sysdba -password <password>" >> $DBAPasswordFile
|
echo ">bin/gsec -user sysdba -password <password>" >> $DBAPasswordFile
|
||||||
echo "GSEC>modify sysdba -pw <newpassword>" >> $DBAPasswordFile
|
echo "GSEC>modify sysdba -pw <newpassword>" >> $DBAPasswordFile
|
||||||
echo "GSEC>quit" >> $DBAPasswordFile
|
echo "GSEC>quit" >> $DBAPasswordFile
|
||||||
@ -129,7 +129,7 @@ changeDBAPassword() {
|
|||||||
#= Main Post ===============================================================
|
#= Main Post ===============================================================
|
||||||
|
|
||||||
|
|
||||||
IBRootDir=/usr/local/firebird
|
IBRootDir=@prefix@
|
||||||
IBBin=$IBRootDir/bin
|
IBBin=$IBRootDir/bin
|
||||||
RunUser=firebird
|
RunUser=firebird
|
||||||
|
|
@ -111,9 +111,9 @@ keepOrigDBAPassword() {
|
|||||||
echo "daemon init routine in the file /etc/rc.d/init.d/firebird)" >> $DBAPasswordFile
|
echo "daemon init routine in the file /etc/rc.d/init.d/firebird)" >> $DBAPasswordFile
|
||||||
echo "" >> $DBAPasswordFile
|
echo "" >> $DBAPasswordFile
|
||||||
echo "Your should password can be changed to a more suitable one using the" >> $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 "" >> $DBAPasswordFile
|
||||||
echo ">cd /usr/local/firebird" >> $DBAPasswordFile
|
echo ">cd @prefix@" >> $DBAPasswordFile
|
||||||
echo ">bin/gsec -user sysdba -password <password>" >> $DBAPasswordFile
|
echo ">bin/gsec -user sysdba -password <password>" >> $DBAPasswordFile
|
||||||
echo "GSEC>modify sysdba -pw <newpassword>" >> $DBAPasswordFile
|
echo "GSEC>modify sysdba -pw <newpassword>" >> $DBAPasswordFile
|
||||||
echo "GSEC>quit" >> $DBAPasswordFile
|
echo "GSEC>quit" >> $DBAPasswordFile
|
||||||
@ -264,14 +264,14 @@ addFirebirdUser() {
|
|||||||
#= Main Post ===============================================================
|
#= Main Post ===============================================================
|
||||||
|
|
||||||
# Make sure the links are in place
|
# 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
|
then
|
||||||
# Main link and...
|
# Main link and...
|
||||||
ln -s $RPM_INSTALL_PREFIX/interbase /usr/local/firebird
|
ln -s $RPM_INSTALL_PREFIX/interbase @prefix@
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
IBRootDir=/usr/local/firebird
|
IBRootDir=@prefix@
|
||||||
export IBRootDir
|
export IBRootDir
|
||||||
IBBin=$IBRootDir/bin
|
IBBin=$IBRootDir/bin
|
||||||
export IBBin
|
export IBBin
|
||||||
|
@ -212,7 +212,7 @@ checkForRPMInstall() {
|
|||||||
|
|
||||||
#== Main Pre =================================================================
|
#== Main Pre =================================================================
|
||||||
|
|
||||||
IBRootDir=/usr/local/firebird
|
IBRootDir=@prefix@
|
||||||
IBBin=$IBRootDir/bin
|
IBBin=$IBRootDir/bin
|
||||||
ArchiveDateTag=`date +"%Y%m%d_%H%M"`
|
ArchiveDateTag=`date +"%Y%m%d_%H%M"`
|
||||||
ArchiveMainFile="${IBRootDir}_${ArchiveDateTag}.tar.gz"
|
ArchiveMainFile="${IBRootDir}_${ArchiveDateTag}.tar.gz"
|
||||||
|
@ -22,7 +22,7 @@ stopServerIfRunning() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
IBRootDir=/usr/local/firebird
|
IBRootDir=@prefix@
|
||||||
IBBin=$IBRootDir/bin
|
IBBin=$IBRootDir/bin
|
||||||
SecurityDatabase=isc4.gdb
|
SecurityDatabase=isc4.gdb
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/usr/local/firebird
|
@prefix@
|
||||||
|
|
||||||
/usr/lib/libfbclient.so.1.5.0
|
/usr/lib/libfbclient.so.1.5.0
|
||||||
/usr/lib/libfbclient.so.1
|
/usr/lib/libfbclient.so.1
|
||||||
|
@ -306,7 +306,7 @@ resetInetdServer() {
|
|||||||
|
|
||||||
#= Main Program ============================================================
|
#= Main Program ============================================================
|
||||||
|
|
||||||
IBRootDir=/usr/local/firebird
|
IBRootDir=@prefix@
|
||||||
IBBin=$IBRootDir/bin
|
IBBin=$IBRootDir/bin
|
||||||
|
|
||||||
|
|
@ -211,7 +211,7 @@ resetInetdServer() {
|
|||||||
#== Main Start ==============================================================
|
#== Main Start ==============================================================
|
||||||
|
|
||||||
|
|
||||||
IBRootDir=/usr/local/firebird
|
IBRootDir=@prefix@
|
||||||
IBBin=$IBRootDir/bin
|
IBBin=$IBRootDir/bin
|
||||||
|
|
||||||
|
|
@ -173,7 +173,7 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
IBRootDir=/usr/local/firebird
|
IBRootDir=@prefix@
|
||||||
IBBin=$IBRootDir/bin
|
IBBin=$IBRootDir/bin
|
||||||
|
|
||||||
|
|
@ -173,7 +173,7 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
IBRootDir=/usr/local/firebird
|
IBRootDir=@prefix@
|
||||||
IBBin=$IBRootDir/bin
|
IBBin=$IBRootDir/bin
|
||||||
|
|
||||||
|
|
@ -54,9 +54,9 @@ generateNewDBAPassword() {
|
|||||||
echo "daemon init routine in the file /etc/rc.d/init.d/firebird)" >> $DBAPasswordFile
|
echo "daemon init routine in the file /etc/rc.d/init.d/firebird)" >> $DBAPasswordFile
|
||||||
echo "" >> $DBAPasswordFile
|
echo "" >> $DBAPasswordFile
|
||||||
echo "Your password can be changed to a more suitable one using the" >> $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 "" >> $DBAPasswordFile
|
||||||
echo ">cd /usr/local/firebird" >> $DBAPasswordFile
|
echo ">cd @prefix@" >> $DBAPasswordFile
|
||||||
echo ">bin/gsec -user sysdba -password <password>" >> $DBAPasswordFile
|
echo ">bin/gsec -user sysdba -password <password>" >> $DBAPasswordFile
|
||||||
echo "GSEC>modify sysdba -pw <newpassword>" >> $DBAPasswordFile
|
echo "GSEC>modify sysdba -pw <newpassword>" >> $DBAPasswordFile
|
||||||
echo "GSEC>quit" >> $DBAPasswordFile
|
echo "GSEC>quit" >> $DBAPasswordFile
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
: ${INTERBASE:=/usr/local/firebird}
|
: ${INTERBASE:=@prefix@}
|
||||||
: ${ISC_USER:=SYSDBA}
|
: ${ISC_USER:=SYSDBA}
|
||||||
: ${ISC_PASSWORD:=masterkey}
|
: ${ISC_PASSWORD:=masterkey}
|
||||||
: ${FBRunUser:=root}
|
: ${FBRunUser:=root}
|
@ -15,7 +15,7 @@
|
|||||||
. /etc/rc.d/init.d/functions
|
. /etc/rc.d/init.d/functions
|
||||||
|
|
||||||
|
|
||||||
: ${INTERBASE:=/usr/local/firebird}
|
: ${INTERBASE:=@prefix@}
|
||||||
: ${ISC_USER:=SYSDBA}
|
: ${ISC_USER:=SYSDBA}
|
||||||
: ${ISC_PASSWORD:=masterkey}
|
: ${ISC_PASSWORD:=masterkey}
|
||||||
: ${FBRunUser:=root}
|
: ${FBRunUser:=root}
|
@ -27,7 +27,7 @@
|
|||||||
# Contributor(s):
|
# 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=..
|
ROOT=..
|
||||||
@ -327,7 +327,7 @@ includes: include_generic
|
|||||||
examples_cp:
|
examples_cp:
|
||||||
$(MAKE) -f Makefile.examples -C $(GEN_ROOT)/examples/
|
$(MAKE) -f Makefile.examples -C $(GEN_ROOT)/examples/
|
||||||
|
|
||||||
otherfiles: misc_files script_files
|
otherfiles: misc_files
|
||||||
|
|
||||||
|
|
||||||
#_ Embedded Firebird Targets (Classic)_______________________________________
|
#_ 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 $@
|
|
||||||
|
|
||||||
|
|
||||||
#___________________________________________________________________________
|
#___________________________________________________________________________
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -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 ###############################
|
dnl ############################# INITIALISATION ###############################
|
||||||
|
|
||||||
@ -703,6 +703,11 @@ case "$PLATFORM" in
|
|||||||
gen/install/scripts/rpmfiles.txt:${INSTALL_SRC_DIR}/rpmfiles.txt.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/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/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])
|
],[chmod a+x gen/install/scripts/*.sh gen/install/*sh 2>/dev/null])
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user