xref: /illumos-gate/usr/src/cmd/bnu/uucpdefs.c (revision d17be682a2c70b4505d43c830bbd2603da11918d)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 1997 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28 /*	  All Rights Reserved  	*/
29 
30 #include "uucp.h"
31 
32 /* Configurable parameters */
33 
34 GLOBAL	char	_ProtoCfg[40]="";	/* protocol string from Config file */
35 
36 /* Non-configurable parameters */
37 
38 GLOBAL	int	Ifn, Ofn;
39 GLOBAL	int 	Sgrades = FALSE;
40 GLOBAL	int	Debug = 0;
41 GLOBAL	int	SizeCheck = 0;		/* Ulimit checking supported flag */
42 GLOBAL	long	RemUlimit = 0;		/* Ulimit of remote if supported */
43 GLOBAL	int	Restart = 0;		/* checkpoint restart supported flag */
44 GLOBAL	uid_t	Uid, Euid;		/* user-id and effective-uid */
45 GLOBAL	long	Ulimit;
46 GLOBAL	mode_t	Dev_mode;		/* save device mode here */
47 GLOBAL	char	Progname[NAMESIZE];
48 GLOBAL	char	Pchar;
49 GLOBAL	char	Grade = 'Z';
50 GLOBAL	char	Rmtname[MAXFULLNAME];
51 GLOBAL	char	JobGrade[MAXBASENAME+1] = { NULLCHAR };
52 GLOBAL	char	RemSpool[MAXFULLNAME];	/* spool subdirectory for remote system */
53 GLOBAL	char	User[MAXFULLNAME];
54 GLOBAL	char	Uucp[NAMESIZE];
55 GLOBAL	char	Loginuser[NAMESIZE];
56 GLOBAL	char	Myname[MAXBASENAME+1];
57 GLOBAL	char	Wrkdir[MAXFULLNAME];
58 GLOBAL	char	Logfile[MAXFULLNAME];
59 GLOBAL	char	*Spool = SPOOL;
60 GLOBAL	char	*Pubdir = PUBDIR;
61 GLOBAL	char	**Env;
62 GLOBAL	char	*Shchar = ";&|<>^`\\()'\"{}\t\n ";
63 
64 
65 GLOBAL	long	Retrytime = 0;		/* default is to use exponential backoff */
66 GLOBAL	struct	nstat Nstat;
67 GLOBAL	char	Dc[50];			/* line name				*/
68 GLOBAL	int	Seqn;			/* sequence #				*/
69 GLOBAL	int	Role;
70 GLOBAL	char	*Bnptr;			/* used when BASENAME macro is expanded */
71 GLOBAL	char	Jobid[NAMESIZE] = "";	/* Jobid of current C. file */
72 GLOBAL	int	Uerror;			/* global error code */
73 
74 GLOBAL	void	(*genbrk)();
75 
76 GLOBAL	int	Verbose = 0;	/* only for cu and ct to change */
77 
78 /* used for READANY and READSOME macros */
79 GLOBAL	struct stat __s_;
80 
81 /* messages */
82 GLOBAL char	*Ct_OPEN =	"CAN'T OPEN";
83 GLOBAL char	*Ct_WRITE =	"CAN'T WRITE";
84 GLOBAL char	*Ct_READ =	"CAN'T READ";
85 GLOBAL char	*Ct_CREATE =	"CAN'T CREATE";
86 GLOBAL char	*Ct_ALLOCATE =	"CAN'T ALLOCATE";
87 GLOBAL char	*Ct_LOCK =	"CAN'T LOCK";
88 GLOBAL char	*Ct_STAT =	"CAN'T STAT";
89 GLOBAL char	*Ct_CHOWN =	"CAN'T CHOWN";
90 GLOBAL char	*Ct_CHMOD =	"CAN'T CHMOD";
91 GLOBAL char	*Ct_LINK =	"CAN'T LINK";
92 GLOBAL char	*Ct_CHDIR =	"CAN'T CHDIR";
93 GLOBAL char	*Ct_UNLINK =	"CAN'T UNLINK";
94 GLOBAL char	*Wr_ROLE =	"WRONG ROLE";
95 GLOBAL char	*Ct_CORRUPT =	"CAN'T MOVE TO CORRUPTDIR";
96 GLOBAL char	*Ct_CLOSE =	"CAN'T CLOSE";
97 GLOBAL char	*Ct_FORK =	"CAN'T FORK";
98 GLOBAL char	*Fl_EXISTS =	"FILE EXISTS";
99 GLOBAL char	*Ct_BADOWN =	"BAD OWNER/PERMS";
100 
101 GLOBAL	char *UerrorText[] = {
102   /* SS_OK			0 */ "SUCCESSFUL",
103   /* SS_NO_DEVICE		1 */ "NO DEVICES AVAILABLE",
104   /* SS_TIME_WRONG		2 */ "WRONG TIME TO CALL",
105   /* SS_INPROGRESS		3 */ "TALKING",
106   /* SS_CONVERSATION		4 */ "CONVERSATION FAILED",
107   /* SS_SEQBAD			5 */ "BAD SEQUENCE CHECK",
108   /* SS_LOGIN_FAILED		6 */ "LOGIN FAILED",
109   /* SS_DIAL_FAILED		7 */ "DIAL FAILED",
110   /* SS_BAD_LOG_MCH		8 */ "BAD LOGIN/MACHINE COMBINATION",
111   /* SS_LOCKED_DEVICE		9 */ "DEVICE LOCKED",
112   /* SS_ASSERT_ERROR		10 */ "ASSERT ERROR",
113   /* SS_BADSYSTEM		11 */ "SYSTEM NOT IN Systems FILE",
114   /* SS_CANT_ACCESS_DEVICE	12 */ "CAN'T ACCESS DEVICE",
115   /* SS_DEVICE_FAILED		13 */ "DEVICE FAILED",
116   /* SS_WRONG_MCH		14 */ "WRONG MACHINE NAME",
117   /* SS_CALLBACK		15 */ "CALLBACK REQUIRED",
118   /* SS_RLOCKED			16 */ "REMOTE HAS A LCK FILE FOR ME",
119   /* SS_RUNKNOWN		17 */ "REMOTE DOES NOT KNOW ME",
120   /* SS_RLOGIN			18 */ "REMOTE REJECT AFTER LOGIN",
121   /* SS_UNKNOWN_RESPONSE	19 */ "REMOTE REJECT, UNKNOWN MESSAGE",
122   /* SS_STARTUP			20 */ "STARTUP FAILED",
123   /* SS_CHAT_FAILED		21 */ "CALLER SCRIPT FAILED",
124   /* SS_CALLBACK_LOOP		22 */ "CALLBACK REQUIRED - LOOP",
125 };
126