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
|
--- openafs-1.6.5.orig/src/des/read_pssword.c 2013-07-18 00:10:42.000000000 +0200
+++ openafs-1.6.5/src/des/read_pssword.c 2013-08-22 07:26:09.861211339 +0200
@@ -53,6 +53,7 @@ static int intrupt;
#endif
#ifdef HAVE_TERMIOS_H
+#include <sys/ioctl.h>
#include <termios.h>
#endif
@@ -115,7 +116,7 @@ des_read_password(des_cblock * k, char *
static void catch(int);
#endif
-#if !defined(BSDUNIX) && (defined(AFS_AIX_ENV) || defined (AFS_HPUX_ENV) || defined(AFS_SGI_ENV) || defined(AFS_LINUX20_ENV))
+#if !defined(BSDUNIX) && (defined(AFS_AIX_ENV) || defined (AFS_HPUX_ENV) || defined(AFS_SGI_ENV))
#include <termio.h>
#endif
@@ -148,7 +149,7 @@ des_read_pw_string(char *s, int maxa, ch
FILE *fi;
#else
#if defined (AFS_AIX_ENV) || defined (AFS_HPUX_ENV) || defined(AFS_SGI_ENV) || defined(AFS_LINUX20_ENV)
- struct termio ttyb;
+ struct termios ttyb;
FILE *fi;
char savel, flags;
void (*sig) (int);
@@ -227,12 +228,12 @@ des_read_pw_string(char *s, int maxa, ch
setbuf(fi, (char *)NULL);
sig = signal(SIGINT, catch);
intrupt = 0;
- (void)ioctl(fileno(fi), TCGETA, &ttyb);
+ (void)ioctl(fileno(fi), TCGETS, &ttyb);
savel = ttyb.c_line;
ttyb.c_line = 0;
flags = ttyb.c_lflag;
ttyb.c_lflag &= ~(ECHO | ECHOE | ECHOK | ECHONL);
- (void)ioctl(fileno(fi), TCSETAF, &ttyb);
+ (void)ioctl(fileno(fi), TCSETSF, &ttyb);
#else
#ifdef AFS_NT40_ENV
/* turn off console input echoing */
@@ -335,7 +336,7 @@ des_read_pw_string(char *s, int maxa, ch
#if defined (AFS_AIX_ENV) /*|| defined (AFS_HPUX_ENV)*/ || defined(AFS_SGI_ENV) || defined(AFS_LINUX20_ENV)
ttyb.c_lflag = flags;
ttyb.c_line = savel;
- (void)ioctl(fileno(fi), TCSETAW, &ttyb);
+ (void)ioctl(fileno(fi), TCSETSW, &ttyb);
(void)signal(SIGINT, sig);
if (fi != stdin)
(void)fclose(fi);
|