1 /* 2 * Copyright (c) 1983 Eric P. Allman 3 * Copyright (c) 1988 Regents of the University of California. 4 * All rights reserved. 5 * 6 * %sccs.include.redist.c% 7 */ 8 9 #ifndef lint 10 static char sccsid[] = "@(#)readcf.c 5.30 (Berkeley) 12/24/91"; 11 #endif /* not lint */ 12 13 # include "sendmail.h" 14 15 /* 16 ** READCF -- read control file. 17 ** 18 ** This routine reads the control file and builds the internal 19 ** form. 20 ** 21 ** The file is formatted as a sequence of lines, each taken 22 ** atomically. The first character of each line describes how 23 ** the line is to be interpreted. The lines are: 24 ** Dxval Define macro x to have value val. 25 ** Cxword Put word into class x. 26 ** Fxfile [fmt] Read file for lines to put into 27 ** class x. Use scanf string 'fmt' 28 ** or "%s" if not present. Fmt should 29 ** only produce one string-valued result. 30 ** Hname: value Define header with field-name 'name' 31 ** and value as specified; this will be 32 ** macro expanded immediately before 33 ** use. 34 ** Sn Use rewriting set n. 35 ** Rlhs rhs Rewrite addresses that match lhs to 36 ** be rhs. 37 ** Mn arg=val... Define mailer. n is the internal name. 38 ** Args specify mailer parameters. 39 ** Oxvalue Set option x to value. 40 ** Pname=value Set precedence name to value. 41 ** 42 ** Parameters: 43 ** cfname -- control file name. 44 ** 45 ** Returns: 46 ** none. 47 ** 48 ** Side Effects: 49 ** Builds several internal tables. 50 */ 51 52 readcf(cfname) 53 char *cfname; 54 { 55 FILE *cf; 56 int ruleset = 0; 57 char *q; 58 char **pv; 59 struct rewrite *rwp = NULL; 60 char buf[MAXLINE]; 61 register char *p; 62 extern char **prescan(); 63 extern char **copyplist(); 64 char exbuf[MAXLINE]; 65 char pvpbuf[PSBUFSIZE]; 66 extern char *fgetfolded(); 67 extern char *munchstring(); 68 69 cf = fopen(cfname, "r"); 70 if (cf == NULL) 71 { 72 syserr("cannot open %s", cfname); 73 exit(EX_OSFILE); 74 } 75 76 FileName = cfname; 77 LineNumber = 0; 78 while (fgetfolded(buf, sizeof buf, cf) != NULL) 79 { 80 /* map $ into \001 (ASCII SOH) for macro expansion */ 81 for (p = buf; *p != '\0'; p++) 82 { 83 if (*p != '$') 84 continue; 85 86 if (p[1] == '$') 87 { 88 /* actual dollar sign.... */ 89 (void) strcpy(p, p + 1); 90 continue; 91 } 92 93 /* convert to macro expansion character */ 94 *p = '\001'; 95 } 96 97 /* interpret this line */ 98 switch (buf[0]) 99 { 100 case '\0': 101 case '#': /* comment */ 102 break; 103 104 case 'R': /* rewriting rule */ 105 for (p = &buf[1]; *p != '\0' && *p != '\t'; p++) 106 continue; 107 108 if (*p == '\0') 109 { 110 syserr("invalid rewrite line \"%s\"", buf); 111 break; 112 } 113 114 /* allocate space for the rule header */ 115 if (rwp == NULL) 116 { 117 RewriteRules[ruleset] = rwp = 118 (struct rewrite *) xalloc(sizeof *rwp); 119 } 120 else 121 { 122 rwp->r_next = (struct rewrite *) xalloc(sizeof *rwp); 123 rwp = rwp->r_next; 124 } 125 rwp->r_next = NULL; 126 127 /* expand and save the LHS */ 128 *p = '\0'; 129 expand(&buf[1], exbuf, &exbuf[sizeof exbuf], CurEnv); 130 rwp->r_lhs = prescan(exbuf, '\t', pvpbuf); 131 if (rwp->r_lhs != NULL) 132 rwp->r_lhs = copyplist(rwp->r_lhs, TRUE); 133 134 /* expand and save the RHS */ 135 while (*++p == '\t') 136 continue; 137 q = p; 138 while (*p != '\0' && *p != '\t') 139 p++; 140 *p = '\0'; 141 expand(q, exbuf, &exbuf[sizeof exbuf], CurEnv); 142 rwp->r_rhs = prescan(exbuf, '\t', pvpbuf); 143 if (rwp->r_rhs != NULL) 144 rwp->r_rhs = copyplist(rwp->r_rhs, TRUE); 145 break; 146 147 case 'S': /* select rewriting set */ 148 ruleset = atoi(&buf[1]); 149 if (ruleset >= MAXRWSETS || ruleset < 0) 150 { 151 syserr("bad ruleset %d (%d max)", ruleset, MAXRWSETS); 152 ruleset = 0; 153 } 154 rwp = NULL; 155 break; 156 157 case 'D': /* macro definition */ 158 define(buf[1], newstr(munchstring(&buf[2])), CurEnv); 159 break; 160 161 case 'H': /* required header line */ 162 (void) chompheader(&buf[1], TRUE); 163 break; 164 165 case 'C': /* word class */ 166 case 'F': /* word class from file */ 167 /* read list of words from argument or file */ 168 if (buf[0] == 'F') 169 { 170 /* read from file */ 171 for (p = &buf[2]; *p != '\0' && !isspace(*p); p++) 172 continue; 173 if (*p == '\0') 174 p = "%s"; 175 else 176 { 177 *p = '\0'; 178 while (isspace(*++p)) 179 continue; 180 } 181 fileclass(buf[1], &buf[2], p); 182 break; 183 } 184 185 /* scan the list of words and set class for all */ 186 for (p = &buf[2]; *p != '\0'; ) 187 { 188 register char *wd; 189 char delim; 190 191 while (*p != '\0' && isspace(*p)) 192 p++; 193 wd = p; 194 while (*p != '\0' && !isspace(*p)) 195 p++; 196 delim = *p; 197 *p = '\0'; 198 if (wd[0] != '\0') 199 setclass(buf[1], wd); 200 *p = delim; 201 } 202 break; 203 204 case 'M': /* define mailer */ 205 makemailer(&buf[1]); 206 break; 207 208 case 'O': /* set option */ 209 setoption(buf[1], &buf[2], TRUE, FALSE); 210 break; 211 212 case 'P': /* set precedence */ 213 if (NumPriorities >= MAXPRIORITIES) 214 { 215 toomany('P', MAXPRIORITIES); 216 break; 217 } 218 for (p = &buf[1]; *p != '\0' && *p != '=' && *p != '\t'; p++) 219 continue; 220 if (*p == '\0') 221 goto badline; 222 *p = '\0'; 223 Priorities[NumPriorities].pri_name = newstr(&buf[1]); 224 Priorities[NumPriorities].pri_val = atoi(++p); 225 NumPriorities++; 226 break; 227 228 case 'T': /* trusted user(s) */ 229 p = &buf[1]; 230 while (*p != '\0') 231 { 232 while (isspace(*p)) 233 p++; 234 q = p; 235 while (*p != '\0' && !isspace(*p)) 236 p++; 237 if (*p != '\0') 238 *p++ = '\0'; 239 if (*q == '\0') 240 continue; 241 for (pv = TrustedUsers; *pv != NULL; pv++) 242 continue; 243 if (pv >= &TrustedUsers[MAXTRUST]) 244 { 245 toomany('T', MAXTRUST); 246 break; 247 } 248 *pv = newstr(q); 249 } 250 break; 251 252 default: 253 badline: 254 syserr("unknown control line \"%s\"", buf); 255 } 256 } 257 FileName = NULL; 258 } 259 /* 260 ** TOOMANY -- signal too many of some option 261 ** 262 ** Parameters: 263 ** id -- the id of the error line 264 ** maxcnt -- the maximum possible values 265 ** 266 ** Returns: 267 ** none. 268 ** 269 ** Side Effects: 270 ** gives a syserr. 271 */ 272 273 toomany(id, maxcnt) 274 char id; 275 int maxcnt; 276 { 277 syserr("too many %c lines, %d max", id, maxcnt); 278 } 279 /* 280 ** FILECLASS -- read members of a class from a file 281 ** 282 ** Parameters: 283 ** class -- class to define. 284 ** filename -- name of file to read. 285 ** fmt -- scanf string to use for match. 286 ** 287 ** Returns: 288 ** none 289 ** 290 ** Side Effects: 291 ** 292 ** puts all lines in filename that match a scanf into 293 ** the named class. 294 */ 295 296 fileclass(class, filename, fmt) 297 int class; 298 char *filename; 299 char *fmt; 300 { 301 FILE *f; 302 char buf[MAXLINE]; 303 304 if (filename[0] == '|') 305 f = popen(filename + 1, "r"); 306 else 307 f = fopen(filename, "r"); 308 if (f == NULL) 309 { 310 syserr("cannot open %s", filename); 311 return; 312 } 313 314 while (fgets(buf, sizeof buf, f) != NULL) 315 { 316 register STAB *s; 317 register char *p; 318 # ifdef SCANF 319 char wordbuf[MAXNAME+1]; 320 321 if (sscanf(buf, fmt, wordbuf) != 1) 322 continue; 323 p = wordbuf; 324 # else SCANF 325 p = buf; 326 # endif SCANF 327 328 /* 329 ** Break up the match into words. 330 */ 331 332 while (*p != '\0') 333 { 334 register char *q; 335 336 /* strip leading spaces */ 337 while (isspace(*p)) 338 p++; 339 if (*p == '\0') 340 break; 341 342 /* find the end of the word */ 343 q = p; 344 while (*p != '\0' && !isspace(*p)) 345 p++; 346 if (*p != '\0') 347 *p++ = '\0'; 348 349 /* enter the word in the symbol table */ 350 s = stab(q, ST_CLASS, ST_ENTER); 351 setbitn(class, s->s_class); 352 } 353 } 354 355 if (filename[0] == '|') 356 (void) pclose(f); 357 else 358 (void) fclose(f); 359 } 360 /* 361 ** MAKEMAILER -- define a new mailer. 362 ** 363 ** Parameters: 364 ** line -- description of mailer. This is in labeled 365 ** fields. The fields are: 366 ** P -- the path to the mailer 367 ** F -- the flags associated with the mailer 368 ** A -- the argv for this mailer 369 ** S -- the sender rewriting set 370 ** R -- the recipient rewriting set 371 ** E -- the eol string 372 ** The first word is the canonical name of the mailer. 373 ** 374 ** Returns: 375 ** none. 376 ** 377 ** Side Effects: 378 ** enters the mailer into the mailer table. 379 */ 380 381 makemailer(line) 382 char *line; 383 { 384 register char *p; 385 register struct mailer *m; 386 register STAB *s; 387 int i; 388 char fcode; 389 extern int NextMailer; 390 extern char **makeargv(); 391 extern char *munchstring(); 392 extern char *DelimChar; 393 extern long atol(); 394 395 /* allocate a mailer and set up defaults */ 396 m = (struct mailer *) xalloc(sizeof *m); 397 bzero((char *) m, sizeof *m); 398 m->m_mno = NextMailer; 399 m->m_eol = "\n"; 400 401 /* collect the mailer name */ 402 for (p = line; *p != '\0' && *p != ',' && !isspace(*p); p++) 403 continue; 404 if (*p != '\0') 405 *p++ = '\0'; 406 m->m_name = newstr(line); 407 408 /* now scan through and assign info from the fields */ 409 while (*p != '\0') 410 { 411 while (*p != '\0' && (*p == ',' || isspace(*p))) 412 p++; 413 414 /* p now points to field code */ 415 fcode = *p; 416 while (*p != '\0' && *p != '=' && *p != ',') 417 p++; 418 if (*p++ != '=') 419 { 420 syserr("`=' expected"); 421 return; 422 } 423 while (isspace(*p)) 424 p++; 425 426 /* p now points to the field body */ 427 p = munchstring(p); 428 429 /* install the field into the mailer struct */ 430 switch (fcode) 431 { 432 case 'P': /* pathname */ 433 m->m_mailer = newstr(p); 434 break; 435 436 case 'F': /* flags */ 437 for (; *p != '\0'; p++) 438 setbitn(*p, m->m_flags); 439 break; 440 441 case 'S': /* sender rewriting ruleset */ 442 case 'R': /* recipient rewriting ruleset */ 443 i = atoi(p); 444 if (i < 0 || i >= MAXRWSETS) 445 { 446 syserr("invalid rewrite set, %d max", MAXRWSETS); 447 return; 448 } 449 if (fcode == 'S') 450 m->m_s_rwset = i; 451 else 452 m->m_r_rwset = i; 453 break; 454 455 case 'E': /* end of line string */ 456 m->m_eol = newstr(p); 457 break; 458 459 case 'A': /* argument vector */ 460 m->m_argv = makeargv(p); 461 break; 462 463 case 'M': /* maximum message size */ 464 m->m_maxsize = atol(p); 465 break; 466 } 467 468 p = DelimChar; 469 } 470 471 /* now store the mailer away */ 472 if (NextMailer >= MAXMAILERS) 473 { 474 syserr("too many mailers defined (%d max)", MAXMAILERS); 475 return; 476 } 477 Mailer[NextMailer++] = m; 478 s = stab(m->m_name, ST_MAILER, ST_ENTER); 479 s->s_mailer = m; 480 } 481 /* 482 ** MUNCHSTRING -- translate a string into internal form. 483 ** 484 ** Parameters: 485 ** p -- the string to munch. 486 ** 487 ** Returns: 488 ** the munched string. 489 ** 490 ** Side Effects: 491 ** Sets "DelimChar" to point to the string that caused us 492 ** to stop. 493 */ 494 495 char * 496 munchstring(p) 497 register char *p; 498 { 499 register char *q; 500 bool backslash = FALSE; 501 bool quotemode = FALSE; 502 static char buf[MAXLINE]; 503 extern char *DelimChar; 504 505 for (q = buf; *p != '\0'; p++) 506 { 507 if (backslash) 508 { 509 /* everything is roughly literal */ 510 backslash = FALSE; 511 switch (*p) 512 { 513 case 'r': /* carriage return */ 514 *q++ = '\r'; 515 continue; 516 517 case 'n': /* newline */ 518 *q++ = '\n'; 519 continue; 520 521 case 'f': /* form feed */ 522 *q++ = '\f'; 523 continue; 524 525 case 'b': /* backspace */ 526 *q++ = '\b'; 527 continue; 528 } 529 *q++ = *p; 530 } 531 else 532 { 533 if (*p == '\\') 534 backslash = TRUE; 535 else if (*p == '"') 536 quotemode = !quotemode; 537 else if (quotemode || *p != ',') 538 *q++ = *p; 539 else 540 break; 541 } 542 } 543 544 DelimChar = p; 545 *q++ = '\0'; 546 return (buf); 547 } 548 /* 549 ** MAKEARGV -- break up a string into words 550 ** 551 ** Parameters: 552 ** p -- the string to break up. 553 ** 554 ** Returns: 555 ** a char **argv (dynamically allocated) 556 ** 557 ** Side Effects: 558 ** munges p. 559 */ 560 561 char ** 562 makeargv(p) 563 register char *p; 564 { 565 char *q; 566 int i; 567 char **avp; 568 char *argv[MAXPV + 1]; 569 570 /* take apart the words */ 571 i = 0; 572 while (*p != '\0' && i < MAXPV) 573 { 574 q = p; 575 while (*p != '\0' && !isspace(*p)) 576 p++; 577 while (isspace(*p)) 578 *p++ = '\0'; 579 argv[i++] = newstr(q); 580 } 581 argv[i++] = NULL; 582 583 /* now make a copy of the argv */ 584 avp = (char **) xalloc(sizeof *avp * i); 585 bcopy((char *) argv, (char *) avp, sizeof *avp * i); 586 587 return (avp); 588 } 589 /* 590 ** PRINTRULES -- print rewrite rules (for debugging) 591 ** 592 ** Parameters: 593 ** none. 594 ** 595 ** Returns: 596 ** none. 597 ** 598 ** Side Effects: 599 ** prints rewrite rules. 600 */ 601 602 printrules() 603 { 604 register struct rewrite *rwp; 605 register int ruleset; 606 607 for (ruleset = 0; ruleset < 10; ruleset++) 608 { 609 if (RewriteRules[ruleset] == NULL) 610 continue; 611 printf("\n----Rule Set %d:", ruleset); 612 613 for (rwp = RewriteRules[ruleset]; rwp != NULL; rwp = rwp->r_next) 614 { 615 printf("\nLHS:"); 616 printav(rwp->r_lhs); 617 printf("RHS:"); 618 printav(rwp->r_rhs); 619 } 620 } 621 } 622 623 /* 624 ** SETOPTION -- set global processing option 625 ** 626 ** Parameters: 627 ** opt -- option name. 628 ** val -- option value (as a text string). 629 ** safe -- set if this came from a configuration file. 630 ** Some options (if set from the command line) will 631 ** reset the user id to avoid security problems. 632 ** sticky -- if set, don't let other setoptions override 633 ** this value. 634 ** 635 ** Returns: 636 ** none. 637 ** 638 ** Side Effects: 639 ** Sets options as implied by the arguments. 640 */ 641 642 static BITMAP StickyOpt; /* set if option is stuck */ 643 extern char *NetName; /* name of home (local) network */ 644 645 setoption(opt, val, safe, sticky) 646 char opt; 647 char *val; 648 bool safe; 649 bool sticky; 650 { 651 extern bool atobool(); 652 extern time_t convtime(); 653 extern int QueueLA; 654 extern int RefuseLA; 655 extern bool trusteduser(); 656 extern char *username(); 657 658 if (tTd(37, 1)) 659 printf("setoption %c=%s", opt, val); 660 661 /* 662 ** See if this option is preset for us. 663 */ 664 665 if (bitnset(opt, StickyOpt)) 666 { 667 if (tTd(37, 1)) 668 printf(" (ignored)\n"); 669 return; 670 } 671 672 /* 673 ** Check to see if this option can be specified by this user. 674 */ 675 676 if (!safe && getuid() == 0) 677 safe = TRUE; 678 if (!safe && index("deiLmorsv", opt) == NULL) 679 { 680 if (opt != 'M' || (val[0] != 'r' && val[0] != 's')) 681 { 682 if (tTd(37, 1)) 683 printf(" (unsafe)"); 684 if (getuid() != geteuid()) 685 { 686 if (tTd(37, 1)) 687 printf("(Resetting uid)"); 688 (void) setgid(getgid()); 689 (void) setuid(getuid()); 690 } 691 } 692 } 693 if (tTd(37, 1)) 694 printf("\n"); 695 696 switch (opt) 697 { 698 case '=': /* config file generation level */ 699 ConfigLevel = atoi(val); 700 break; 701 702 case 'A': /* set default alias file */ 703 if (val[0] == '\0') 704 AliasFile = "aliases"; 705 else 706 AliasFile = newstr(val); 707 break; 708 709 case 'a': /* look N minutes for "@:@" in alias file */ 710 if (val[0] == '\0') 711 SafeAlias = 5; 712 else 713 SafeAlias = atoi(val); 714 break; 715 716 case 'B': /* substitution for blank character */ 717 SpaceSub = val[0]; 718 if (SpaceSub == '\0') 719 SpaceSub = ' '; 720 break; 721 722 case 'c': /* don't connect to "expensive" mailers */ 723 NoConnect = atobool(val); 724 break; 725 726 case 'C': /* checkpoint every N addresses */ 727 CheckpointInterval = atoi(val); 728 break; 729 730 case 'd': /* delivery mode */ 731 switch (*val) 732 { 733 case '\0': 734 SendMode = SM_DELIVER; 735 break; 736 737 case SM_QUEUE: /* queue only */ 738 #ifndef QUEUE 739 syserr("need QUEUE to set -odqueue"); 740 #endif QUEUE 741 /* fall through..... */ 742 743 case SM_DELIVER: /* do everything */ 744 case SM_FORK: /* fork after verification */ 745 SendMode = *val; 746 break; 747 748 default: 749 syserr("Unknown delivery mode %c", *val); 750 exit(EX_USAGE); 751 } 752 break; 753 754 case 'D': /* rebuild alias database as needed */ 755 AutoRebuild = atobool(val); 756 break; 757 758 case 'e': /* set error processing mode */ 759 switch (*val) 760 { 761 case EM_QUIET: /* be silent about it */ 762 case EM_MAIL: /* mail back */ 763 case EM_BERKNET: /* do berknet error processing */ 764 case EM_WRITE: /* write back (or mail) */ 765 HoldErrs = TRUE; 766 /* fall through... */ 767 768 case EM_PRINT: /* print errors normally (default) */ 769 ErrorMode = *val; 770 break; 771 } 772 break; 773 774 case 'F': /* file mode */ 775 FileMode = atooct(val) & 0777; 776 break; 777 778 case 'f': /* save Unix-style From lines on front */ 779 SaveFrom = atobool(val); 780 break; 781 782 case 'g': /* default gid */ 783 DefGid = atoi(val); 784 break; 785 786 case 'H': /* help file */ 787 if (val[0] == '\0') 788 HelpFile = "sendmail.hf"; 789 else 790 HelpFile = newstr(val); 791 break; 792 793 case 'h': /* maximum hop count */ 794 MaxHopCount = atoi(val); 795 break; 796 797 case 'I': /* use internet domain name server */ 798 UseNameServer = atobool(val); 799 break; 800 801 case 'i': /* ignore dot lines in message */ 802 IgnrDot = atobool(val); 803 break; 804 805 case 'L': /* log level */ 806 LogLevel = atoi(val); 807 break; 808 809 case 'M': /* define macro */ 810 define(val[0], newstr(&val[1]), CurEnv); 811 sticky = FALSE; 812 break; 813 814 case 'm': /* send to me too */ 815 MeToo = atobool(val); 816 break; 817 818 case 'n': /* validate RHS in newaliases */ 819 CheckAliases = atobool(val); 820 break; 821 822 # ifdef DAEMON 823 case 'N': /* home (local?) network name */ 824 NetName = newstr(val); 825 break; 826 # endif DAEMON 827 828 case 'o': /* assume old style headers */ 829 if (atobool(val)) 830 CurEnv->e_flags |= EF_OLDSTYLE; 831 else 832 CurEnv->e_flags &= ~EF_OLDSTYLE; 833 break; 834 835 case 'P': /* postmaster copy address for returned mail */ 836 PostMasterCopy = newstr(val); 837 break; 838 839 case 'q': /* slope of queue only function */ 840 QueueFactor = atoi(val); 841 break; 842 843 case 'Q': /* queue directory */ 844 if (val[0] == '\0') 845 QueueDir = "mqueue"; 846 else 847 QueueDir = newstr(val); 848 break; 849 850 case 'r': /* read timeout */ 851 ReadTimeout = convtime(val); 852 break; 853 854 case 'S': /* status file */ 855 if (val[0] == '\0') 856 StatFile = "sendmail.st"; 857 else 858 StatFile = newstr(val); 859 break; 860 861 case 's': /* be super safe, even if expensive */ 862 SuperSafe = atobool(val); 863 break; 864 865 case 'T': /* queue timeout */ 866 TimeOut = convtime(val); 867 /*FALLTHROUGH*/ 868 869 case 't': /* time zone name */ 870 break; 871 872 case 'U': /* location of user database */ 873 UdbSpec = newstr(val); 874 break; 875 876 case 'u': /* set default uid */ 877 DefUid = atoi(val); 878 setdefuser(); 879 break; 880 881 case 'v': /* run in verbose mode */ 882 Verbose = atobool(val); 883 break; 884 885 case 'w': /* we don't have wildcard MX records */ 886 NoWildcardMX = atobool(val); 887 break; 888 889 case 'x': /* load avg at which to auto-queue msgs */ 890 QueueLA = atoi(val); 891 break; 892 893 case 'X': /* load avg at which to auto-reject connections */ 894 RefuseLA = atoi(val); 895 break; 896 897 case 'y': /* work recipient factor */ 898 WkRecipFact = atoi(val); 899 break; 900 901 case 'Y': /* fork jobs during queue runs */ 902 ForkQueueRuns = atobool(val); 903 break; 904 905 case 'z': /* work message class factor */ 906 WkClassFact = atoi(val); 907 break; 908 909 case 'Z': /* work time factor */ 910 WkTimeFact = atoi(val); 911 break; 912 913 default: 914 break; 915 } 916 if (sticky) 917 setbitn(opt, StickyOpt); 918 return; 919 } 920 /* 921 ** SETCLASS -- set a word into a class 922 ** 923 ** Parameters: 924 ** class -- the class to put the word in. 925 ** word -- the word to enter 926 ** 927 ** Returns: 928 ** none. 929 ** 930 ** Side Effects: 931 ** puts the word into the symbol table. 932 */ 933 934 setclass(class, word) 935 int class; 936 char *word; 937 { 938 register STAB *s; 939 940 s = stab(word, ST_CLASS, ST_ENTER); 941 setbitn(class, s->s_class); 942 } 943