1 /* ========================================================================
2  * Copyright 1988-2006 University of Washington
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *
11  * ========================================================================
12  */
13 
14 /*
15  * Program:	Operating-system dependent routines -- VMS version
16  *
17  * Author:	Mark Crispin
18  *		Networks and Distributed Computing
19  *		Computing & Communications
20  *		University of Washington
21  *		Administration Building, AG-44
22  *		Seattle, WA  98195
23  *		Internet: MRC@CAC.Washington.EDU
24  *
25  * Date:	2 August 1994
26  * Last Edited:	30 August 2006
27  */
28 
29 #include "tcp_vms.h"		/* must be before osdep includes tcp.h */
30 #include "mail.h"
31 #include "osdep.h"
32 #include <stdio.h>
33 #include <sys/time.h>
34 #include <sys/stat.h>
35 #include <sys/socket.h>
36 #include <netinet/in.h>
37 #include <arpa/inet.h>
38 #include <netdb.h>
39 #include <ctype.h>
40 #include <errno.h>
41 extern int errno;		/* just in case */
42 #include "misc.h"
43 
44 
45 #include "fs_vms.c"
46 #include "ftl_vms.c"
47 #include "nl_vms.c"
48 #include "env_vms.c"
49 #include "tcp_vms.c"
50 
51 #define server_login(user,pass,authuser,argc,argv) NIL
52 #define authserver_login(user,authuser,argc,argv) NIL
53 #define myusername() ""		/* dummy definition to prevent build errors */
54 #define MD5ENABLE ""
55 
56 #include "auth_md5.c"
57 #include "auth_pla.c"
58 #include "auth_log.c"
59 
60 
61 /* Emulator for UNIX getpass() call
62  * Accepts: prompt
63  * Returns: password
64  */
65 
66 #define PWDLEN 128		/* used by Linux */
67 
getpass(const char * prompt)68 char *getpass (const char *prompt)
69 {
70   char *s;
71   static char pwd[PWDLEN];
72   fputs (prompt,stdout);
73   fgets (pwd,PWDLEN-1,stdin);
74   if (s = strchr (pwd,'\n')) *s = '\0';
75   return pwd;
76 }
77