From e86136431cdeceee6db964124670f55e7fb3cb29 Mon Sep 17 00:00:00 2001 From: alfred Date: Mon, 31 Dec 2001 09:47:58 +0000 Subject: Open the apm device readonly, this means a user doesn't need to be in any special groups to run xbattbar. --- sysutils/xbattbar/files/patch-ab | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 sysutils/xbattbar/files/patch-ab diff --git a/sysutils/xbattbar/files/patch-ab b/sysutils/xbattbar/files/patch-ab new file mode 100644 index 00000000000..a911d752803 --- /dev/null +++ b/sysutils/xbattbar/files/patch-ab @@ -0,0 +1,13 @@ +--- xbattbar.c.old Mon Dec 31 03:32:04 2001 ++++ xbattbar.c Mon Dec 31 03:32:08 2001 +@@ -522,8 +522,8 @@ + int fd, r, p; + struct apm_info info; + +- if ((fd = open(APMDEV21, O_RDWR)) == -1 && +- (fd = open(APMDEV22, O_RDWR)) == -1) { ++ if ((fd = open(APMDEV21, O_RDONLY)) == -1 && ++ (fd = open(APMDEV22, O_RDONLY)) == -1) { + fprintf(stderr, "xbattbar: cannot open apm device\n"); + exit(1); + } -- cgit