1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
diff -u mcl-0.53.00/Screen.cc mcl-patched/Screen.cc
--- mcl-0.53.00/Screen.cc 2003-09-29 04:51:44.000000000 -0700
+++ mcl-patched/Screen.cc 2004-07-26 19:22:11.620619536 -0700
@@ -49,7 +49,8 @@
// 2.4 with devs (noted by moon@deathmoon.com
else if (1 == (sscanf(tty, "/dev/vc/%d", &ttyno)))
sprintf (buf, "/dev/vcc/a%d", ttyno);
- else {
+
+ if ((fd = open (buf, O_WRONLY)) < 0) {
usingVirtual = false;
scr_x = scr_y = scr_w = scr_h = 0;
last_screen = new attrib[width * height];
@@ -58,13 +59,6 @@
out = new Buffer(32000);
}
- if (usingVirtual) {
- if ((fd = open (buf, O_WRONLY)) < 0) {
- fprintf (stderr, "\nFailed to open %s: %m. \nPerhaps your permissions are wrong?\n\n", buf);
- exit (EXIT_FAILURE);
- }
- }
-
init_curses(usingVirtual);
}
diff -u mcl-0.53.00/main.cc mcl-patched/main.cc
--- mcl-0.53.00/main.cc 2003-09-29 03:39:14.000000000 -0700
+++ mcl-patched/main.cc 2004-07-26 18:18:01.000000000 -0700
@@ -50,7 +50,7 @@
// Do this right at the start, so that a) perl can startup correctly,
// and b) to avoid any unforseen holes in eg. configfile loading -N
screen = new Screen();
- setegid(getgid());
+ seteuid(getuid());
time (¤t_time);
srand(current_time);
|