diff -pur slang-1.4.9/src/sldisply.c slang-1.4.9-utf8/src/sldisply.c --- slang-1.4.9/src/sldisply.c 2003-03-23 08:06:40.000000000 +0100 +++ slang-1.4.9-utf8/src/sldisply.c 2006-01-31 16:03:07.000000000 +0100 @@ -2248,6 +2248,13 @@ int SLtt_initialize (char *term) 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. */ @@ -2256,6 +2263,7 @@ int SLtt_initialize (char *term) 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')) @@ -2452,10 +2460,12 @@ int SLtt_initialize (char *term) /* 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 diff -pur slang-1.4.9/src/sltermin.c slang-1.4.9-utf8/src/sltermin.c --- slang-1.4.9/src/sltermin.c 2003-03-23 08:06:40.000000000 +0100 +++ slang-1.4.9-utf8/src/sltermin.c 2006-01-31 16:04:28.000000000 +0100 @@ -105,7 +105,31 @@ static FILE *open_terminfo (char *file, * 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))))