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