aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2001-12-31 17:47:58 +0800
committeralfred <alfred@FreeBSD.org>2001-12-31 17:47:58 +0800
commite86136431cdeceee6db964124670f55e7fb3cb29 (patch)
tree1fd52643bab48e927eef4e90744bfcdd0a65e9eb /sysutils
parent495100ea2b78a94f37ca3eaa70a7cd27dc39d750 (diff)
downloadfreebsd-ports-graphics-e86136431cdeceee6db964124670f55e7fb3cb29.tar.gz
freebsd-ports-graphics-e86136431cdeceee6db964124670f55e7fb3cb29.tar.zst
freebsd-ports-graphics-e86136431cdeceee6db964124670f55e7fb3cb29.zip
Open the apm device readonly, this means a user doesn't need to
be in any special groups to run xbattbar.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/xbattbar/files/patch-ab13
1 files changed, 13 insertions, 0 deletions
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);
+ }