]> git.evergreen-ils.org Git - Evergreen.git/commit
LP1900005: Don't require a specific 'opensrf' user
authorJason Boyer <JBoyer@equinoxinitiative.org>
Thu, 15 Oct 2020 17:50:18 +0000 (13:50 -0400)
committerJane Sandberg <sandbergja@gmail.com>
Sun, 27 Mar 2022 20:40:14 +0000 (13:40 -0700)
commit6301bfdac77da0404fa7e7f31f7fb1895ba47f84
tree5d8fb375b87f0f0b6497888a000dd6e0c3b28e37
parenteb99c4a5bf0e3d1ee05d8f85aa123037b83ad2f7
LP1900005: Don't require a specific 'opensrf' user

There's no technical reason to require a specific user beyond our
instructions stating that it's the default. One thing that we should
do is not allow our network services to be run as root.
Additionally, autogen.sh is excluded from running as root because while
that would work, it may then have to *always* be run by root or
require you to change the file owner between runs.

NOTE: We check for the user by id rather than name, as there's no rule
saying user 0 must be called "root" on Linux.

NOTE: This also cleans up and unifies the the coding style and removes
some dead code in autogen.sh.

To test:
Pre-patch:
Use oils_ctl.sh to start SIP or z3950 as opensrf, Success.
Use oils_ctl.sh to start SIP or z3950 as yourself, Failure.
Use oils_ctl.sh to start SIP or z3950 as root, Failure.
Run autogen.sh as opensrf, Success.
Run autogen.sh as yourself, Failure.
Run autogen.sh as root, Failure.

Post patch:
Use oils_ctl.sh to start SIP or z3950 as opensrf, Success.
Use oils_ctl.sh to start SIP or z3950 as your normal user, Success.
Use oils_ctl.sh to start SIP or z3950 as root, Failure.
Run autogen.sh as opensrf, Success.
Run autogen.sh as yourself, potential Success - IF you're able to write to the correct directory / files.
Run autogen.sh as root, Failure.

Signed-off-by: Jason Boyer <JBoyer@equinoxinitiative.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Jane Sandberg <sandbergja@gmail.com>
Open-ILS/examples/oils_ctl.sh
Open-ILS/src/extras/autogen.sh