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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
--- src/sldisply.c
+++ src/sldisply.c
@@ -2156,6 +2156,13 @@
Term_Init_Str = SLtt_tgetstr ("ti");
Term_Reset_Str = SLtt_tgetstr ("te");
+# ifndef USE_TERMCAP
+ /* Use the given terminal specification of the terminfo entries
+ * even if we have almost vtxxx.
+ */
+ Keypad_Init_Str = SLtt_tgetstr ("ks");
+ Keypad_Reset_Str = SLtt_tgetstr ("ke");
+# else
/* If I do this for vtxxx terminals, arrow keys start sending ESC O A,
* which I do not want. This is mainly for HP terminals.
*/
@@ -2164,6 +2171,7 @@
Keypad_Init_Str = SLtt_tgetstr ("ks");
Keypad_Reset_Str = SLtt_tgetstr ("ke");
}
+#endif
/* Make up for defective termcap/terminfo databases */
if ((Vt100_Like && (term[2] != '1'))
@@ -2351,10 +2359,12 @@
/* specific to vtxxx only */
void SLtt_enable_cursor_keys (void)
{
+#if 0
#ifdef __unix__
if (Vt100_Like)
#endif
tt_write_string("\033=\033[?1l");
+#endif
}
#ifdef VMS
--- src/sltermin.c
+++ src/sltermin.c
@@ -105,7 +105,32 @@
* I will also look into the use of setreuid, seteuid and setregid, setegid.
* FIXME: Priority=medium
*/
+ /* If your system lacks setfsuid/getfsuid either write
+ equivalent support or dont use slang to build setuid/setgid
+ apps like Mutt */
+
+ if(setfsuid(getuid())==-1)
+ {
+ perror("setfsuid");
+ return NULL;
+ }
+ if(setfsgid(getgid())==-1)
+ {
+ perror("setfsgid");
+ return NULL;
+ }
fp = fopen (file, "rb");
+ if(setfsuid(geteuid())==-1)
+ {
+ perror("setfsuid");
+ return NULL;
+ }
+ if(setfsgid(getegid())==-1)
+ {
+ perror("setfsgid");
+ return NULL;
+ }
+
if (fp == NULL) return NULL;
if ((12 == fread ((char *) buf, 1, 12, fp) && (MAGIC == make_integer (buf))))
|