summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-12-21 18:42:28 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-12-21 18:42:28 +0000
commite1db87b9b9e4a582e106fb9f24e6be21c8fa0917 (patch)
tree15f651db405961c6249524848702e4f656bb28c3 /tools
parent636afb483acfe3dd3f668b88cd484f10a8fa3e20 (diff)
downloaddrakx-backup-do-not-use-e1db87b9b9e4a582e106fb9f24e6be21c8fa0917.tar
drakx-backup-do-not-use-e1db87b9b9e4a582e106fb9f24e6be21c8fa0917.tar.gz
drakx-backup-do-not-use-e1db87b9b9e4a582e106fb9f24e6be21c8fa0917.tar.bz2
drakx-backup-do-not-use-e1db87b9b9e4a582e106fb9f24e6be21c8fa0917.tar.xz
drakx-backup-do-not-use-e1db87b9b9e4a582e106fb9f24e6be21c8fa0917.zip
no_comment
Diffstat (limited to 'tools')
-rw-r--r--tools/.cvsignore1
-rw-r--r--tools/Makefile9
-rw-r--r--tools/xhost+.c11
3 files changed, 19 insertions, 2 deletions
diff --git a/tools/.cvsignore b/tools/.cvsignore
index e570b13fa..21a6d396b 100644
--- a/tools/.cvsignore
+++ b/tools/.cvsignore
@@ -1,2 +1,3 @@
rpm2header
gendepslist
+xhost+
diff --git a/tools/Makefile b/tools/Makefile
index fec667eff..654345ef8 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -3,17 +3,22 @@ DEST = $(ROOTDEST)/Mandrake/mdkinst
RPMS = $(wildcard $(ROOTDEST)/Mandrake/RPMS/*.rpm)
DIRS = ddcprobe pnp_serial
BASE = $(ROOTDEST)/Mandrake/base
+CFLAGS = -Wall
.PHONY: clean install $(DIRS)
-all: $(BASE)/depslist $(BASE)/hdlist $(DIRS) install
+all: $(BASE)/depslist $(BASE)/hdlist $(DIRS) install
$(DIRS):
make -C $@
install:
- $(MAKE) gendepslist rpm2header
+ $(MAKE) gendepslist rpm2header xhost+
install make_mdkinst_stage2 gendepslist rpm2header genhdlist $(ROOTDEST)/misc
+ install -s xhost+ $(DEST)/usr/bin
+
+xhost+: %: %.c
+ $(CC) $(CFLAGS) $< -L/usr/X11R6/lib -lX11 -o $@
gendepslist: %: %.cc
$(CXX) -I/usr/include/rpm $(CFLAGS) $< -lrpm -ldb1 -lz -o $@
diff --git a/tools/xhost+.c b/tools/xhost+.c
new file mode 100644
index 000000000..58781274e
--- /dev/null
+++ b/tools/xhost+.c
@@ -0,0 +1,11 @@
+#include <stdlib.h>
+#include <X11/Xlib.h>
+
+
+int main(int argc, char **argv) {
+ Display *d = XOpenDisplay(getenv("DISPLAY") ? getenv("DISPLAY") : ":0");
+ if (d == NULL) exit(1);
+ XDisableAccessControl(d);
+ XCloseDisplay(d);
+ exit(0);
+}