mx.c   mx.c 
/* ======================================================================== /* ========================================================================
* Copyright 1988-2007 University of Washington * Copyright 1988-2008 University of Washington
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* *
* ======================================================================== * ========================================================================
*/ */
skipping to change at line 26 skipping to change at line 26
* *
* Author(s): Mark Crispin * Author(s): Mark Crispin
* Networks and Distributed Computing * Networks and Distributed Computing
* Computing & Communications * Computing & Communications
* University of Washington * University of Washington
* Administration Building, AG-44 * Administration Building, AG-44
* Seattle, WA 98195 * Seattle, WA 98195
* Internet: MRC@CAC.Washington.EDU * Internet: MRC@CAC.Washington.EDU
* *
* Date: 3 May 1996 * Date: 3 May 1996
* Last Edited: 11 October 2007 * Last Edited: 6 January 2008
*/ */
#include <stdio.h> #include <stdio.h>
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
extern int errno; /* just in case */ extern int errno; /* just in case */
#include "mail.h" #include "mail.h"
#include "osdep.h" #include "osdep.h"
#include <pwd.h> #include <pwd.h>
#include <sys/stat.h> #include <sys/stat.h>
skipping to change at line 176 skipping to change at line 176
{ {
struct stat sbuf; struct stat sbuf;
errno = NIL; /* zap error */ errno = NIL; /* zap error */
if ((strlen (name) <= NETMAXMBX) && *mx_file (tmp,name) && if ((strlen (name) <= NETMAXMBX) && *mx_file (tmp,name) &&
!stat (tmp,&sbuf) && ((sbuf.st_mode & S_IFMT) == S_IFDIR)) { !stat (tmp,&sbuf) && ((sbuf.st_mode & S_IFMT) == S_IFDIR)) {
/* name is directory; is it mx? */ /* name is directory; is it mx? */
if (!stat (MXINDEX (tmp,name),&sbuf) && if (!stat (MXINDEX (tmp,name),&sbuf) &&
((sbuf.st_mode & S_IFMT) == S_IFREG)) return T; ((sbuf.st_mode & S_IFMT) == S_IFREG)) return T;
errno = NIL; /* directory but not mx */ errno = NIL; /* directory but not mx */
} }
else if (!compare_cstring (name,"INBOX")) errno = NIL;
return NIL; return NIL;
} }
/* MX mail test for valid mailbox /* MX mail test for valid mailbox
* Accepts: mailbox name * Accepts: mailbox name
* Returns: T if valid, NIL otherwise * Returns: T if valid, NIL otherwise
*/ */
int mx_namevalid (char *name) int mx_namevalid (char *name)
{ {
 End of changes. 3 change blocks. 
2 lines changed or deleted 3 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/