xref: /titanic_51/usr/src/lib/libnsl/dial/uucpdefs.c (revision 1a7c1b724419d3cb5fa6eea75123c6b2060ba31b)
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 /*
24  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
25  * Use is subject to license terms.
26  */
27 
28 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
29 /*	  All Rights Reserved  	*/
30 
31 #pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.1	*/
32 
33 #include "uucp.h"
34 
35 /* Configurable parameters */
36 
37 static	char	_ProtoCfg[40];		/* protocol string from Config file */
38 
39 /* Non-configurable parameters */
40 
41 static	int	Debug;
42 static	uid_t	Uid, Euid;		/* user-id and effective-uid */
43 static	mode_t	Dev_mode;		/* save device mode here */
44 static	char	Progname[NAMESIZE];
45 static	const char	*Spool = SPOOL;
46 static	const char	*Pubdir = PUBDIR;
47 
48 static	long	Retrytime;
49 static	char	Dc[50];			/* line name			*/
50 static	char	*Bnptr;			/* used when BASENAME macro expanded */
51 static	int	Uerror;			/* global error code */
52 
53 static	void	(*genbrk)();
54 
55 static	int	Verbose;	/* only for cu and ct to change */
56 
57 /* messages */
58 static const char	Ct_OPEN[] =	"CAN'T OPEN";
59 static const char	Ct_WRITE[] =	"CAN'T WRITE";
60 static const char	Ct_READ[] =	"CAN'T READ";
61 static const char	Ct_CREATE[] =	"CAN'T CREATE";
62 static const char	Ct_ALLOCATE[] =	"CAN'T ALLOCATE";
63 static const char	Ct_LOCK[] =	"CAN'T LOCK";
64 static const char	Ct_STAT[] =	"CAN'T STAT";
65 static const char	Ct_CHOWN[] =	"CAN'T CHOWN";
66 static const char	Ct_CHMOD[] =	"CAN'T CHMOD";
67 static const char	Ct_LINK[] =	"CAN'T LINK";
68 static const char	Ct_CHDIR[] =	"CAN'T CHDIR";
69 static const char	Ct_UNLINK[] =	"CAN'T UNLINK";
70 static const char	Wr_ROLE[] =	"WRONG ROLE";
71 static const char	Ct_CORRUPT[] =	"CAN'T MOVE TO CORRUPTDIR";
72 static const char	Ct_CLOSE[] =	"CAN'T CLOSE";
73 static const char	Ct_FORK[] =	"CAN'T FORK";
74 static const char	Fl_EXISTS[] =	"FILE EXISTS";
75 static const char	Ct_BADOWN[] =	"BAD OWNER/PERMS";
76 
77 static char *UerrorText[] = {
78 /* SS_OK			0 */ "SUCCESSFUL",
79 /* SS_NO_DEVICE			1 */ "NO DEVICES AVAILABLE",
80 /* SS_TIME_WRONG		2 */ "WRONG TIME TO CALL",
81 /* SS_INPROGRESS		3 */ "TALKING",
82 /* SS_CONVERSATION		4 */ "CONVERSATION FAILED",
83 /* SS_SEQBAD			5 */ "BAD SEQUENCE CHECK",
84 /* SS_LOGIN_FAILED		6 */ "LOGIN FAILED",
85 /* SS_DIAL_FAILED		7 */ "DIAL FAILED",
86 /* SS_BAD_LOG_MCH		8 */ "BAD LOGIN/MACHINE COMBINATION",
87 /* SS_LOCKED_DEVICE		9 */ "DEVICE LOCKED",
88 /* SS_ASSERT_ERROR		10 */ "ASSERT ERROR",
89 /* SS_BADSYSTEM			11 */ "SYSTEM NOT IN Systems FILE",
90 /* SS_CANT_ACCESS_DEVICE	12 */ "CAN'T ACCESS DEVICE",
91 /* SS_DEVICE_FAILED		13 */ "DEVICE FAILED",
92 /* SS_WRONG_MCH			14 */ "WRONG MACHINE NAME",
93 /* SS_CALLBACK			15 */ "CALLBACK REQUIRED",
94 /* SS_RLOCKED			16 */ "REMOTE HAS A LCK FILE FOR ME",
95 /* SS_RUNKNOWN			17 */ "REMOTE DOES NOT KNOW ME",
96 /* SS_RLOGIN			18 */ "REMOTE REJECT AFTER LOGIN",
97 /* SS_UNKNOWN_RESPONSE		19 */ "REMOTE REJECT, UNKNOWN MESSAGE",
98 /* SS_STARTUP			20 */ "STARTUP FAILED",
99 /* SS_CHAT_FAILED		21 */ "CALLER SCRIPT FAILED",
100 /* SS_CALLBACK_LOOP		22 */ "CALLBACK REQUIRED - LOOP",
101 };
102