uucico.c revision 052519c2d30736afb1861979b73d5a889cf7fba8
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * CDDL HEADER START
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * The contents of this file are subject to the terms of the
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * Common Development and Distribution License (the "License").
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * You may not use this file except in compliance with the License.
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * See the License for the specific language governing permissions
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * and limitations under the License.
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * When distributing Covered Code, include this CDDL HEADER in each
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * If applicable, add the following below this CDDL HEADER, with the
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * fields enclosed by brackets "[]" replaced with your own identifying
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * information: Portions Copyright [yyyy] [name of copyright owner]
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * CDDL HEADER END
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * Copyright 2014 Garrett D'Amore
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * Use is subject to license terms.
ebbab6bbae913efeadfa3c6a1b082664a125f95bDan Price/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
ebbab6bbae913efeadfa3c6a1b082664a125f95bDan Price/* All Rights Reserved */
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * uucp file transfer program:
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * to place a call to a remote machine, login, and
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * copy files between the two machines.
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * Added check to limit the total number of uucicos as defined
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * in the Limits file.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe * Added -f flag to "force execution", ignoring the limit on the
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza * number of uucicos. This will be used when invoking uucico from
ebbab6bbae913efeadfa3c6a1b082664a125f95bDan Price#endif /* V7 */
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza#endif /* TLI */
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Prazaextern unsigned msgtime;
71e464e521434117b4a9290e959715a305141f0bPeter Dennis - Sustaining Engineerextern int (*Setup)(), (*Teardown)(); /* defined in interface.c */
71e464e521434117b4a9290e959715a305141f0bPeter Dennis - Sustaining Engineer#define USAGE "Usage: %s [-x NUM] [-r [0|1]] -s SYSTEM -u USERID -d SPOOL -i INTERFACE [-f]\n"
#ifdef NOSTRANGERS
extern char *Mytype;
static char *pskip();
int argc;
char *argv[];
char **envp;
extern void setservice();
#ifndef ATTSVR3
void setTZ();
char *ttyn;
int maxnumb;
if (Uid == 0)
closedem();
#ifdef SIGUSR1
#ifdef SIGUSR2
#ifdef BSD4_2
pfInit();
switch (ret) {
++force;
if (Debug <= 0)
if (force) {
if (maxnumb < 0) {
#ifndef ATTSVR3
setTZ();
(void) savline();
(void) restline();
exit(0);
if (ret != 0) {
(void) alarm(0);
(void) restline();
exit(0);
(void) alarm(0);
p = pskip(q);
seq = 0;
q = pskip(p);
if (Debug <= 0)
if (seq < 0)
seq = 0;
#ifdef MAXGRADE
Restart++;
SizeCheck++;
if (Restart)
#ifdef NOSTRANGERS
if (Restart) {
if (SizeCheck)
(void) cmtseq();
ulkseq();
#ifndef V7
long minulimit;
Rmtname);
if (Ofn < 0) {
if (ret != 0) {
(void) alarm(0);
#ifdef MAXGRADE
if (ret != 0) {
(void) alarm(0);
ulkseq();
(void) alarm(0);
Uerror = 0;
if (Uerror) {
ulkseq();
(void) cmtseq();
q = pskip(p);
Restart++;
SizeCheck++;
if (!Debug) {
if (Debug <= 0)
(void) alarm(0);
if (exitcode == 0) {
if (ret != 0)
(void) alarm(0);
int code;
closedem();
cleanTM();
short TM_cnt = 0;
cleanTM()
for(i=0; i < TM_cnt; i++) {
char *file;
if (TM_cnt == 0)
TM_cnt++;
int inter;
if (inter == 0)
int inter;
closedem();
abort();
timeout()
pskip(p)
*p++ = NULLCHAR;
closedem()
int i, maxfiles;
#ifdef ATTSVR3
#ifdef BSD4_2
(void) close(i);
#ifndef ATTSVR3
setTZ()
extern char *fgets();
++bp;
#ifdef NOSTRANGERS
checkrmt ()
if ( procid == 0 ) {
} else if (procid < 0) {