/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#pragma ident "%Z%%M% %I% %E% SMI"
#include "mail.h"
#ifdef SVR4
#include <locale.h>
#endif
/*
* mail [ -ehpPqrtw ] [-x debuglevel] [ -f file ] [ -F user(s) ]
* mail -T file persons
* mail [ -tw ] [ -m messagetype ] persons
* rmail [ -tw ] persons
*/
int
{
register int i;
char *cptr, *p;
extern char **environ;
#ifdef SVR4
#endif
/* fix here for bug #1086130 - security hole */
/* skip over the LD_* env variable */
env_var_idx = 0; next_slot_idx = 0;
}
env_var_idx++;
}
#ifdef SIGCONT
#ifdef SVR4
{
}
#else
#endif
#endif
/*
* Strip off path name of this command for use in messages
*/
program++;
} else {
}
/* Close all file descriptors except stdin, stdout & stderr */
/*
* Get group id for mail, exit if none exists
*/
exit(1);
} else {
}
/*
* Save the *id for later use.
*/
/*
* What command (rmail or mail)?
*/
}
/*
* Parse the command line and adjust argc and argv
* to compensate for any options
*/
argv += (i - 1);
argc -= (i - 1);
/* block a potential security hole */
}
if (debug == 0) {
/* If not set as an invocation option, check for system-wide */
/* global flag */
if (debug < 0) {
/* Keep trace file even if successful */
keepdbgfile = -1;
}
}
}
if (debug > 0) {
exit(13);
}
exit(13);
}
((keepdbgfile < 0) ?
"on success or failure." : "only on failure."));
}
if (goerr > 0) {
}
if (!i) {
}
done(0);
}
/*
* We are not who we appear...
*/
thissys = p;
} else {
}
if (failsafe)
/*
* Use environment variables
*/
home = ".";
}
my_name[0] = '\0';
if (pwd)
/* If root, use LOGNAME if set */
if (my_uid == 0) {
/* If root, use LOGNAME if set */
}
}
/*
* Catch signals for cleanup
*/
done(0);
}
}
/*
* Rmail is always invoked to send mail
*/
printmail();
} else {
}
done(0);
}