about summary refs log tree commit diff
path: root/nixpkgs/pkgs/games/xjump/darwin.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/games/xjump/darwin.patch')
-rw-r--r--nixpkgs/pkgs/games/xjump/darwin.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/games/xjump/darwin.patch b/nixpkgs/pkgs/games/xjump/darwin.patch
new file mode 100644
index 000000000000..8221677658e3
--- /dev/null
+++ b/nixpkgs/pkgs/games/xjump/darwin.patch
@@ -0,0 +1,21 @@
+--- xjump/src/main.c	2018-02-20 09:15:15.608807657 +0100
++++ xjump-patched/src/main.c	2018-02-20 09:15:34.148949100 +0100
+@@ -604,18 +604,6 @@
+    * optimistic privilege dropping function. */
+   setgroups(0, NULL);
+ 
+-  if (setresgid(-1, realgid, realgid) != 0) {
+-    perror("Could not drop setgid privileges.  Aborting.");
+-    exit(1);
+-  }
+-
+-  /* Dropping user privileges must come last.
+-   * Otherwise we won't be able to drop group privileges anymore */
+-  if (setresuid(-1, realuid, realuid) != 0) {
+-    perror("Could not drop setuid privileges.  Aborting.");
+-    exit(1);
+-  }
+-
+   /* From now on we run with regular user privileges */
+ 
+   static XtActionsRec a_table[] = {