1
0
mirror of https://github.com/gophernicus/gophernicus.git synced 2024-06-02 06:11:10 +00:00

Installing now explicitly clears the SHM block Gophernicus uses

This commit is contained in:
Kim Holviala 2015-12-31 09:30:39 +02:00
parent edf1d1a0aa
commit a064e01979
2 changed files with 11 additions and 8 deletions

12
INSTALL
View File

@ -68,16 +68,14 @@ Gophernicus uses SYSV shared memory for session tracking and
statistics. It creates the shared memory block using mode 600
and a predefined key which means that a shared memory block
created with one user cannot be used by another user. Simply
said, running in.gophernicus as yourself will allocate that
memory, and then running the binary through inetd as another
user (nobody) will be denied access to that memory.
said, running in.gophernicus under various different user
accounts may create a situation where the memory block is locked
to the wrong user.
If that happens you can simply delete the memory block and
let Gophernicus recreate it - no harm done.
let Gophernicus recreate it - no harm done:
$ su -
# ipcs -m | grep beeb
# ipcrm -M <key from the above command>
$ sudo make clean-shm
Porting to different platforms

View File

@ -44,6 +44,8 @@ HOSTCC = $(CC)
CFLAGS = -O2 -Wall
LDFLAGS =
IPCRM = /usr/bin/ipcrm
#
# Platform support, compatible with both BSD and GNU make
@ -121,11 +123,14 @@ clean-build:
clean-deb:
if [ -d debian/$(PACKAGE) ]; then fakeroot debian/rules clean; fi
clean-shm:
if [ -x $(IPCRM) ]; then $(IPCRM) -M `awk '/SHM_KEY/ { print $$3 }' $(NAME).h` || true; fi
#
# Install targets
#
install: ChangeLog
install: ChangeLog clean-shm
@case `uname` in \
Darwin) $(MAKE) ROOT="$(OSXROOT)" DESTDIR="$(OSXDEST)" install-files install-docs install-root install-osx install-done; ;; \
Haiku) $(MAKE) SBINDIR=/boot/common/bin DOCDIR=/boot/common/share/doc/$(PACKAGE) \