Issue Details (XML | Word | Printable)

Key: CORE-1826
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Alexander Peshkov
Reporter: Dmitriy Starodubov
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Firebird Core

changeRunUser.sh and restoreRootRunUser.sh scripts does not change run user in init.d scripts

Created: 08/Apr/08 09:30 AM   Updated: 18/Nov/08 12:31 PM
Component/s: Installation
Affects Version/s: 2.1 RC2
Fix Version/s: 2.5 Alpha 1, 2.1.1, 2.0.5

Time Tracking:
Not Specified

Environment: Mandriva 2007, x86

Target: 2.5 Alpha 1 and 2.1.1
Planning Status: Unspecified


 Description  « Hide
There is function "changeInitRunUser", which take new user name as an agrument:

changeInitRunUser() {
    NewUser=$1

    InitFile=`getInitScriptLocation`
    if [ -f $InitFile ]
    then
        editFile $InitFile FBRunUser "FBRunUser=$NewUser"
chmod u=rwx,g=rx,o= $InitFile
    fi
}

But it's always called without any agruments. So user name will be empty.

In the second place editFile uses awk to change user name. It works for classic and xinetd. init.d script in superserver declares run user as:
FBRunUser=firebird
Awk try to find field "FBRunUser", but "=" is not default field separator. Therefore awk couldn't find and change this variable.

 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Alexander Peshkov added a comment - 08/Apr/08 09:41 AM
It seems to be good idea to always run firebird as not root, but let's fix for backward compatibility.

Dmitriy Starodubov added a comment - 10/Apr/08 05:48 AM
I mean both these scripts already present in distribution (builds/install/misc/restoreRootRunUser.sh.in and builds/install/misc/changeRunUser.sh.in) and installed in bin/ directory. But they do not work correctly. If there is a problem with backward compatibility may be removing these scripts will be better?

Alexander Peshkov added a comment - 10/Apr/08 05:56 AM
Under backward compatibility I mean here the fact that in dark ages firebird was running with root runuser. I suppose that someplaces people may still have root-owned databases (external files, UDFs. directories for backup files, etc.). And if one prefers to have security risk, but quickly uprgade, we must let him do it - therefore script to change runuser.

Alexander Peshkov added a comment - 04/May/08 11:20 AM
fixed in all branches