imapext-2007

diff 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 diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/osdep/tops-20/log_t20.c	Mon Sep 14 15:17:45 2009 +0900
     1.3 @@ -0,0 +1,80 @@
     1.4 +/* ========================================================================
     1.5 + * Copyright 1988-2006 University of Washington
     1.6 + *
     1.7 + * Licensed under the Apache License, Version 2.0 (the "License");
     1.8 + * you may not use this file except in compliance with the License.
     1.9 + * You may obtain a copy of the License at
    1.10 + *
    1.11 + *     http://www.apache.org/licenses/LICENSE-2.0
    1.12 + *
    1.13 + * 
    1.14 + * ========================================================================
    1.15 + */
    1.16 +
    1.17 +/*
    1.18 + * Program:	TOPS-20 server login
    1.19 + *
    1.20 + * Author:	Mark Crispin
    1.21 + *		Networks and Distributed Computing
    1.22 + *		Computing & Communications
    1.23 + *		University of Washington
    1.24 + *		Administration Building, AG-44
    1.25 + *		Seattle, WA  98195
    1.26 + *		Internet: MRC@CAC.Washington.EDU
    1.27 + *
    1.28 + * Date:	1 August 1988
    1.29 + * Last Edited:	30 August 2006
    1.30 + */
    1.31 +
    1.32 +
    1.33 +/* Dedication:
    1.34 + * This file is dedicated with affection to the TOPS-20 operating system, which
    1.35 + * set standards for user and programmer friendliness that have still not been
    1.36 + * equaled by more `modern' operating systems.
    1.37 + * Wasureru mon ka!!!!
    1.38 + */
    1.39 +
    1.40 +/* Server log in
    1.41 + * Accepts: user name string
    1.42 + *	    password string
    1.43 + *	    authenticating user name string
    1.44 + *	    argument count
    1.45 + *	    argument vector
    1.46 + * Returns: T if password validated, NIL otherwise
    1.47 + */
    1.48 +
    1.49 +long server_login (char *user,char *pass,char *authuser,int argc,char *argv[])
    1.50 +{
    1.51 +  int uid;
    1.52 +  int argblk[5];
    1.53 +  if (authuser && *authuser) {	/* not available */
    1.54 +    syslog (LOG_NOTICE|LOG_AUTH,
    1.55 +	    "Login %s failed: invalid authentication ID %s host=%.80s",
    1.56 +	    user,authuser,tcp_clienthost ());
    1.57 +    sleep (3);
    1.58 +    return NIL;
    1.59 +  }
    1.60 +  argblk[1] = RC_EMO;		/* require exact match */
    1.61 +  argblk[2] = (int) (user-1);	/* user name */
    1.62 +  argblk[3] = 0;		/* no stepping */
    1.63 +  if (!jsys (RCUSR,argblk)) return NIL;
    1.64 +  uid = argblk[1] = argblk[3];	/* user number */
    1.65 +  argblk[2] = (int) (pass-1);	/* password */
    1.66 +  argblk[3] = 0;		/* no special account */
    1.67 +  if (!jsys (LOGIN,argblk)) return NIL;
    1.68 +  return T;
    1.69 +}
    1.70 +
    1.71 +
    1.72 +/* Authenticated server log in
    1.73 + * Accepts: user name string
    1.74 + *	    authenticating user name string
    1.75 + *	    argument count
    1.76 + *	    argument vector
    1.77 + * Returns: T if password validated, NIL otherwise
    1.78 + */
    1.79 +
    1.80 +long authserver_login (char *user,char *authuser,int argc,char *argv[])
    1.81 +{
    1.82 +  return NIL;			/* how to implement this on TOPS-20??? */
    1.83 +}

UW-IMAP'd extensions by yuuji