]> skyeroc.xyz Git - dgamelaunch/commitdiff
Change the shared memory key to the password file. (from Edoardo Spadolini)
authorPasi Kallinen <paxed@alt.org>
Mon, 4 Mar 2013 15:08:49 +0000 (17:08 +0200)
committerPasi Kallinen <paxed@alt.org>
Mon, 4 Mar 2013 15:08:49 +0000 (17:08 +0200)
dgamelaunch.c
examples/dgamelaunch.conf

index a03d049ab5cdcf01a488102af02f37e40f018dc1..cdacfb51490f3042512284f1b4ad27b2c0f54673 100644 (file)
@@ -719,11 +719,11 @@ void
 shm_mk_keys(key_t *shm_key, key_t *shm_sem_key)
 {
 #ifdef USE_SHMEM
-    if ((*shm_key = ftok("dgamelaunch", 'R')) == -1) {
+    if ((*shm_key = ftok(globalconfig.passwd, 'R')) == -1) {
        debug_write("ftok shm_key");
        graceful_exit(71);
     }
-    if ((*shm_sem_key = ftok("dgamelaunch", 'S')) == -1) {
+    if ((*shm_sem_key = ftok(globalconfig.passwd, 'S')) == -1) {
        debug_write("ftok shm_sem_key");
        graceful_exit(72);
     }
index 3d3e48828ceff030f7f75d802d82204cb8b4275d..7c9dea58ba747efe777c18d8ea2422b8aeabd228 100644 (file)
@@ -107,6 +107,8 @@ default_term = "xterm"
 # Passwd refers to the file that stores the user database.
 # The default passwd file is "/dgl-login" for flat-text database, and for
 # sqlite, whatever value was defined for the sqlite database at compile time.
+# This is also used for the shared memory key, if shmem is enabled at compile
+# time.
 #passwd = "/dgl-login"
 
 # Lockfile is used only when dgl was compiled without sqlite.