mirror of
https://github.com/gophernicus/gophernicus.git
synced 2024-12-04 14:46:37 -05:00
Installing now explicitly clears the SHM block Gophernicus uses
This commit is contained in:
parent
edf1d1a0aa
commit
a064e01979
12
INSTALL
12
INSTALL
@ -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
|
||||
|
7
Makefile
7
Makefile
@ -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) \
|
||||
|
Loading…
Reference in New Issue
Block a user