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