]> git.pld-linux.org Git - packages/Firebird.git/commitdiff
- does nothing on Linux
authorJakub Bogusz <qboosh@pld-linux.org>
Fri, 18 Jul 2008 22:07:06 +0000 (22:07 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    Firebird-separate-file-and-sem-perms.dpatch -> 1.2

Firebird-separate-file-and-sem-perms.dpatch [deleted file]

diff --git a/Firebird-separate-file-and-sem-perms.dpatch b/Firebird-separate-file-and-sem-perms.dpatch
deleted file mode 100644 (file)
index 0535250..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 004_separate_file_and_sem_perms.dpatch by  <divanov@creditreform.bg>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Separate definitions for file and semaphore permissions
-
-@DPATCH@
-
---- firebird2-1.5.2.orig/src/jrd/isc_sync.cpp
-+++ firebird2-1.5.2/src/jrd/isc_sync.cpp
-@@ -136,8 +136,20 @@
- #endif
- #define FTOK_KEY      15
--#define PRIV          0666
- #define LOCAL_SEMAPHORES 4
-+#define FILE_PERM     0666
-+#if defined(SEM_R) && defined(SEM_A)
-+#define SEM_PERM      SEM_R | SEM_A | (SEM_R>>3) | (SEM_A>>3) \
-+                      | (SEM_R>>6) | (SEM_A>>6)
-+#else
-+#define SEM_PERM      FILE_PERM
-+#endif
-+#if defined(SHM_R) && defined(SHM_W)
-+#define SHM_PERM      SHM_R | SHM_W | (SHM_R>>3) | (SHM_W>>3) \
-+                      | (SHM_R>>6) | (SHM_W>>6)
-+#else
-+#define SHM_PERM      FILE_PERM
-+#endif
- #ifndef GDS_RELAY
- #define GDS_RELAY     "/bin/gds_relay"
-@@ -2381,7 +2393,7 @@
- /* Create the shared memory region if it doesn't already exist. */
--      if ((shmid = shmget(key, length, IPC_CREAT | PRIV)) == -1)
-+      if ((shmid = shmget(key, length, IPC_CREAT | SHM_PERM)) == -1)
- #ifdef SUPERSERVER
-               if (errno == EINVAL) {
-                       /* There are two cases when shmget() returns EINVAL error:
-@@ -2428,7 +2440,7 @@
-                          way to get shmid is to attach to the segment with zero
-                          length
-                        */
--                      if ((shmid = shmget(key, 0, PRIV)) == -1) {
-+                      if ((shmid = shmget(key, 0, SHM_PERM)) == -1) {
-                               error(status_vector, "shmget", errno);
-                               ib_fclose(fp);
-                               return NULL;
-@@ -2446,7 +2458,7 @@
-                          we use IPC_EXCL flag to get an error if by some miracle
-                          the sagment with the same key is already exists
-                        */
--                      if ((shmid = shmget(key, length, IPC_CREAT | IPC_EXCL | PRIV)) ==
-+                      if ((shmid = shmget(key, length, IPC_CREAT | IPC_EXCL | SHM_PERM)) ==
-                               -1) {
-                               error(status_vector, "shmget", errno);
-                               ib_fclose(fp);
-@@ -2491,7 +2503,7 @@
-                               return NULL;
-                       }
--                      if ((shmid = shmget(key, length, IPC_CREAT | IPC_EXCL | PRIV)) ==
-+                      if ((shmid = shmget(key, length, IPC_CREAT | IPC_EXCL | SHM_PERM)) ==
-                               -1) {
-                               error(status_vector, "shmget", errno);
-                               ib_fclose(fp);
-@@ -2500,7 +2512,7 @@
-               }
-               else {
-                       length = buf.shm_segsz;
--                      if ((shmid = shmget(key, length, PRIV)) == -1) {
-+                      if ((shmid = shmget(key, length, SHM_PERM)) == -1) {
-                               error(status_vector, "shmget", errno);
-                               ib_fclose(fp);
-                               return NULL;
-@@ -2521,7 +2533,7 @@
-               /* Now remap with the new-found length */
--              if ((shmid = shmget(key, length, PRIV)) == -1) {
-+              if ((shmid = shmget(key, length, SHM_PERM)) == -1) {
-                       error(status_vector, "shmget", errno);
-                       ib_fclose(fp);
-                       return NULL;
-@@ -4176,7 +4188,7 @@
- /* Produce shared memory key for file */
-       if ((key = ftok(filename, FTOK_KEY)) == -1) {
--              if ((fd = open(filename, O_RDWR | O_CREAT | O_TRUNC, PRIV)) == -1) {
-+              if ((fd = open(filename, O_RDWR | O_CREAT | O_TRUNC, FILE_PERM)) == -1) {
-                       error(status_vector, "open", errno);
-                       return 0L;
-               }
-@@ -4208,7 +4220,7 @@
-  *
-  **************************************/
-       // Open semaphore set
--      SLONG semid = semget(key, 0, PRIV);
-+      SLONG semid = semget(key, 0, SEM_PERM);
-       if (semid == -1) {
-               error(status_vector, "semget", errno);
-               return -1;
-@@ -4251,7 +4263,7 @@
-       SLONG semid;
-       do {
-               // Try to open existing semaphore set
--              semid = semget(key, 0, PRIV);
-+              semid = semget(key, 0, SEM_PERM);
-               if (semid == -1) {
-                       if (errno != ENOENT) {
-                               error(status_vector, "semget", errno);
-@@ -4278,8 +4290,8 @@
-               }
-               
-               // Try to create new semaphore set
--              semid = semget(key, semaphores, IPC_CREAT | IPC_EXCL | PRIV);
--              if (semid != -1) 
-+              semid = semget(key, semaphores, IPC_CREAT | IPC_EXCL | SEM_PERM);
-+              if (semid != -1)
-                       return semid;
-               else
-                       if (errno != EEXIST) {
This page took 0.064045 seconds and 4 git commands to generate.