]> git.evergreen-ils.org Git - working/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:39:21 +0000 (13:39 -0700)
commit8d628623b8f2c4d35d7f8633ac55a991732e93ea
tree990d3c44fba6ec166b85f15ee373f6624df054bf
parent60efc98ffe680de07cc270c803c7cdeeac07f1ad
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