ports/sysutils/xbattbar/files/patch-ab
Alfred Perlstein b67226884f Open the apm device readonly, this means a user doesn't need to
be in any special groups to run xbattbar.
2001-12-31 09:47:58 +00:00

13 lines
419 B
Text

--- 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);
}