14d54604e1
- Add fix in plugger-controller to prevent segfault when run by user
26 lines
706 B
Text
26 lines
706 B
Text
$NetBSD: patch-ac,v 1.2 2003/12/18 08:09:19 airhead Exp $
|
|
|
|
--- plugger-controller.c.orig 2003-04-20 13:27:33.000000000 +0200
|
|
+++ plugger-controller.c 2003-12-18 08:55:47.000000000 +0100
|
|
@@ -136,7 +136,7 @@
|
|
if(!pid)
|
|
{
|
|
char *cmd[4];
|
|
- setpgrp();
|
|
+ setpgid(0, 0);
|
|
cmd[0]="/bin/sh";
|
|
cmd[1]="-c";
|
|
cmd[2]=argv[1];
|
|
@@ -200,6 +200,12 @@
|
|
XSizeHints wmHints;
|
|
char defaultGeometry[256];
|
|
|
|
+ /* This program should be called by plugger only */
|
|
+ if (argc < 2) {
|
|
+ fprintf(stderr, "%s: Please do not call this program yourself.\n", argv[0]);
|
|
+ return False;
|
|
+ }
|
|
+
|
|
if(!(dpy = XOpenDisplay(getenv("DISPLAY"))))
|
|
{
|
|
fprintf(stderr,"%s: unable to open display %s\n",
|