1
0

patch-src_des_read_pssword_c 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. --- openafs-1.6.5.orig/src/des/read_pssword.c 2013-07-18 00:10:42.000000000 +0200
  2. +++ openafs-1.6.5/src/des/read_pssword.c 2013-08-22 07:26:09.861211339 +0200
  3. @@ -53,6 +53,7 @@ static int intrupt;
  4. #endif
  5. #ifdef HAVE_TERMIOS_H
  6. +#include <sys/ioctl.h>
  7. #include <termios.h>
  8. #endif
  9. @@ -115,7 +116,7 @@ des_read_password(des_cblock * k, char *
  10. static void catch(int);
  11. #endif
  12. -#if !defined(BSDUNIX) && (defined(AFS_AIX_ENV) || defined (AFS_HPUX_ENV) || defined(AFS_SGI_ENV) || defined(AFS_LINUX20_ENV))
  13. +#if !defined(BSDUNIX) && (defined(AFS_AIX_ENV) || defined (AFS_HPUX_ENV) || defined(AFS_SGI_ENV))
  14. #include <termio.h>
  15. #endif
  16. @@ -148,7 +149,7 @@ des_read_pw_string(char *s, int maxa, ch
  17. FILE *fi;
  18. #else
  19. #if defined (AFS_AIX_ENV) || defined (AFS_HPUX_ENV) || defined(AFS_SGI_ENV) || defined(AFS_LINUX20_ENV)
  20. - struct termio ttyb;
  21. + struct termios ttyb;
  22. FILE *fi;
  23. char savel, flags;
  24. void (*sig) (int);
  25. @@ -227,12 +228,12 @@ des_read_pw_string(char *s, int maxa, ch
  26. setbuf(fi, (char *)NULL);
  27. sig = signal(SIGINT, catch);
  28. intrupt = 0;
  29. - (void)ioctl(fileno(fi), TCGETA, &ttyb);
  30. + (void)ioctl(fileno(fi), TCGETS, &ttyb);
  31. savel = ttyb.c_line;
  32. ttyb.c_line = 0;
  33. flags = ttyb.c_lflag;
  34. ttyb.c_lflag &= ~(ECHO | ECHOE | ECHOK | ECHONL);
  35. - (void)ioctl(fileno(fi), TCSETAF, &ttyb);
  36. + (void)ioctl(fileno(fi), TCSETSF, &ttyb);
  37. #else
  38. #ifdef AFS_NT40_ENV
  39. /* turn off console input echoing */
  40. @@ -335,7 +336,7 @@ des_read_pw_string(char *s, int maxa, ch
  41. #if defined (AFS_AIX_ENV) /*|| defined (AFS_HPUX_ENV)*/ || defined(AFS_SGI_ENV) || defined(AFS_LINUX20_ENV)
  42. ttyb.c_lflag = flags;
  43. ttyb.c_line = savel;
  44. - (void)ioctl(fileno(fi), TCSETAW, &ttyb);
  45. + (void)ioctl(fileno(fi), TCSETSW, &ttyb);
  46. (void)signal(SIGINT, sig);
  47. if (fi != stdin)
  48. (void)fclose(fi);