122704Sdist /* 234921Sbostic * Copyright (c) 1983 Eric P. Allman 333729Sbostic * Copyright (c) 1988 Regents of the University of California. 433729Sbostic * All rights reserved. 533729Sbostic * 642826Sbostic * %sccs.include.redist.c% 733729Sbostic */ 822704Sdist 922704Sdist #ifndef lint 10*57731Seric static char sccsid[] = "@(#)envelope.c 6.3 (Berkeley) 01/26/93"; 1133729Sbostic #endif /* not lint */ 1222704Sdist 1336928Sbostic #include <sys/types.h> 1436928Sbostic #include <sys/time.h> 1536928Sbostic #include <sys/stat.h> 169536Seric #include <pwd.h> 1740933Srick #include <sys/file.h> 189536Seric #include "sendmail.h" 199536Seric 209536Seric /* 219536Seric ** NEWENVELOPE -- allocate a new envelope 229536Seric ** 239536Seric ** Supports inheritance. 249536Seric ** 259536Seric ** Parameters: 269536Seric ** e -- the new envelope to fill in. 279536Seric ** 289536Seric ** Returns: 299536Seric ** e. 309536Seric ** 319536Seric ** Side Effects: 329536Seric ** none. 339536Seric */ 349536Seric 359536Seric ENVELOPE * 369536Seric newenvelope(e) 379536Seric register ENVELOPE *e; 389536Seric { 399536Seric register ENVELOPE *parent; 409536Seric extern putheader(), putbody(); 4125611Seric extern ENVELOPE BlankEnvelope; 429536Seric 439536Seric parent = CurEnv; 4456215Seric if (e == CurEnv && e->e_parent != NULL) 459536Seric parent = e->e_parent; 4625611Seric clearenvelope(e, TRUE); 4724944Seric if (e == CurEnv) 4824944Seric bcopy((char *) &NullAddress, (char *) &e->e_from, sizeof e->e_from); 4924944Seric else 5024944Seric bcopy((char *) &CurEnv->e_from, (char *) &e->e_from, sizeof e->e_from); 519536Seric e->e_parent = parent; 529536Seric e->e_ctime = curtime(); 5356215Seric if (parent != NULL) 5456215Seric e->e_msgpriority = parent->e_msgsize; 559536Seric e->e_puthdr = putheader; 569536Seric e->e_putbody = putbody; 579536Seric if (CurEnv->e_xfp != NULL) 589536Seric (void) fflush(CurEnv->e_xfp); 599536Seric 609536Seric return (e); 619536Seric } 629536Seric /* 639536Seric ** DROPENVELOPE -- deallocate an envelope. 649536Seric ** 659536Seric ** Parameters: 669536Seric ** e -- the envelope to deallocate. 679536Seric ** 689536Seric ** Returns: 699536Seric ** none. 709536Seric ** 719536Seric ** Side Effects: 729536Seric ** housekeeping necessary to dispose of an envelope. 739536Seric ** Unlocks this queue file. 749536Seric */ 759536Seric 769536Seric dropenvelope(e) 779536Seric register ENVELOPE *e; 789536Seric { 799536Seric bool queueit = FALSE; 809536Seric register ADDRESS *q; 819536Seric 829536Seric if (tTd(50, 1)) 839536Seric { 849536Seric printf("dropenvelope %x id=", e); 859536Seric xputs(e->e_id); 869536Seric printf(" flags=%o\n", e->e_flags); 879536Seric } 889536Seric #ifdef LOG 8955360Seric if (LogLevel > 12) 909536Seric syslog(LOG_DEBUG, "dropenvelope, id=%s, flags=%o, pid=%d", 919536Seric e->e_id == NULL ? "(none)" : e->e_id, 929536Seric e->e_flags, getpid()); 9356795Seric #endif /* LOG */ 949536Seric 959536Seric /* we must have an id to remove disk files */ 969536Seric if (e->e_id == NULL) 979536Seric return; 989536Seric 999536Seric /* 1009536Seric ** Extract state information from dregs of send list. 1019536Seric */ 1029536Seric 1039536Seric for (q = e->e_sendqueue; q != NULL; q = q->q_next) 1049536Seric { 1059536Seric if (bitset(QQUEUEUP, q->q_flags)) 1069536Seric queueit = TRUE; 1079536Seric } 1089536Seric 1099536Seric /* 1109536Seric ** Send back return receipts as requested. 1119536Seric */ 1129536Seric 1139536Seric if (e->e_receiptto != NULL && bitset(EF_SENDRECEIPT, e->e_flags)) 1149536Seric { 11510844Seric auto ADDRESS *rlist = NULL; 1169536Seric 11755012Seric sendtolist(e->e_receiptto, (ADDRESS *) NULL, &rlist, e); 11855012Seric (void) returntosender("Return receipt", rlist, FALSE, e); 1199536Seric } 1209536Seric 1219536Seric /* 1229536Seric ** Arrange to send error messages if there are fatal errors. 1239536Seric */ 1249536Seric 12510754Seric if (bitset(EF_FATALERRS|EF_TIMEOUT, e->e_flags) && ErrorMode != EM_QUIET) 1269536Seric savemail(e); 1279536Seric 1289536Seric /* 1299536Seric ** Instantiate or deinstantiate the queue. 1309536Seric */ 1319536Seric 1329536Seric if ((!queueit && !bitset(EF_KEEPQUEUE, e->e_flags)) || 1339536Seric bitset(EF_CLRQUEUE, e->e_flags)) 1349536Seric { 13523497Seric if (e->e_df != NULL) 13623497Seric xunlink(e->e_df); 1379536Seric xunlink(queuename(e, 'q')); 1389536Seric } 1399536Seric else if (queueit || !bitset(EF_INQUEUE, e->e_flags)) 14010754Seric { 14110754Seric #ifdef QUEUE 14251920Seric queueup(e, FALSE, FALSE); 14356795Seric #else /* QUEUE */ 14410754Seric syserr("dropenvelope: queueup"); 14556795Seric #endif /* QUEUE */ 14610754Seric } 1479536Seric 1489536Seric /* now unlock the job */ 14910196Seric closexscript(e); 1509536Seric unlockqueue(e); 1519536Seric 1529536Seric /* make sure that this envelope is marked unused */ 1539536Seric e->e_id = e->e_df = NULL; 15424944Seric if (e->e_dfp != NULL) 15524944Seric (void) fclose(e->e_dfp); 15610196Seric e->e_dfp = NULL; 15757589Seric 15857589Seric #ifdef LOG 15957589Seric if (LogLevel >= 10) 16057589Seric syslog(LOG_INFO, "%s: done", e->e_id); 16157589Seric #endif /* LOG */ 1629536Seric } 1639536Seric /* 1649536Seric ** CLEARENVELOPE -- clear an envelope without unlocking 1659536Seric ** 1669536Seric ** This is normally used by a child process to get a clean 1679536Seric ** envelope without disturbing the parent. 1689536Seric ** 1699536Seric ** Parameters: 1709536Seric ** e -- the envelope to clear. 17125611Seric ** fullclear - if set, the current envelope is total 17225611Seric ** garbage and should be ignored; otherwise, 17325611Seric ** release any resources it may indicate. 1749536Seric ** 1759536Seric ** Returns: 1769536Seric ** none. 1779536Seric ** 1789536Seric ** Side Effects: 1799536Seric ** Closes files associated with the envelope. 1809536Seric ** Marks the envelope as unallocated. 1819536Seric */ 1829536Seric 18325611Seric clearenvelope(e, fullclear) 1849536Seric register ENVELOPE *e; 18525611Seric bool fullclear; 1869536Seric { 18725514Seric register HDR *bh; 18825514Seric register HDR **nhp; 18925514Seric extern ENVELOPE BlankEnvelope; 19025514Seric 19125611Seric if (!fullclear) 19225611Seric { 19325611Seric /* clear out any file information */ 19425611Seric if (e->e_xfp != NULL) 19525611Seric (void) fclose(e->e_xfp); 19625611Seric if (e->e_dfp != NULL) 19725611Seric (void) fclose(e->e_dfp); 19825611Seric } 1999536Seric 20024961Seric /* now clear out the data */ 20124965Seric STRUCTCOPY(BlankEnvelope, *e); 20225514Seric bh = BlankEnvelope.e_header; 20325514Seric nhp = &e->e_header; 20425514Seric while (bh != NULL) 20525514Seric { 20625514Seric *nhp = (HDR *) xalloc(sizeof *bh); 20725514Seric bcopy((char *) bh, (char *) *nhp, sizeof *bh); 20825514Seric bh = bh->h_link; 20925514Seric nhp = &(*nhp)->h_link; 21025514Seric } 2119536Seric } 2129536Seric /* 2139536Seric ** INITSYS -- initialize instantiation of system 2149536Seric ** 2159536Seric ** In Daemon mode, this is done in the child. 2169536Seric ** 2179536Seric ** Parameters: 2189536Seric ** none. 2199536Seric ** 2209536Seric ** Returns: 2219536Seric ** none. 2229536Seric ** 2239536Seric ** Side Effects: 2249536Seric ** Initializes the system macros, some global variables, 2259536Seric ** etc. In particular, the current time in various 2269536Seric ** forms is set. 2279536Seric */ 2289536Seric 22955012Seric initsys(e) 23055012Seric register ENVELOPE *e; 2319536Seric { 2329536Seric static char cbuf[5]; /* holds hop count */ 2339536Seric static char pbuf[10]; /* holds pid */ 23422963Smiriam #ifdef TTYNAME 2359536Seric static char ybuf[10]; /* holds tty id */ 2369536Seric register char *p; 23756795Seric #endif /* TTYNAME */ 2389536Seric extern char *ttyname(); 2399536Seric extern char *macvalue(); 2409536Seric extern char Version[]; 2419536Seric 2429536Seric /* 2439536Seric ** Give this envelope a reality. 2449536Seric ** I.e., an id, a transcript, and a creation time. 2459536Seric */ 2469536Seric 24755012Seric openxscript(e); 24855012Seric e->e_ctime = curtime(); 2499536Seric 2509536Seric /* 2519536Seric ** Set OutChannel to something useful if stdout isn't it. 2529536Seric ** This arranges that any extra stuff the mailer produces 2539536Seric ** gets sent back to the user on error (because it is 2549536Seric ** tucked away in the transcript). 2559536Seric */ 2569536Seric 2579536Seric if (OpMode == MD_DAEMON && QueueRun) 25855012Seric OutChannel = e->e_xfp; 2599536Seric 2609536Seric /* 2619536Seric ** Set up some basic system macros. 2629536Seric */ 2639536Seric 2649536Seric /* process id */ 2659536Seric (void) sprintf(pbuf, "%d", getpid()); 26655012Seric define('p', pbuf, e); 2679536Seric 2689536Seric /* hop count */ 26955012Seric (void) sprintf(cbuf, "%d", e->e_hopcount); 27055012Seric define('c', cbuf, e); 2719536Seric 2729536Seric /* time as integer, unix time, arpa time */ 27355012Seric settime(e); 2749536Seric 27517472Seric #ifdef TTYNAME 2769536Seric /* tty name */ 27755012Seric if (macvalue('y', e) == NULL) 2789536Seric { 2799536Seric p = ttyname(2); 2809536Seric if (p != NULL) 2819536Seric { 28256795Seric if (strrchr(p, '/') != NULL) 28356795Seric p = strrchr(p, '/') + 1; 2849536Seric (void) strcpy(ybuf, p); 28555012Seric define('y', ybuf, e); 2869536Seric } 2879536Seric } 28856795Seric #endif /* TTYNAME */ 2899536Seric } 2909536Seric /* 29111932Seric ** SETTIME -- set the current time. 29211932Seric ** 29311932Seric ** Parameters: 29411932Seric ** none. 29511932Seric ** 29611932Seric ** Returns: 29711932Seric ** none. 29811932Seric ** 29911932Seric ** Side Effects: 30011932Seric ** Sets the various time macros -- $a, $b, $d, $t. 30111932Seric */ 30211932Seric 30355012Seric settime(e) 30455012Seric register ENVELOPE *e; 30511932Seric { 30611932Seric register char *p; 30711932Seric auto time_t now; 30811932Seric static char tbuf[20]; /* holds "current" time */ 30911932Seric static char dbuf[30]; /* holds ctime(tbuf) */ 31011932Seric register struct tm *tm; 31111932Seric extern char *arpadate(); 31211932Seric extern struct tm *gmtime(); 31311932Seric extern char *macvalue(); 31411932Seric 31511932Seric now = curtime(); 31611932Seric tm = gmtime(&now); 31757014Seric (void) sprintf(tbuf, "%04d%02d%02d%02d%02d", tm->tm_year + 1900, 31857014Seric tm->tm_mon+1, tm->tm_mday, tm->tm_hour, tm->tm_min); 31955012Seric define('t', tbuf, e); 32011932Seric (void) strcpy(dbuf, ctime(&now)); 32156795Seric *strchr(dbuf, '\n') = '\0'; 32255012Seric if (macvalue('d', e) == NULL) 32355012Seric define('d', dbuf, e); 32411932Seric p = newstr(arpadate(dbuf)); 32555012Seric if (macvalue('a', e) == NULL) 32655012Seric define('a', p, e); 32755012Seric define('b', p, e); 32811932Seric } 32911932Seric /* 3309536Seric ** OPENXSCRIPT -- Open transcript file 3319536Seric ** 3329536Seric ** Creates a transcript file for possible eventual mailing or 3339536Seric ** sending back. 3349536Seric ** 3359536Seric ** Parameters: 3369536Seric ** e -- the envelope to create the transcript in/for. 3379536Seric ** 3389536Seric ** Returns: 3399536Seric ** none 3409536Seric ** 3419536Seric ** Side Effects: 3429536Seric ** Creates the transcript file. 3439536Seric */ 3449536Seric 3459536Seric openxscript(e) 3469536Seric register ENVELOPE *e; 3479536Seric { 3489536Seric register char *p; 34940933Srick int fd; 3509536Seric 35110196Seric # ifdef LOG 35210196Seric if (LogLevel > 19) 35310196Seric syslog(LOG_DEBUG, "%s: openx%s", e->e_id, e->e_xfp == NULL ? "" : " (no)"); 35456795Seric # endif /* LOG */ 3559536Seric if (e->e_xfp != NULL) 3569536Seric return; 3579536Seric p = queuename(e, 'x'); 35840933Srick fd = open(p, O_WRONLY|O_CREAT, 0644); 35940933Srick if (fd < 0) 3609536Seric syserr("Can't create %s", p); 3619536Seric else 36240933Srick e->e_xfp = fdopen(fd, "w"); 3639536Seric } 3649536Seric /* 36510196Seric ** CLOSEXSCRIPT -- close the transcript file. 36610196Seric ** 36710196Seric ** Parameters: 36810196Seric ** e -- the envelope containing the transcript to close. 36910196Seric ** 37010196Seric ** Returns: 37110196Seric ** none. 37210196Seric ** 37310196Seric ** Side Effects: 37410196Seric ** none. 37510196Seric */ 37610196Seric 37710196Seric closexscript(e) 37810196Seric register ENVELOPE *e; 37910196Seric { 38010196Seric if (e->e_xfp == NULL) 38110196Seric return; 38210196Seric (void) fclose(e->e_xfp); 38310196Seric e->e_xfp = NULL; 38410196Seric } 38510196Seric /* 3869536Seric ** SETSENDER -- set the person who this message is from 3879536Seric ** 3889536Seric ** Under certain circumstances allow the user to say who 3899536Seric ** s/he is (using -f or -r). These are: 3909536Seric ** 1. The user's uid is zero (root). 3919536Seric ** 2. The user's login name is in an approved list (typically 3929536Seric ** from a network server). 3939536Seric ** 3. The address the user is trying to claim has a 3949536Seric ** "!" character in it (since #2 doesn't do it for 3959536Seric ** us if we are dialing out for UUCP). 3969536Seric ** A better check to replace #3 would be if the 3979536Seric ** effective uid is "UUCP" -- this would require me 3989536Seric ** to rewrite getpwent to "grab" uucp as it went by, 3999536Seric ** make getname more nasty, do another passwd file 4009536Seric ** scan, or compile the UID of "UUCP" into the code, 4019536Seric ** all of which are reprehensible. 4029536Seric ** 4039536Seric ** Assuming all of these fail, we figure out something 4049536Seric ** ourselves. 4059536Seric ** 4069536Seric ** Parameters: 4079536Seric ** from -- the person we would like to believe this message 4089536Seric ** is from, as specified on the command line. 40953182Seric ** e -- the envelope in which we would like the sender set. 4109536Seric ** 4119536Seric ** Returns: 4129536Seric ** none. 4139536Seric ** 4149536Seric ** Side Effects: 4159536Seric ** sets sendmail's notion of who the from person is. 4169536Seric */ 4179536Seric 41853182Seric setsender(from, e) 4199536Seric char *from; 42053182Seric register ENVELOPE *e; 4219536Seric { 4229536Seric register char **pvp; 4239536Seric char *realname = NULL; 42418665Seric register struct passwd *pw; 4259536Seric char buf[MAXNAME]; 42616913Seric char pvpbuf[PSBUFSIZE]; 42718665Seric extern struct passwd *getpwnam(); 4289536Seric extern char *macvalue(); 4299536Seric extern char **prescan(); 4309536Seric extern bool safefile(); 4319536Seric extern char *FullName; 4329536Seric 4339536Seric if (tTd(45, 1)) 43414786Seric printf("setsender(%s)\n", from == NULL ? "" : from); 4359536Seric 4369536Seric /* 4379536Seric ** Figure out the real user executing us. 4389536Seric ** Username can return errno != 0 on non-errors. 4399536Seric */ 4409536Seric 44152220Seric if (QueueRun || OpMode == MD_SMTP) 4429536Seric realname = from; 4439536Seric if (realname == NULL || realname[0] == '\0') 4449536Seric { 4459536Seric extern char *username(); 4469536Seric 4479536Seric realname = username(); 4489536Seric } 4499536Seric 4509536Seric /* 4519536Seric ** Determine if this real person is allowed to alias themselves. 4529536Seric */ 4539536Seric 4549536Seric if (from != NULL) 4559536Seric { 4569536Seric extern bool trusteduser(); 4579536Seric 45836230Skarels if (!trusteduser(realname) && getuid() != geteuid() && 45956795Seric strchr(from, '!') == NULL && getuid() != 0) 4609536Seric { 4619536Seric /* network sends -r regardless (why why why?) */ 4629536Seric /* syserr("%s, you cannot use the -f flag", realname); */ 4639536Seric from = NULL; 4649536Seric } 4659536Seric } 4669536Seric 46757589Seric /* 4689536Seric SuprErrs = TRUE; 46957589Seric */ 47055012Seric if (from == NULL || parseaddr(from, &e->e_from, 1, '\0', e) == NULL) 4719536Seric { 47221750Seric /* log garbage addresses for traceback */ 47355173Seric # ifdef LOG 47455173Seric if (from != NULL && LogLevel >= 1) 47521750Seric { 47655173Seric char *host = RealHostName; 47755173Seric 47855173Seric if (host == NULL) 47955173Seric host = MyHostName; 48055173Seric syslog(LOG_NOTICE, 48155173Seric "from=%s unparseable, received from %s@%s", 48255173Seric from, realname, host); 48355173Seric } 48456795Seric # endif /* LOG */ 48557589Seric if (from != NULL) 48657589Seric SuprErrs = TRUE; 48757589Seric if (from == realname || 48857589Seric parseaddr(from = newstr(realname), &e->e_from, 1, '\0', e) == NULL) 48924944Seric { 49057589Seric SuprErrs = TRUE; 49157589Seric if (parseaddr("postmaster", &e->e_from, 1, '\0', e) == NULL) 49257589Seric syserr("setsender: can't even parse postmaster!"); 49324944Seric } 4949536Seric } 4959536Seric else 4969536Seric FromFlag = TRUE; 49753182Seric e->e_from.q_flags |= QDONTSEND; 498*57731Seric if (tTd(45, 5)) 499*57731Seric { 500*57731Seric printf("setsender: QDONTSEND "); 501*57731Seric printaddr(&e->e_from, FALSE); 502*57731Seric } 50353182Seric loweraddr(&e->e_from); 5049536Seric SuprErrs = FALSE; 5059536Seric 50653736Seric pvp = NULL; 50753736Seric if (e->e_from.q_mailer == LocalMailer) 5089536Seric { 50953736Seric # ifdef USERDB 51053736Seric register char *p; 51153736Seric extern char *udbsender(); 51253736Seric # endif 51317472Seric 5149536Seric /* if the user has given fullname already, don't redefine */ 5159536Seric if (FullName == NULL) 51653182Seric FullName = macvalue('x', e); 51711932Seric if (FullName != NULL && FullName[0] == '\0') 5189536Seric FullName = NULL; 5199536Seric 52053736Seric # ifdef USERDB 52153736Seric p = udbsender(from); 52253736Seric 52353736Seric if (p != NULL) 5249536Seric { 52553736Seric /* 52653736Seric ** We have an alternate address for the sender 52753736Seric */ 52853736Seric 52953736Seric pvp = prescan(p, '\0', pvpbuf); 5309536Seric } 53153736Seric # endif /* USERDB */ 53253736Seric 53353736Seric if ((pw = getpwnam(e->e_from.q_user)) != NULL) 53453736Seric { 53553736Seric /* 53653736Seric ** Process passwd file entry. 53753736Seric */ 53853736Seric 53953736Seric 54053736Seric /* extract home directory */ 54153736Seric e->e_from.q_home = newstr(pw->pw_dir); 54253736Seric define('z', e->e_from.q_home, e); 54353736Seric 54453736Seric /* extract user and group id */ 54553736Seric e->e_from.q_uid = pw->pw_uid; 54653736Seric e->e_from.q_gid = pw->pw_gid; 54753736Seric 54853736Seric /* extract full name from passwd file */ 54953736Seric if (FullName == NULL && pw->pw_gecos != NULL && 55053736Seric strcmp(pw->pw_name, e->e_from.q_user) == 0) 55153736Seric { 55253736Seric buildfname(pw->pw_gecos, e->e_from.q_user, buf); 55353736Seric if (buf[0] != '\0') 55453736Seric FullName = newstr(buf); 55553736Seric } 55653736Seric } 5579536Seric if (FullName != NULL) 55853182Seric define('x', FullName, e); 5599536Seric } 56011625Seric else 56111625Seric { 56253182Seric if (e->e_from.q_home == NULL) 56353182Seric e->e_from.q_home = getenv("HOME"); 56453182Seric e->e_from.q_uid = getuid(); 56553182Seric e->e_from.q_gid = getgid(); 56611625Seric } 56711625Seric 5689536Seric /* 5699536Seric ** Rewrite the from person to dispose of possible implicit 5709536Seric ** links in the net. 5719536Seric */ 5729536Seric 5739536Seric if (pvp == NULL) 57453736Seric pvp = prescan(from, '\0', pvpbuf); 57553736Seric if (pvp == NULL) 5769536Seric { 57736233Skarels # ifdef LOG 57836233Skarels if (LogLevel >= 1) 57936233Skarels syslog(LOG_NOTICE, "cannot prescan from (%s)", from); 58036233Skarels # endif 58136230Skarels usrerr("cannot prescan from (%s)", from); 5829536Seric finis(); 5839536Seric } 5849536Seric rewrite(pvp, 3); 5859536Seric rewrite(pvp, 1); 58625032Seric rewrite(pvp, 4); 5879536Seric cataddr(pvp, buf, sizeof buf); 58853182Seric e->e_sender = e->e_returnpath = newstr(buf); 5899536Seric 59053182Seric define('f', e->e_sender, e); 59151951Seric 5929536Seric /* save the domain spec if this mailer wants it */ 59353182Seric if (e->e_from.q_mailer != NULL && 59453182Seric bitnset(M_CANONICAL, e->e_from.q_mailer->m_flags)) 5959536Seric { 5969536Seric extern char **copyplist(); 5979536Seric 5989536Seric while (*pvp != NULL && strcmp(*pvp, "@") != 0) 5999536Seric pvp++; 6009536Seric if (*pvp != NULL) 60153182Seric e->e_fromdomain = copyplist(pvp, TRUE); 6029536Seric } 6039536Seric } 6049536Seric /* 6059536Seric ** TRUSTEDUSER -- tell us if this user is to be trusted. 6069536Seric ** 6079536Seric ** Parameters: 6089536Seric ** user -- the user to be checked. 6099536Seric ** 6109536Seric ** Returns: 6119536Seric ** TRUE if the user is in an approved list. 6129536Seric ** FALSE otherwise. 6139536Seric ** 6149536Seric ** Side Effects: 6159536Seric ** none. 6169536Seric */ 6179536Seric 6189536Seric bool 6199536Seric trusteduser(user) 6209536Seric char *user; 6219536Seric { 6229536Seric register char **ulist; 6239536Seric extern char *TrustedUsers[]; 6249536Seric 6259536Seric for (ulist = TrustedUsers; *ulist != NULL; ulist++) 6269536Seric if (strcmp(*ulist, user) == 0) 6279536Seric return (TRUE); 6289536Seric return (FALSE); 6299536Seric } 630