imapext-2007

view src/osdep/tops-20/log_t20.c @ 0:ada5e610ab86

imap-2007e
author yuuji@gentei.org
date Mon, 14 Sep 2009 15:17:45 +0900
parents
children
line source
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 */
14 /*
15 * Program: TOPS-20 server login
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: 1 August 1988
26 * Last Edited: 30 August 2006
27 */
30 /* Dedication:
31 * This file is dedicated with affection to the TOPS-20 operating system, which
32 * set standards for user and programmer friendliness that have still not been
33 * equaled by more `modern' operating systems.
34 * Wasureru mon ka!!!!
35 */
37 /* Server log in
38 * Accepts: user name string
39 * password string
40 * authenticating user name string
41 * argument count
42 * argument vector
43 * Returns: T if password validated, NIL otherwise
44 */
46 long server_login (char *user,char *pass,char *authuser,int argc,char *argv[])
47 {
48 int uid;
49 int argblk[5];
50 if (authuser && *authuser) { /* not available */
51 syslog (LOG_NOTICE|LOG_AUTH,
52 "Login %s failed: invalid authentication ID %s host=%.80s",
53 user,authuser,tcp_clienthost ());
54 sleep (3);
55 return NIL;
56 }
57 argblk[1] = RC_EMO; /* require exact match */
58 argblk[2] = (int) (user-1); /* user name */
59 argblk[3] = 0; /* no stepping */
60 if (!jsys (RCUSR,argblk)) return NIL;
61 uid = argblk[1] = argblk[3]; /* user number */
62 argblk[2] = (int) (pass-1); /* password */
63 argblk[3] = 0; /* no special account */
64 if (!jsys (LOGIN,argblk)) return NIL;
65 return T;
66 }
69 /* Authenticated server log in
70 * Accepts: user name string
71 * authenticating user name string
72 * argument count
73 * argument vector
74 * Returns: T if password validated, NIL otherwise
75 */
77 long authserver_login (char *user,char *authuser,int argc,char *argv[])
78 {
79 return NIL; /* how to implement this on TOPS-20??? */
80 }

UW-IMAP'd extensions by yuuji