xref: /titanic_51/usr/src/cmd/bnu/uucpdefs.c (revision bbaa8b60dd95d714741fc474adad3cf710ef4efd)
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 
31 #pragma ident	"%Z%%M%	%I%	%E% SMI"
32 
33 #include "uucp.h"
34 
35 /* Configurable parameters */
36 
37 GLOBAL	char	_ProtoCfg[40]="";	/* protocol string from Config file */
38 
39 /* Non-configurable parameters */
40 
41 GLOBAL	int	Ifn, Ofn;
42 GLOBAL	int 	Sgrades = FALSE;
43 GLOBAL	int	Debug = 0;
44 GLOBAL	int	SizeCheck = 0;		/* Ulimit checking supported flag */
45 GLOBAL	long	RemUlimit = 0;		/* Ulimit of remote if supported */
46 GLOBAL	int	Restart = 0;		/* checkpoint restart supported flag */
47 GLOBAL	uid_t	Uid, Euid;		/* user-id and effective-uid */
48 GLOBAL	long	Ulimit;
49 GLOBAL	mode_t	Dev_mode;		/* save device mode here */
50 GLOBAL	char	Progname[NAMESIZE];
51 GLOBAL	char	Pchar;
52 GLOBAL	char	Grade = 'Z';
53 GLOBAL	char	Rmtname[MAXFULLNAME];
54 GLOBAL	char	JobGrade[MAXBASENAME+1] = { NULLCHAR };
55 GLOBAL	char	RemSpool[MAXFULLNAME];	/* spool subdirectory for remote system */
56 GLOBAL	char	User[MAXFULLNAME];
57 GLOBAL	char	Uucp[NAMESIZE];
58 GLOBAL	char	Loginuser[NAMESIZE];
59 GLOBAL	char	Myname[MAXBASENAME+1];
60 GLOBAL	char	Wrkdir[MAXFULLNAME];
61 GLOBAL	char	Logfile[MAXFULLNAME];
62 GLOBAL	char	*Spool = SPOOL;
63 GLOBAL	char	*Pubdir = PUBDIR;
64 GLOBAL	char	**Env;
65 GLOBAL	char	*Shchar = ";&|<>^`\\()'\"{}\t\n ";
66 
67 
68 GLOBAL	long	Retrytime = 0;		/* default is to use exponential backoff */
69 GLOBAL	struct	nstat Nstat;
70 GLOBAL	char	Dc[50];			/* line name				*/
71 GLOBAL	int	Seqn;			/* sequence #				*/
72 GLOBAL	int	Role;
73 GLOBAL	char	*Bnptr;			/* used when BASENAME macro is expanded */
74 GLOBAL	char	Jobid[NAMESIZE] = "";	/* Jobid of current C. file */
75 GLOBAL	int	Uerror;			/* global error code */
76 
77 GLOBAL	void	(*genbrk)();
78 
79 GLOBAL	int	Verbose = 0;	/* only for cu and ct to change */
80 
81 /* used for READANY and READSOME macros */
82 GLOBAL	struct stat __s_;
83 
84 /* messages */
85 GLOBAL char	*Ct_OPEN =	"CAN'T OPEN";
86 GLOBAL char	*Ct_WRITE =	"CAN'T WRITE";
87 GLOBAL char	*Ct_READ =	"CAN'T READ";
88 GLOBAL char	*Ct_CREATE =	"CAN'T CREATE";
89 GLOBAL char	*Ct_ALLOCATE =	"CAN'T ALLOCATE";
90 GLOBAL char	*Ct_LOCK =	"CAN'T LOCK";
91 GLOBAL char	*Ct_STAT =	"CAN'T STAT";
92 GLOBAL char	*Ct_CHOWN =	"CAN'T CHOWN";
93 GLOBAL char	*Ct_CHMOD =	"CAN'T CHMOD";
94 GLOBAL char	*Ct_LINK =	"CAN'T LINK";
95 GLOBAL char	*Ct_CHDIR =	"CAN'T CHDIR";
96 GLOBAL char	*Ct_UNLINK =	"CAN'T UNLINK";
97 GLOBAL char	*Wr_ROLE =	"WRONG ROLE";
98 GLOBAL char	*Ct_CORRUPT =	"CAN'T MOVE TO CORRUPTDIR";
99 GLOBAL char	*Ct_CLOSE =	"CAN'T CLOSE";
100 GLOBAL char	*Ct_FORK =	"CAN'T FORK";
101 GLOBAL char	*Fl_EXISTS =	"FILE EXISTS";
102 GLOBAL char	*Ct_BADOWN =	"BAD OWNER/PERMS";
103 
104 GLOBAL	char *UerrorText[] = {
105   /* SS_OK			0 */ "SUCCESSFUL",
106   /* SS_NO_DEVICE		1 */ "NO DEVICES AVAILABLE",
107   /* SS_TIME_WRONG		2 */ "WRONG TIME TO CALL",
108   /* SS_INPROGRESS		3 */ "TALKING",
109   /* SS_CONVERSATION		4 */ "CONVERSATION FAILED",
110   /* SS_SEQBAD			5 */ "BAD SEQUENCE CHECK",
111   /* SS_LOGIN_FAILED		6 */ "LOGIN FAILED",
112   /* SS_DIAL_FAILED		7 */ "DIAL FAILED",
113   /* SS_BAD_LOG_MCH		8 */ "BAD LOGIN/MACHINE COMBINATION",
114   /* SS_LOCKED_DEVICE		9 */ "DEVICE LOCKED",
115   /* SS_ASSERT_ERROR		10 */ "ASSERT ERROR",
116   /* SS_BADSYSTEM		11 */ "SYSTEM NOT IN Systems FILE",
117   /* SS_CANT_ACCESS_DEVICE	12 */ "CAN'T ACCESS DEVICE",
118   /* SS_DEVICE_FAILED		13 */ "DEVICE FAILED",
119   /* SS_WRONG_MCH		14 */ "WRONG MACHINE NAME",
120   /* SS_CALLBACK		15 */ "CALLBACK REQUIRED",
121   /* SS_RLOCKED			16 */ "REMOTE HAS A LCK FILE FOR ME",
122   /* SS_RUNKNOWN		17 */ "REMOTE DOES NOT KNOW ME",
123   /* SS_RLOGIN			18 */ "REMOTE REJECT AFTER LOGIN",
124   /* SS_UNKNOWN_RESPONSE	19 */ "REMOTE REJECT, UNKNOWN MESSAGE",
125   /* SS_STARTUP			20 */ "STARTUP FAILED",
126   /* SS_CHAT_FAILED		21 */ "CALLER SCRIPT FAILED",
127   /* SS_CALLBACK_LOOP		22 */ "CALLBACK REQUIRED - LOOP",
128 };
129