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 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 23 /* All Rights Reserved */ 24 25 26 /* 27 * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 28 * Use is subject to license terms. 29 */ 30 31 #pragma ident "%Z%%M% %I% %E% SMI" 32 33 #ifndef _UUCP_H 34 #define _UUCP_H 35 36 #if !defined(__STDC__) 37 #define const /* XXX - what a hack */ 38 #endif 39 40 #include <sys/types.h> 41 #include <unistd.h> 42 #include <stdlib.h> 43 #include <string.h> 44 #include "parms.h" 45 46 #ifdef DIAL 47 #define EXTERN static 48 #define GLOBAL static 49 #else 50 #define EXTERN extern 51 #define GLOBAL 52 #endif 53 54 #ifdef BSD4_2 55 #define V7 56 #undef NONAP 57 #undef FASTTIMER 58 #endif /* BSD4_2 */ 59 60 #ifdef FASTTIMER 61 #undef NONAP 62 #endif 63 64 #ifdef V8 65 #define V7 66 #endif /* V8 */ 67 68 #include <stdio.h> 69 #include <ctype.h> 70 #include <setjmp.h> 71 #include <sys/param.h> 72 73 /* 74 * param.h includes types.h and signal.h in 4bsd 75 */ 76 #ifdef V7 77 #include <sgtty.h> 78 #include <sys/timeb.h> 79 #else /* !V7 */ 80 #include <termio.h> 81 #include <sys/types.h> 82 #include <signal.h> 83 #include <fcntl.h> 84 #endif 85 86 #include <sys/stat.h> 87 #include <utime.h> 88 #include <dirent.h> 89 90 #ifdef BSD4_2 91 #include <sys/time.h> 92 #else /* !BSD4_2 */ 93 #include <time.h> 94 #endif 95 96 #include <sys/times.h> 97 #include <errno.h> 98 99 #ifdef ATTSV 100 #include <sys/mkdev.h> 101 #endif /* ATTSV */ 102 103 #ifdef RT 104 #include "rt/types.h" 105 #include "rt/unix/param.h" 106 #include "rt/stat.h" 107 #include <sys/ustat.h> 108 #endif /* RT */ 109 110 /* what mode should user files be allowed to have upon creation? */ 111 /* NOTE: This does not allow setuid or execute bits on transfer. */ 112 #define LEGALMODE (mode_t) 0666 113 114 /* what mode should public files have upon creation? */ 115 #define PUB_FILEMODE (mode_t) 0666 116 117 /* what mode should log files have upon creation? */ 118 #define LOGFILEMODE (mode_t) 0644 119 120 /* what mode should C. files have upon creation? */ 121 #define CFILEMODE (mode_t) 0644 122 123 /* what mode should D. files have upon creation? */ 124 #define DFILEMODE (mode_t) 0600 125 126 /* define the value of PUBMASK, used for creating "public" directories */ 127 #define PUBMASK (mode_t) 0000 128 129 /* what mode should public directories have upon creation? */ 130 #define PUB_DIRMODE (mode_t) 0777 131 132 /* define the value of DIRMASK, used for creating "system" subdirectories */ 133 #define DIRMASK (mode_t) 0022 134 135 #define MAXSTART 300 /* how long to wait on startup */ 136 137 /* define the last characters for ACU (used for 801/212 dialers) */ 138 #define ACULAST "<" 139 140 /* caution - the fillowing names are also in Makefile 141 * any changes here have to also be made there 142 * 143 * it's a good idea to make directories .foo, since this ensures 144 * that they'll be ignored by processes that search subdirectories in SPOOL 145 * 146 * XQTDIR=/var/uucp/.Xqtdir 147 * CORRUPT=/var/uucp/.Corrupt 148 * LOGDIR=/var/uucp/.Log 149 * SEQDIR=/var/uucp/.Sequence 150 * STATDIR=/var/uucp/.Status 151 * 152 */ 153 154 /* where to put the STST. files? */ 155 #define STATDIR (const char *)"/var/uucp/.Status" 156 157 /* where should logfiles be kept? */ 158 #define LOGUUX (const char *)"/var/uucp/.Log/uux" 159 #define LOGUUXQT (const char *)"/var/uucp/.Log/uuxqt" 160 #define LOGUUCP (const char *)"/var/uucp/.Log/uucp" 161 #define LOGCICO (const char *)"/var/uucp/.Log/uucico" 162 #define CORRUPTDIR (const char *)"/var/uucp/.Corrupt" 163 164 /* some sites use /var/uucp/.XQTDIR here */ 165 /* use caution since things are linked into there */ 166 #define XQTDIR (const char *)"/var/uucp/.Xqtdir" 167 168 /* how much of a system name can we print in a [CX]. file? */ 169 /* MAXBASENAME - 1 (pre) - 1 ('.') - 1 (grade) - 4 (sequence number) */ 170 #define SYSNSIZE (MAXBASENAME - 7) 171 172 #ifdef USRSPOOLLOCKS 173 #define LOCKPRE (const char *)"/var/spool/locks/LCK." 174 #else 175 #define LOCKPRE (const char *)"/var/spool/uucp/LCK." 176 #endif /* USRSPOOLLOCKS */ 177 178 #define SQFILE (const char *)"/etc/uucp/SQFILE" 179 #define SQTMP (const char *)"/etc/uucp/SQTMP" 180 #define SLCKTIME 5400 /* system/device timeout (LCK.. files) */ 181 #define DIALCODES (const char *)"/etc/uucp/Dialcodes" 182 #define PERMISSIONS (const char *)"/etc/uucp/Permissions" 183 184 #define SPOOL (const char *)"/var/spool/uucp" 185 #define SEQDIR (const char *)"/var/uucp/.Sequence" 186 187 #define X_LOCKTIME 3600 188 #ifdef USRSPOOLLOCKS 189 #define SEQLOCK (const char *)"/var/spool/locks/LCK.SQ." 190 #define SQLOCK (const char *)"/var/spool/locks/LCK.SQ" 191 #define X_LOCK (const char *)"/var/spool/locks/LCK.X" 192 #define S_LOCK (const char *)"/var/spool/locks/LCK.S" 193 #define L_LOCK (const char *)"/var/spool/locks/LK" 194 #define X_LOCKDIR (const char *)"/var/spool/locks" /* must be dir part of above */ 195 #else 196 #define SEQLOCK (const char *)"/var/spool/uucp/LCK.SQ." 197 #define SQLOCK (const char *)"/var/spool/uucp/LCK.SQ" 198 #define X_LOCK (const char *)"/var/spool/uucp/LCK.X" 199 #define S_LOCK (const char *)"/var/spool/uucp/LCK.S" 200 #define L_LOCK (const char *)"/var/spool/uucp/LK" 201 #define X_LOCKDIR (const char *)"/var/spool/uucp" /* must be dir part of above */ 202 #endif /* USRSPOOLLOCKS */ 203 #define X_LOCKPRE (const char *)"LCK.X" /* must be last part of above */ 204 205 #define PUBDIR (const char *)"/var/spool/uucppublic" 206 #define ADMIN (const char *)"/var/uucp/.Admin" 207 #define ERRLOG (const char *)"/var/uucp/.Admin/errors" 208 #define SYSLOG (const char *)"/var/uucp/.Admin/xferstats" 209 #define RMTDEBUG (const char *)"/var/uucp/.Admin/audit" 210 #define CLEANUPLOGFILE (const char *)"/var/uucp/.Admin/uucleanup" 211 #define CMDLOG (const char *)"/var/uucp/.Admin/command" 212 #define PERFLOG (const char *)"/var/uucp/.Admin/perflog" 213 #define ACCOUNT (const char *)"/var/uucp/.Admin/account" 214 #define SECURITY (const char *)"/var/uucp/.Admin/security" 215 216 #define WORKSPACE (const char *)"/var/uucp/.Workspace" 217 218 #define SQTIME 60 219 #define TRYCALLS 2 /* number of tries to dial call */ 220 #define MINULIMIT (1L<<11) /* minimum reasonable ulimit */ 221 #define MAX_LOCKTRY 5 /* number of attempts to lock device */ 222 223 /* 224 * CDEBUG is for communication line debugging 225 * DEBUG is for program debugging 226 * #define SMALL to compile without the DEBUG code 227 */ 228 229 #ifndef DIAL 230 #define CDEBUG(l, f, s) if (Debug >= l) fprintf(stderr, f, s) 231 #else 232 #define CDEBUG(l, f, s) 233 #define SMALL 234 #endif 235 236 #ifndef SMALL 237 #define DEBUG(l, f, s) if (Debug >= l) fprintf(stderr, f, s) 238 #else 239 #define DEBUG(l, f, s) 240 #endif /* SMALL */ 241 242 /* 243 * VERBOSE is used by cu and ct to inform the user of progress 244 * In other programs, the Value of Verbose is always 0. 245 */ 246 #define VERBOSE(f, s) { if (Verbose > 0) fprintf(stderr, f, s); } 247 248 #define PREFIX(pre, str) (strncmp((pre), (str), strlen(pre)) == SAME) 249 #define BASENAME(str, c) ((Bnptr = strrchr((str), c)) ? (Bnptr + 1) : (str)) 250 #define EQUALS(a,b) ((a != CNULL) && (b != CNULL) && (strcmp((a),(b))==SAME)) 251 #define EQUALSN(a,b,n) ((a != CNULL) && (b != CNULL) && (strncmp((a),(b),(n))==SAME)) 252 #define LASTCHAR(s) (s+strlen(s)-1) 253 254 #define SAME 0 255 #define ANYREAD 04 256 #define ANYWRITE 02 257 #define FAIL -1 258 #define SUCCESS 0 259 #define NULLCHAR '\0' 260 #define CNULL (char *) 0 261 #define STBNULL (struct sgttyb *) 0 262 #define MASTER 1 263 #define SLAVE 0 264 #define MAXBASENAME 14 /* should be DIRSIZ but that is now fs dependent */ 265 #define MAXFULLNAME BUFSIZ 266 #define MAXNAMESIZE 64 /* /var/spool/uucp/<14 chars>/<14 chars>+slop */ 267 #define CONNECTTIME 30 268 #define EXPECTTIME 45 269 #define MSGTIME 60 270 #define NAMESIZE MAXBASENAME+1 271 #define SIZEOFPID 10 /* maximum number of digits in a pid */ 272 #define EOTMSG "\004\n\004\n" 273 #define CALLBACK 1 274 275 /* manifests for sysfiles.c's sysaccess() */ 276 /* check file access for REAL user id */ 277 #define ACCESS_SYSTEMS 1 278 #define ACCESS_DEVICES 2 279 #define ACCESS_DIALERS 3 280 /* check file access for EFFECTIVE user id */ 281 #define EACCESS_SYSTEMS 4 282 #define EACCESS_DEVICES 5 283 #define EACCESS_DIALERS 6 284 285 /* manifest for chkpth flag */ 286 #define CK_READ 0 287 #define CK_WRITE 1 288 289 /* 290 * commands 291 */ 292 #define SHELL (const char *)"/usr/bin/sh" 293 #define MAIL (const char *)"mail" 294 #define UUCICO (const char *)"/usr/lib/uucp/uucico" 295 #define UUXQT (const char *)"/usr/lib/uucp/uuxqt" 296 #define UUX (const char *)"/usr/bin/uux" 297 #define UUCP (const char *)"/usr/bin/uucp" 298 299 300 /* system status stuff */ 301 #define SS_OK 0 302 #define SS_NO_DEVICE 1 303 #define SS_TIME_WRONG 2 304 #define SS_INPROGRESS 3 305 #define SS_CONVERSATION 4 306 #define SS_SEQBAD 5 307 #define SS_LOGIN_FAILED 6 308 #define SS_DIAL_FAILED 7 309 #define SS_BAD_LOG_MCH 8 310 #define SS_LOCKED_DEVICE 9 311 #define SS_ASSERT_ERROR 10 312 #define SS_BADSYSTEM 11 313 #define SS_CANT_ACCESS_DEVICE 12 314 #define SS_DEVICE_FAILED 13 /* used for interface failure */ 315 #define SS_WRONG_MCH 14 316 #define SS_CALLBACK 15 317 #define SS_RLOCKED 16 318 #define SS_RUNKNOWN 17 319 #define SS_RLOGIN 18 320 #define SS_UNKNOWN_RESPONSE 19 321 #define SS_STARTUP 20 322 #define SS_CHAT_FAILED 21 323 #define SS_CALLBACK_LOOP 22 324 325 #define MAXPH 60 /* maximum phone string size */ 326 #define MAXC BUFSIZ 327 328 #define TRUE 1 329 #define FALSE 0 330 #define NAMEBUF 32 331 332 /* The call structure is used by ct.c, cu.c, and dial.c. */ 333 334 struct call { 335 char *speed; /* transmission baud rate */ 336 char *line; /* device name for outgoing line */ 337 char *telno; /* ptr to tel-no digit string */ 338 char *type; /* type of device to use for call. */ 339 }; 340 341 /* structure of an Systems file line */ 342 #define F_MAX 50 /* max number of fields in Systems file line */ 343 #define F_NAME 0 344 #define F_TIME 1 345 #define F_TYPE 2 346 #define F_CLASS 3 /* an optional prefix and the speed */ 347 #define F_PHONE 4 348 #define F_LOGIN 5 349 350 /* structure of an Devices file line */ 351 #define D_TYPE 0 352 #define D_LINE 1 353 #define D_CALLDEV 2 354 #define D_CLASS 3 355 #define D_CALLER 4 356 #define D_ARG 5 357 #define D_MAX 50 /* max number of fields in Devices file line */ 358 359 #define D_ACU 1 360 #define D_DIRECT 2 361 #define D_PROT 4 362 363 #define GRADES "/etc/uucp/Grades" 364 365 #define D_QUEUE 'Z' /* default queue */ 366 367 /* past here, local changes are not recommended */ 368 #define CMDPRE 'C' 369 #define DATAPRE 'D' 370 #define XQTPRE 'X' 371 372 /* 373 * stuff for command execution 374 */ 375 #define X_RQDFILE 'F' 376 #define X_STDIN 'I' 377 #define X_STDOUT 'O' 378 #define X_STDERR 'E' 379 #define X_CMD 'C' 380 #define X_USER 'U' 381 #define X_BRINGBACK 'B' 382 #define X_MAILF 'M' 383 #define X_RETADDR 'R' 384 #define X_COMMENT '#' 385 #define X_NONZERO 'Z' 386 #define X_SENDNOTHING 'N' 387 #define X_SENDZERO 'n' 388 389 390 /* This structure describes call routines */ 391 struct caller { 392 const char *CA_type; 393 int (*CA_caller)(); 394 }; 395 396 /* structure for a saved C file */ 397 398 struct cs_struct { 399 char file[NAMESIZE]; 400 char sys[NAMESIZE+5]; 401 char sgrade[NAMESIZE]; 402 char grade; 403 long jsize; 404 }; 405 406 /* This structure describes dialing routines */ 407 struct dialer { 408 char *DI_type; 409 int (*DI_dialer)(); 410 }; 411 412 struct nstat { 413 pid_t t_pid; /* process id */ 414 time_t t_start; /* start time */ 415 time_t t_scall; /* start call to system */ 416 time_t t_ecall; /* end call to system */ 417 time_t t_tacu; /* acu time */ 418 time_t t_tlog; /* login time */ 419 time_t t_sftp; /* start file transfer protocol */ 420 time_t t_sxf; /* start xfer */ 421 time_t t_exf; /* end xfer */ 422 time_t t_eftp; /* end file transfer protocol */ 423 time_t t_qtime; /* time file queued */ 424 int t_ndial; /* # of dials */ 425 int t_nlogs; /* # of login trys */ 426 struct tms t_tbb; /* start execution times */ 427 struct tms t_txfs; /* xfer start times */ 428 struct tms t_txfe; /* xfer end times */ 429 struct tms t_tga; /* garbage execution times */ 430 }; 431 432 /* This structure describes the values from Limits file */ 433 struct limits { 434 int totalmax; /* overall limit */ 435 int sitemax; /* limit per site */ 436 char mode[64]; /* uucico mode */ 437 }; 438 439 /* external declarations */ 440 441 EXTERN ssize_t (*Read)(), (*Write)(); 442 #if defined(__STDC__) 443 EXTERN int (*Ioctl)(int,int,...); 444 #else 445 EXTERN int (*Ioctl)(); 446 #endif 447 #ifndef DIAL 448 EXTERN int Ifn, Ofn; 449 #endif 450 EXTERN int Debug, Verbose; 451 EXTERN uid_t Uid, Euid; /* user-id and effective-uid */ 452 #ifndef DIAL 453 EXTERN long Ulimit; 454 #endif 455 EXTERN mode_t Dev_mode; /* save device mode here */ 456 #ifndef DIAL 457 EXTERN char Wrkdir[]; 458 #endif 459 EXTERN long Retrytime; 460 #ifndef DIAL 461 EXTERN char **Env; 462 EXTERN char Uucp[]; 463 EXTERN char Pchar; 464 EXTERN struct nstat Nstat; 465 #endif 466 EXTERN char Dc[]; /* line name */ 467 #ifndef DIAL 468 EXTERN int Seqn; /* sequence # */ 469 EXTERN int Role; 470 EXTERN int Sgrades; /* flag for administrator defined service grades */ 471 EXTERN char Grade; 472 EXTERN char Logfile[]; 473 EXTERN char Rmtname[]; 474 EXTERN char JobGrade[]; 475 EXTERN char User[]; 476 EXTERN char Loginuser[]; 477 #endif 478 EXTERN const char *Spool; 479 EXTERN const char *Pubdir; 480 #ifndef DIAL 481 EXTERN char Myname[]; 482 #endif 483 EXTERN char Progname[]; 484 #ifndef DIAL 485 EXTERN char RemSpool[]; 486 #endif 487 EXTERN char *Bnptr; /* used when BASENAME macro is expanded */ 488 extern char *sys_errlist[]; 489 #ifndef DIAL 490 EXTERN int SizeCheck; /* ulimit check supported flag */ 491 EXTERN long RemUlimit; /* remote ulimit if supported */ 492 EXTERN int Restart; /* checkpoint restart supported flag */ 493 #endif 494 495 #ifndef DIAL 496 EXTERN char Jobid[]; /* Jobid of current C. file */ 497 #endif 498 EXTERN int Uerror; /* global error code */ 499 EXTERN char *UerrorText[]; /* text for error code */ 500 501 /* Some global I need for section 2 and section 3 routines */ 502 extern char *optarg; /* for getopt() */ 503 extern int optind; /* for getopt() */ 504 505 #define UERRORTEXT UerrorText[Uerror] 506 #define UTEXT(x) UerrorText[x] 507 508 /* things get kind of tricky beyond this point -- please stay out */ 509 510 #ifdef ATTSV 511 #define index strchr 512 #define rindex strrchr 513 #define vfork fork 514 #define ATTSVKILL 515 #define UNAME 516 #else 517 #define strchr index 518 #define strrchr rindex 519 #endif 520 521 #ifndef DIAL 522 523 #if defined(sparc) 524 #define _STAT _stat 525 #else /* !sparc */ 526 #define _STAT stat 527 #endif /* sparc */ 528 529 EXTERN struct stat __s_; 530 #define READANY(f) ((_STAT((f),&__s_)==0) && ((__s_.st_mode&(0004))!=0) ) 531 #define READSOME(f) ((_STAT((f),&__s_)==0) && ((__s_.st_mode&(0444))!=0) ) 532 533 #define WRITEANY(f) ((_STAT((f),&__s_)==0) && ((__s_.st_mode&(0002))!=0) ) 534 #define DIRECTORY(f) ((_STAT((f),&__s_)==0) && ((__s_.st_mode&(S_IFMT))==S_IFDIR) ) 535 #define NOTEMPTY(f) ((_STAT((f),&__s_)==0) && (__s_.st_size!=0) ) 536 #endif 537 538 /* standard functions used */ 539 540 extern char *strcat(), *strcpy(), *strncpy(), *strrchr(); 541 extern char *strchr(), *strpbrk(); 542 extern char *index(), *rindex(), *getlogin(), *ttyname(); /*, *malloc(); 543 extern char *calloc(); */ 544 extern time_t time(); 545 extern int pipe(), close(), getopt(); 546 extern struct tm *localtime(); 547 extern FILE *popen(); 548 #ifdef BSD4_2 549 extern char *sprintf(); 550 #endif /* BSD4_2 */ 551 552 /* uucp functions and subroutine */ 553 EXTERN void (*genbrk)(); 554 extern int iswrk(), gtwvec(); /* anlwrk.c */ 555 extern void findgrade(); /* grades.c */ 556 extern void chremdir(), mkremdir(); /* chremdir.c */ 557 extern void toCorrupt(); /* cpmv.c */ 558 extern int xmv(); /* cpmv.c */ 559 560 EXTERN int getargs(); /* getargs.c */ 561 EXTERN void bsfix(); /* getargs.c */ 562 extern char *getprm(); /* getprm.c */ 563 564 extern char *next_token(); /* permission.c */ 565 extern char *nextarg(); /* permission.c */ 566 extern int getuline(); /* permission.c */ 567 568 #if defined(__STDC__) 569 EXTERN void logent(const char *, const char *); /* logent.c */ 570 EXTERN void syslog(), closelog(); /* logent.c */ 571 #else 572 EXTERN void logent(), syslog(), closelog(); /* logent.c */ 573 #endif 574 extern void commandlog(); /* logent.c */ 575 extern time_t millitick(); /* logent.c */ 576 577 extern unsigned long getfilesize(); /* statlog.c */ 578 extern void putfilesize(); /* statlog.c */ 579 580 EXTERN char *protoString(); /* permission.c */ 581 extern int logFind(), mchFind(); /* permission.c */ 582 extern int chkperm(), chkpth(); /* permission.c */ 583 extern int cmdOK(), switchRole(); /* permission.c */ 584 extern int callBack(), requestOK(); /* permission.c */ 585 extern int noSpool(); /* permission.c */ 586 extern void myName(); /* permission.c */ 587 588 extern int mkdirs(); /* expfile.c */ 589 extern int scanlimit(); /* limits.c */ 590 extern void systat(); /* systat.c */ 591 EXTERN int fd_mklock(), fd_cklock(); /* ulockf.c */ 592 EXTERN int fn_cklock(); /* ulockf.c */ 593 EXTERN int mklock(), cklock(), mlock(); /* ulockf.c */ 594 EXTERN void fd_rmlock(), delock(), rmlock(); /* ulockf.c */ 595 extern char *timeStamp(); /* utility.c */ 596 #if defined(__STDC__) 597 EXTERN void assert(const char *s1, const char *s2, 598 int i1, const char *s3, int i2); /* utility.c */ 599 #else 600 EXTERN void assert(); /* utility.c */ 601 #endif 602 EXTERN void errent(); /* utility.c */ 603 extern void uucpname(); /* uucpname.c */ 604 extern int versys(); /* versys.c */ 605 extern void xuuxqt(), xuucico(); /* xqt.c */ 606 EXTERN void cleanup(); /* misc main.c */ 607 608 #define ASSERT(e, s1, s2, i1) if (!(e)) {\ 609 assert(s1, s2, i1, __FILE__, __LINE__);\ 610 cleanup(FAIL);}; 611 612 #ifdef ATTSV 613 unsigned sleep(); 614 void exit(), setbuf(); 615 long ulimit(); 616 #else /* !ATTSV */ 617 int sleep(), exit(), setbuf(), ftime(); 618 #endif 619 620 #ifdef UNAME 621 #include <sys/utsname.h> 622 #endif /* UNAME */ 623 624 #ifndef NOUSTAT 625 #ifdef V7USTAT 626 struct ustat { 627 daddr_t f_tfree; /* total free */ 628 ino_t f_tinode; /* total inodes free */ 629 }; 630 #else /* !NOUSTAT && !V7USTAT */ 631 #include <ustat.h> 632 #endif /* V7USTAT */ 633 #endif /* NOUSTAT */ 634 635 #ifdef BSD4_2 636 char *gethostname(); 637 #endif /* BSD4_2 */ 638 639 /* messages */ 640 EXTERN const char Ct_OPEN[]; 641 EXTERN const char Ct_WRITE[]; 642 EXTERN const char Ct_READ[]; 643 EXTERN const char Ct_CREATE[]; 644 EXTERN const char Ct_ALLOCATE[]; 645 EXTERN const char Ct_LOCK[]; 646 EXTERN const char Ct_STAT[]; 647 EXTERN const char Ct_CHOWN[]; 648 EXTERN const char Ct_CHMOD[]; 649 EXTERN const char Ct_LINK[]; 650 EXTERN const char Ct_CHDIR[]; 651 EXTERN const char Ct_UNLINK[]; 652 EXTERN const char Wr_ROLE[]; 653 EXTERN const char Ct_CORRUPT[]; 654 EXTERN const char Ct_FORK[]; 655 EXTERN const char Ct_CLOSE[]; 656 EXTERN const char Ct_BADOWN[]; 657 EXTERN const char Fl_EXISTS[]; 658 659 #endif 660