├── src ├── osdep │ ├── vms │ │ ├── link_nlb.opt │ │ ├── link.opt │ │ ├── link_mnt.opt │ │ ├── clean.com │ │ ├── ftl_vms.c │ │ ├── linkage.h │ │ ├── os_vms.h │ │ ├── linkage.c │ │ └── tcp_vms.h │ ├── nt │ │ ├── mailfile.h │ │ ├── pseudo.h │ │ ├── setproto.bat │ │ ├── drivers.bat │ │ ├── ftl_nt.c │ │ ├── mkauths.bat │ │ ├── drivraux.bat │ │ ├── fdstring.h │ │ ├── mkautaux.bat │ │ ├── pseudo.c │ │ ├── os_nt.c │ │ ├── os_old.c │ │ └── os_w2k.c │ ├── mac │ │ ├── osdep.h │ │ ├── linkage.h │ │ ├── ftl_mac.c │ │ ├── linkage.c │ │ └── tcp_mac.h │ ├── unix │ │ ├── ckp_3rd.c │ │ ├── pseudo.h │ │ ├── ckp_2nd.c │ │ ├── tz_nul.c │ │ ├── fsync.c │ │ ├── os_s40.h │ │ ├── setpgrp.c │ │ ├── sig_bsd.c │ │ ├── sig_sv4.c │ │ ├── drivers │ │ ├── gethstid.c │ │ ├── strerror.c │ │ ├── tz_bsd.c │ │ ├── ftl_unix.c │ │ ├── log_old.c │ │ ├── tz_sv4.c │ │ ├── os_ult.h │ │ ├── ckp_nul.c │ │ ├── fdstring.h │ │ ├── os_bsi.h │ │ ├── gr_wait4.c │ │ ├── gr_waitp.c │ │ ├── os_lyn.h │ │ ├── ckp_ult.c │ │ ├── os_mct.h │ │ ├── truncate.c │ │ ├── os_bsf.h │ │ ├── os_cvx.h │ │ ├── log_sv4.c │ │ ├── os_aix.h │ │ ├── rename.c │ │ ├── log_std.c │ │ ├── ckp_std.c │ │ ├── log_sec.c │ │ ├── mkauths │ │ ├── os_sua.h │ │ ├── os_os4.h │ │ ├── os_osf.h │ │ ├── os_sos.h │ │ ├── pseudo.c │ │ ├── crx_std.c │ │ ├── os_mnt.h │ │ ├── os_nxt.h │ │ ├── os_aux.h │ │ ├── tcp_unix.h │ │ ├── utime.c │ │ ├── os_a32.h │ │ ├── os_a41.h │ │ ├── log_cyg.c │ │ ├── os_do4.h │ │ ├── Makefile.gss │ │ ├── gr_wait.c │ │ ├── os_aos.h │ │ ├── os_ult.c │ │ ├── os_a52.h │ │ ├── os_sun.h │ │ ├── os_osx.h │ │ └── os_mct.c │ ├── amiga │ │ ├── pseudo.h │ │ ├── ftl_ami.c │ │ ├── drivers │ │ ├── gethstid.c │ │ ├── tz_bsd.c │ │ ├── fdstring.h │ │ ├── gr_waitp.c │ │ ├── log_std.c │ │ ├── ckp_std.c │ │ ├── mkauths │ │ ├── pseudo.c │ │ └── tcp_ami.h │ ├── os2 │ │ ├── pseudo.h │ │ ├── ftl_os2.c │ │ ├── setproto.cmd │ │ ├── os_os2.h │ │ ├── pseudo.c │ │ └── drivers.cmd │ ├── dos │ │ ├── mtestdnf.bat │ │ ├── mtestdnv.bat │ │ ├── mtestdwa.bat │ │ ├── mtestdbw.bat │ │ ├── mtestwsk.bat │ │ ├── mtestdpc.bat │ │ ├── drivraux.bat │ │ ├── mkautaux.bat │ │ ├── drivers.bat │ │ ├── ftl_dos.c │ │ ├── mkauths.bat │ │ ├── os_dpc.h │ │ ├── os_dbw.h │ │ ├── os_dnv.h │ │ ├── os_dwa.h │ │ ├── fdstring.h │ │ ├── os_dnf.h │ │ ├── os_wsk.h │ │ ├── os_wsk.c │ │ └── tcp_dwa.h │ ├── wce │ │ ├── setproto.bat │ │ ├── drivers.bat │ │ ├── ftl_wce.c │ │ ├── mkauths.bat │ │ ├── drivraux.bat │ │ ├── mkautaux.bat │ │ ├── os_wce.c │ │ ├── tcp_wce.h │ │ └── os_wce.h │ └── tops-20 │ │ ├── ftl_t20.c │ │ ├── linkage.h │ │ └── linkage.c ├── c-client │ ├── flstring.h │ ├── ftl.h │ ├── fs.h │ ├── nl.h │ └── netmsg.h ├── tmail │ ├── tquota.h │ ├── Makefile │ └── tquota.c ├── dmail │ ├── dquota.h │ ├── dquota.c │ └── Makefile ├── ansilib │ ├── memmove.c │ ├── memset.c │ ├── strpbrk.c │ └── strstr.c ├── mlock │ └── Makefile ├── mailutil │ ├── Makefile │ └── makefile.w2k ├── mtest │ ├── Makefile │ ├── makefile.os2 │ ├── makefile.w2k │ └── makefile.nt └── imapd │ └── imapd.8 ├── supplemental └── patches │ ├── README.md │ ├── imap-2007-paths.patch │ ├── imap-2007f-format-security.patch │ ├── imap-2007e-overflow.patch │ ├── imap-2007e-system_c_client.patch │ ├── imap-2004a-doc.patch │ └── imap-2007f-ldflags.patch ├── .gitignore ├── docs └── draft │ └── README ├── NOTICE ├── SUPPORT ├── tools ├── an ├── Makefile └── ua └── makefile.os2 /src/osdep/vms/link_nlb.opt: -------------------------------------------------------------------------------- 1 | NETLIB_SHR/SHARE 2 | -------------------------------------------------------------------------------- /src/osdep/vms/link.opt: -------------------------------------------------------------------------------- 1 | SYS$SHARE:VAXCRTL/SHARE 2 | -------------------------------------------------------------------------------- /src/osdep/vms/link_mnt.opt: -------------------------------------------------------------------------------- 1 | MULTINET:MULTINET_SOCKET_LIBRARY/SHARE 2 | -------------------------------------------------------------------------------- /supplemental/patches/README.md: -------------------------------------------------------------------------------- 1 | #Patches 2 | 3 | The patches contained here are sourced from the [Fedora Package Sources rpms repository](https://src.fedoraproject.org/rpms/uw-imap/tree/f29). 4 | 5 | All but the imap-2007e-system_c_client.patch have been applied (see https://github.com/uw-imap/imap/commit/9eb7bb9d595b0b56b5f7b751fad58059b888a0fa#commitcomment-31836821) -------------------------------------------------------------------------------- /supplemental/patches/imap-2007-paths.patch: -------------------------------------------------------------------------------- 1 | diff -up imap-2007/src/osdep/unix/Makefile.paths imap-2007/src/osdep/unix/Makefile 2 | --- imap-2007/src/osdep/unix/Makefile.paths 2007-12-17 16:10:24.000000000 -0600 3 | +++ imap-2007/src/osdep/unix/Makefile 2007-12-21 09:30:04.000000000 -0600 4 | @@ -96,11 +96,11 @@ CHECKPW=std 5 | LOGINPW=std 6 | SIGTYPE=bsd 7 | CRXTYPE=std 8 | -ACTIVEFILE=/usr/lib/news/active 9 | -SPOOLDIR=/usr/spool 10 | +ACTIVEFILE=/var/lib/news/active 11 | +SPOOLDIR=/var/spool 12 | MAILSPOOL=$(SPOOLDIR)/mail 13 | NEWSSPOOL=$(SPOOLDIR)/news 14 | -RSHPATH=/usr/ucb/rsh 15 | +RSHPATH=/usr/bin/rsh 16 | MD5PWD=/etc/cram-md5.pwd 17 | # Tries one of the test alternatives below if not specified. 18 | LOCKPGM= 19 | -------------------------------------------------------------------------------- /supplemental/patches/imap-2007f-format-security.patch: -------------------------------------------------------------------------------- 1 | diff -Naur imap-2007f.orig/src/osdep/unix/flocklnx.c imap-2007f/src/osdep/unix/flocklnx.c 2 | --- imap-2007f.orig/src/osdep/unix/flocklnx.c 2011-07-23 02:20:11.000000000 +0200 3 | +++ imap-2007f/src/osdep/unix/flocklnx.c 2014-04-14 19:17:46.429000000 +0200 4 | @@ -57,7 +57,7 @@ 5 | case ENOLCK: /* lock table is full */ 6 | sprintf (tmp,"File locking failure: %s",strerror (errno)); 7 | mm_log (tmp,WARN); /* give the user a warning of what happened */ 8 | - if (!logged++) syslog (LOG_ERR,tmp); 9 | + if (!logged++) syslog (LOG_ERR, "%s", tmp); 10 | /* return failure if non-blocking lock */ 11 | if (op & LOCK_NB) return -1; 12 | sleep (5); /* slow down in case it loops */ 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # http://www.gnu.org/software/automake 2 | 3 | Makefile.in 4 | /ar-lib 5 | /mdate-sh 6 | /py-compile 7 | /test-driver 8 | /ylwrap 9 | 10 | # http://www.gnu.org/software/autoconf 11 | 12 | /autom4te.cache 13 | /autoscan.log 14 | /autoscan-*.log 15 | /aclocal.m4 16 | /compile 17 | /config.guess 18 | /config.h.in 19 | /config.sub 20 | /configure 21 | /configure.scan 22 | /depcomp 23 | /install-sh 24 | /missing 25 | /stamp-h1 26 | 27 | # https://www.gnu.org/software/libtool/ 28 | 29 | /ltmain.sh 30 | 31 | # http://www.gnu.org/software/texinfo 32 | 33 | /texinfo.tex 34 | 35 | # http://www.gnu.org/software/m4/ 36 | 37 | m4/libtool.m4 38 | m4/ltoptions.m4 39 | m4/ltsugar.m4 40 | m4/ltversion.m4 41 | m4/lt~obsolete.m4 42 | autom4te.cache 43 | 44 | *.orig 45 | sources 46 | -------------------------------------------------------------------------------- /docs/draft/README: -------------------------------------------------------------------------------- 1 | Last Updated: 6 March 2008 2 | 3 | This directory contains Internet Drafts which, at the time of release of 4 | this software, were not yet been published as RFCs. These documents are 5 | expected to be released as RFCs in the near future. 6 | 7 | This software adheres to the specification in these documents, which 8 | are included for informational purposes. Note, however, that these 9 | documents must be considered preliminary in nature and will be superceded 10 | by the successor RFC. 11 | 12 | File Name I-D Name 13 | --------- -------- 14 | sort.txt draft-ietf-imapext-sort-20.txt 15 | ;; SORT and THREAD commands 16 | ;; Status: approved, blocked waiting for i18n 17 | 18 | i18n.txt draft-ietf-imapext-i18n-15.txt 19 | ;; internationalization in IMAP 20 | -------------------------------------------------------------------------------- /supplemental/patches/imap-2007e-overflow.patch: -------------------------------------------------------------------------------- 1 | diff -up imap-2007e/src/c-client/rfc822.c.overflow imap-2007e/src/c-client/rfc822.c 2 | --- imap-2007e/src/c-client/rfc822.c.overflow 2008-12-12 11:08:26.000000000 -0600 3 | +++ imap-2007e/src/c-client/rfc822.c 2009-07-07 19:27:20.057772757 -0500 4 | @@ -384,6 +384,9 @@ void rfc822_parse_content (BODY *body,ST 5 | if (CHR (bs) == '\012'){/* following LF? */ 6 | c = SNX (bs); i--; /* yes, slurp it */ 7 | } 8 | + if (!i) /* Make sure we don't get an overflow for */ 9 | + break; /* messages ending on \015 (or the following */ 10 | + /* i-- will cause i to be MAXINT. Not good.) */ 11 | case '\012': /* at start of a line, start with -- ? */ 12 | if (!(i && i-- && ((c = SNX (bs)) == '-') && i-- && 13 | ((c = SNX (bs)) == '-'))) break; 14 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | UW IMAP toolkit notices: 2 | 3 | This software was developed by the University of Washington 4 | (http://www.washington.edu/). 5 | 6 | The Univerity of Washington IMAP Toolkit (c-client API, dmail, imapd, 7 | ipop2d, ipop3d, mailutil, mlock, mtest, and tmail software; and its 8 | included text) is Copyright 1988-2007 by the University of Washington. 9 | 10 | The c-client library and mtest software are in part based upon code 11 | developed by Mark Crispin at Stanford University, and is 12 | 13 | * Copyright 1988 Stanford University and was developed in the 14 | * Symbolic Systems Resources Group of the Knowledge Systems Laboratory 15 | * at Stanford University in 1987-88, and was funded by the 16 | * Biomedical Research Technology Program of the National Institutes of 17 | * Health under grant number RR-00785. 18 | -------------------------------------------------------------------------------- /supplemental/patches/imap-2007e-system_c_client.patch: -------------------------------------------------------------------------------- 1 | diff -up imap-2007e/Makefile.system_c_client imap-2007e/Makefile 2 | --- imap-2007e/Makefile.system_c_client 2008-06-04 13:43:35.000000000 -0500 3 | +++ imap-2007e/Makefile 2011-06-13 14:13:04.467014334 -0500 4 | @@ -665,9 +665,11 @@ an ua: 5 | @$(MAKE) ssl$(SSLTYPE) 6 | @echo Applying $@ process to sources... 7 | $(TOOLS)/$@ "$(LN)" src/c-client c-client 8 | - $(TOOLS)/$@ "$(LN)" src/ansilib c-client 9 | - $(TOOLS)/$@ "$(LN)" src/charset c-client 10 | + $(TOOLS)/$@ "$(LN)" src/ansilib c-client 11 | + $(TOOLS)/$@ "$(LN)" src/charset c-client 12 | $(TOOLS)/$@ "$(LN)" src/osdep/$(SYSTEM) c-client 13 | + cp -alf /usr/include/imap/* c-client/ 14 | + #sleep 5 15 | $(TOOLS)/$@ "$(LN)" src/mtest mtest 16 | $(TOOLS)/$@ "$(LN)" src/ipopd ipopd 17 | $(TOOLS)/$@ "$(LN)" src/imapd imapd 18 | -------------------------------------------------------------------------------- /SUPPORT: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | BUG REPORTING ADDRESS 15 | 16 | Bug reports, comments, or questions regarding this software may 17 | be reported to the imap-uw@u.washington.edu mailing list (this replaces 18 | the old c-client@u.washington.edu mailing list). You can subscribe to 19 | this list by sending a message to: 20 | imap-uw-subscribe@mailman.u.washington.edu 21 | 22 | An alternative is to use the comp.mail.imap newsgroup. 23 | -------------------------------------------------------------------------------- /src/c-client/flstring.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: File string routines 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 15 April 1997 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | extern STRINGDRIVER file_string; 31 | -------------------------------------------------------------------------------- /src/osdep/nt/mailfile.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Mail Spool file name 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 8 February 1996 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #define MAILFILE "C:\\WINSMTP\\%s.MBX" 30 | -------------------------------------------------------------------------------- /src/osdep/mac/osdep.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- Macintosh version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 13 June 1995 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #include "os_mac.h" 30 | -------------------------------------------------------------------------------- /src/osdep/vms/clean.com: -------------------------------------------------------------------------------- 1 | $! ======================================================================== 2 | $! Copyright 1988-2006 University of Washington 3 | $! 4 | $! Licensed under the Apache License, Version 2.0 (the "License"); 5 | $! you may not use this file except in compliance with the License. 6 | $! You may obtain a copy of the License at 7 | $! 8 | $! http://www.apache.org/licenses/LICENSE-2.0 9 | $! 10 | $! 11 | $! ======================================================================== 12 | $! 13 | $! Program: Portable c-client cleanup for VMS 14 | $! 15 | $! Author: Mark Crispin 16 | $! Networks and Distributed Computing 17 | $! Computing & Communications 18 | $! University of Washington 19 | $! Administration Building, AG-44 20 | $! Seattle, WA 98195 21 | $! Internet: MRC@CAC.Washington.EDU 22 | $! 23 | $! Date: 14 June 1995 24 | $! Last Edited: 30 August 2006 25 | $! 26 | $ DELETE *.OBJ;*,OSDEP.*;*,TCP_VMS.C;*,MTEST.EXE;*,MAILUTIL.EXE;* 27 | -------------------------------------------------------------------------------- /tools/an: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # ======================================================================== 4 | # Copyright 1988-2007 University of Washington 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # 13 | # ======================================================================== 14 | 15 | BASE=`pwd` 16 | 17 | if [ ! -d $3 ]; then 18 | mkdir $3 19 | fi 20 | 21 | for i in $2/Makefile* ; do 22 | if [ -f $i ] ; then 23 | $1 "$BASE/$i" "$BASE/$3" 24 | fi 25 | done 26 | 27 | if [ -f $2/drivers ]; then 28 | $1 "$BASE/$2/drivers" "$BASE/$3" 29 | fi 30 | 31 | if [ -f $2/mkauths ]; then 32 | $1 "$BASE/$2/mkauths" "$BASE/$3" 33 | fi 34 | 35 | cd $2 36 | 37 | for j in *.[ch]; do 38 | $1 "$BASE/$2/$j" "$BASE/$3" 39 | done 40 | 41 | exit 0 42 | -------------------------------------------------------------------------------- /src/osdep/unix/ckp_3rd.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Dual check password part 3 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | /* Undefine routine name */ 31 | 32 | #undef checkpw 33 | -------------------------------------------------------------------------------- /src/c-client/ftl.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Crash management routines 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | /* Function prototypes */ 31 | 32 | void fatal (char *string); 33 | -------------------------------------------------------------------------------- /src/osdep/amiga/pseudo.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Pseudo Header Strings 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 26 September 1996 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | extern char *pseudo_from,*pseudo_name,*pseudo_subject,*pseudo_msg; 31 | -------------------------------------------------------------------------------- /src/osdep/nt/pseudo.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Pseudo Header Strings 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 26 September 1996 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | extern char *pseudo_from,*pseudo_name,*pseudo_subject,*pseudo_msg; 31 | -------------------------------------------------------------------------------- /src/osdep/os2/pseudo.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Pseudo Header Strings 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 26 September 1996 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | extern char *pseudo_from,*pseudo_name,*pseudo_subject,*pseudo_msg; 31 | -------------------------------------------------------------------------------- /src/osdep/unix/pseudo.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Pseudo Header Strings 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 26 September 1996 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | extern char *pseudo_from,*pseudo_name,*pseudo_subject,*pseudo_msg; 31 | -------------------------------------------------------------------------------- /src/osdep/dos/mtestdnf.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | REM ======================================================================== 3 | REM Copyright 1988-2006 University of Washington 4 | REM 5 | REM Licensed under the Apache License, Version 2.0 (the "License"); 6 | REM you may not use this file except in compliance with the License. 7 | REM You may obtain a copy of the License at 8 | REM 9 | REM http://www.apache.org/licenses/LICENSE-2.0 10 | REM 11 | REM 12 | REM ======================================================================== 13 | 14 | REM Program: Portable C client makefile -- MS-DOS PC-NFS link 15 | REM 16 | REM Author: Mark Crispin 17 | REM Networks and Distributed Computing 18 | REM Computing & Communications 19 | REM University of Washington 20 | REM Administration Building, AG-44 21 | REM Seattle, WA 98195 22 | REM Internet: MRC@CAC.Washington.EDU 23 | REM 24 | REM Date: 26 June 1994 25 | REM Last Edited:30 August 2006 26 | 27 | link /NOI /stack:32767 mtest.obj,mtest.exe,,cclient.lib ltklib.lib 28 | -------------------------------------------------------------------------------- /src/osdep/dos/mtestdnv.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | REM ======================================================================== 3 | REM Copyright 1988-2006 University of Washington 4 | REM 5 | REM Licensed under the Apache License, Version 2.0 (the "License"); 6 | REM you may not use this file except in compliance with the License. 7 | REM You may obtain a copy of the License at 8 | REM 9 | REM http://www.apache.org/licenses/LICENSE-2.0 10 | REM 11 | REM 12 | REM ======================================================================== 13 | 14 | REM Program: Portable C client makefile -- MS-DOS Novell link 15 | REM 16 | REM Author: Mark Crispin 17 | REM Networks and Distributed Computing 18 | REM Computing & Communications 19 | REM University of Washington 20 | REM Administration Building, AG-44 21 | REM Seattle, WA 98195 22 | REM Internet: MRC@CAC.Washington.EDU 23 | REM 24 | REM Date: 26 June 1994 25 | REM Last Edited:30 August 2006 26 | 27 | link /NOI /stack:32767 mtest.obj,mtest.exe,,cclient.lib llibsock.lib 28 | -------------------------------------------------------------------------------- /src/osdep/dos/mtestdwa.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | REM ======================================================================== 3 | REM Copyright 1988-2006 University of Washington 4 | REM 5 | REM Licensed under the Apache License, Version 2.0 (the "License"); 6 | REM you may not use this file except in compliance with the License. 7 | REM You may obtain a copy of the License at 8 | REM 9 | REM http://www.apache.org/licenses/LICENSE-2.0 10 | REM 11 | REM 12 | REM ======================================================================== 13 | 14 | REM Program: Portable C client makefile -- MS-DOS Waterloo link 15 | REM 16 | REM Author: Mark Crispin 17 | REM Networks and Distributed Computing 18 | REM Computing & Communications 19 | REM University of Washington 20 | REM Administration Building, AG-44 21 | REM Seattle, WA 98195 22 | REM Internet: MRC@CAC.Washington.EDU 23 | REM 24 | REM Date: 26 June 1994 25 | REM Last Edited:30 August 2006 26 | 27 | link /NOI /stack:32767 mtest.obj,mtest.exe,,cclient.lib wattcplg.lib 28 | -------------------------------------------------------------------------------- /src/osdep/dos/mtestdbw.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | REM ======================================================================== 3 | REM Copyright 1988-2006 University of Washington 4 | REM 5 | REM Licensed under the Apache License, Version 2.0 (the "License"); 6 | REM you may not use this file except in compliance with the License. 7 | REM You may obtain a copy of the License at 8 | REM 9 | REM http://www.apache.org/licenses/LICENSE-2.0 10 | REM 11 | REM 12 | REM ======================================================================== 13 | 14 | REM Program: Portable C client makefile -- MS-DOS B&W link 15 | REM 16 | REM Author: Mark Crispin 17 | REM Networks and Distributed Computing 18 | REM Computing & Communications 19 | REM University of Washington 20 | REM Administration Building, AG-44 21 | REM Seattle, WA 98195 22 | REM Internet: MRC@CAC.Washington.EDU 23 | REM 24 | REM Date: 26 June 1994 25 | REM Last Edited:30 August 2006 26 | 27 | link /NOI /stack:32767 mtest.obj,mtest.exe,,cclient.lib llbwtcp.lib llibce.lib 28 | -------------------------------------------------------------------------------- /tools/Makefile: -------------------------------------------------------------------------------- 1 | # ======================================================================== 2 | # Copyright 1988-2006 University of Washington 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # 11 | # ======================================================================== 12 | 13 | # Program: Tools Makefile 14 | # 15 | # Author: Mark Crispin 16 | # Networks and Distributed Computing 17 | # Computing & Communications 18 | # University of Washington 19 | # Administration Building, AG-44 20 | # Seattle, WA 98195 21 | # Internet: MRC@CAC.Washington.EDU 22 | 23 | 24 | CC=cc 25 | RM=rm -f 26 | 27 | 28 | uahelper: 29 | $(CC) -o uahelper uahelper.c $(LDFLAGS) 30 | 31 | clean: 32 | sh -c '$(RM) *.o uahelper || true' 33 | 34 | # A monument to a hack of long ago and far away... 35 | love: 36 | @echo 'not war?' 37 | -------------------------------------------------------------------------------- /src/osdep/dos/mtestwsk.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | REM ======================================================================== 3 | REM Copyright 1988-2006 University of Washington 4 | REM 5 | REM Licensed under the Apache License, Version 2.0 (the "License"); 6 | REM you may not use this file except in compliance with the License. 7 | REM You may obtain a copy of the License at 8 | REM 9 | REM http://www.apache.org/licenses/LICENSE-2.0 10 | REM 11 | REM 12 | REM ======================================================================== 13 | 14 | REM Program: Portable C client makefile -- MS-DOS Winsock link 15 | REM 16 | REM Author: Mark Crispin 17 | REM Networks and Distributed Computing 18 | REM Computing & Communications 19 | REM University of Washington 20 | REM Administration Building, AG-44 21 | REM Seattle, WA 98195 22 | REM Internet: MRC@CAC.Washington.EDU 23 | REM 24 | REM Date: 26 June 1994 25 | REM Last Edited:30 August 2006 26 | 27 | link /NOD:llibce mtest.obj,mtest.exe,,cclient.lib winsock.lib llibcewq.lib libw.lib, mtest 28 | -------------------------------------------------------------------------------- /supplemental/patches/imap-2004a-doc.patch: -------------------------------------------------------------------------------- 1 | Patch by Robert Scheck for uw-imap >= 2004a, which corrects 2 | paths to imapd, ipop2d and ipop3d in the man pages. 3 | 4 | This patch is based on Red Hat Bugzilla ID #127271 and solves ID #229781. 5 | 6 | --- imap-2004a/src/imapd/imapd.8 2004-05-18 19:46:54.000000000 +0200 7 | +++ imap-2004a/src/imapd/imapd.8.doc 2004-07-23 15:24:17.000000000 +0200 8 | @@ -3,7 +3,7 @@ 9 | .SH NAME 10 | IMAPd \- Internet Message Access Protocol server 11 | .SH SYNOPSIS 12 | -.B /usr/etc/imapd 13 | +.B /usr/sbin/imapd 14 | .SH DESCRIPTION 15 | .I imapd 16 | is a server which supports the 17 | --- imap-2004a/src/ipopd/ipopd.8 2004-05-18 19:50:05.000000000 +0200 18 | +++ imap-2004a/src/ipopd/ipopd.8.doc 2004-07-23 15:23:38.000000000 +0200 19 | @@ -3,9 +3,9 @@ 20 | .SH NAME 21 | IPOPd \- Post Office Protocol server 22 | .SH SYNOPSIS 23 | -.B /usr/etc/ipop2d 24 | +.B /usr/sbin/ipop2d 25 | .PP 26 | -.B /usr/etc/ipop3d 27 | +.B /usr/sbin/ipop3d 28 | .SH DESCRIPTION 29 | .I ipop2d 30 | and 31 | -------------------------------------------------------------------------------- /src/osdep/dos/mtestdpc.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | REM ======================================================================== 3 | REM Copyright 1988-2006 University of Washington 4 | REM 5 | REM Licensed under the Apache License, Version 2.0 (the "License"); 6 | REM you may not use this file except in compliance with the License. 7 | REM You may obtain a copy of the License at 8 | REM 9 | REM http://www.apache.org/licenses/LICENSE-2.0 10 | REM 11 | REM 12 | REM ======================================================================== 13 | 14 | REM Program: Portable C client makefile -- MS-DOS PC/TCP link 15 | REM 16 | REM Author: Mark Crispin 17 | REM Networks and Distributed Computing 18 | REM Computing & Communications 19 | REM University of Washington 20 | REM Administration Building, AG-44 21 | REM Seattle, WA 98195 22 | REM Internet: MRC@CAC.Washington.EDU 23 | REM 24 | REM Date: 26 June 1994 25 | REM Last Edited:30 August 2006 26 | 27 | link /NOI /stack:32767 mtest.obj,mtest.exe,,cclient.lib lsocket.lib lnetlib.lib lpc.lib lconfig.lib llibce.lib; 28 | -------------------------------------------------------------------------------- /src/tmail/tquota.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2007 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Mail Delivery Module Quota Hook 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 10 September 2007 26 | * Last Edited: 10 September 2007 27 | */ 28 | 29 | /* Function prototypes */ 30 | 31 | long tmail_quota (STRING *msg,char *path,uid_t uid,char *tmp,char *sender, 32 | long precedence); 33 | -------------------------------------------------------------------------------- /tools/ua: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # ======================================================================== 4 | # Copyright 1988-2006 University of Washington 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # 13 | # ======================================================================== 14 | 15 | BASE=`pwd` 16 | 17 | if [ ! -f tools/uahelper ]; then 18 | (cd tools;make) 19 | fi 20 | 21 | if [ ! -d $3 ]; then 22 | mkdir $3 23 | fi 24 | 25 | for i in $2/Makefile* ; do 26 | if [ -f $i ] ; then 27 | $1 "$BASE/$i" "$BASE/$3" 28 | fi 29 | done 30 | 31 | if [ -f $2/drivers ]; then 32 | $1 "$BASE/$2/drivers" "$BASE/$3" 33 | fi 34 | 35 | if [ -f $2/mkauths ]; then 36 | $1 "$BASE/$2/mkauths" "$BASE/$3" 37 | fi 38 | 39 | cd $2 40 | 41 | for j in *.[ch]; do 42 | "$BASE/tools/uahelper" < $j > "$BASE/$3/$j" 43 | done 44 | 45 | exit 0 46 | -------------------------------------------------------------------------------- /src/c-client/fs.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Free storage management routines 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | /* Function prototypes */ 31 | 32 | void *fs_get (size_t size); 33 | void fs_resize (void **block,size_t size); 34 | void fs_give (void **block); 35 | -------------------------------------------------------------------------------- /src/osdep/dos/drivraux.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | REM ======================================================================== 3 | REM Copyright 1988-2006 University of Washington 4 | REM 5 | REM Licensed under the Apache License, Version 2.0 (the "License"); 6 | REM you may not use this file except in compliance with the License. 7 | REM You may obtain a copy of the License at 8 | REM 9 | REM http://www.apache.org/licenses/LICENSE-2.0 10 | REM 11 | REM 12 | REM ======================================================================== 13 | 14 | REM Program: Driver Linkage Generator auxillary for DOS 15 | REM 16 | REM Author: Mark Crispin 17 | REM Networks and Distributed Computing 18 | REM Computing & Communications 19 | REM University of Washington 20 | REM Administration Building, AG-44 21 | REM Seattle, WA 98195 22 | REM Internet: MRC@CAC.Washington.EDU 23 | REM 24 | REM Date: 11 October 1989 25 | REM Last Edited:30 August 2006 26 | 27 | ECHO extern DRIVER %1driver; >> LINKAGE.H 28 | ECHO mail_link (&%1driver); /* link in the %1 driver */ >> LINKAGE.C 29 | -------------------------------------------------------------------------------- /src/osdep/nt/setproto.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | REM ======================================================================== 3 | REM Copyright 1988-2006 University of Washington 4 | REM 5 | REM Licensed under the Apache License, Version 2.0 (the "License"); 6 | REM you may not use this file except in compliance with the License. 7 | REM You may obtain a copy of the License at 8 | REM 9 | REM http://www.apache.org/licenses/LICENSE-2.0 10 | REM 11 | REM 12 | REM ======================================================================== 13 | 14 | REM Program: Set default prototype for DOS/NT 15 | REM 16 | REM Author: Mark Crispin 17 | REM Networks and Distributed Computing 18 | REM Computing & Communications 19 | REM University of Washington 20 | REM Administration Building, AG-44 21 | REM Seattle, WA 98195 22 | REM Internet: MRC@CAC.Washington.EDU 23 | REM 24 | REM Date: 9 October 1995 25 | REM Last Edited: 30 August 2006 26 | 27 | REM Set the default drivers 28 | ECHO #define CREATEPROTO %1proto >> LINKAGE.H 29 | ECHO #define APPENDPROTO %2proto >> LINKAGE.H 30 | -------------------------------------------------------------------------------- /src/osdep/unix/ckp_2nd.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Dual check password part 2 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | /* Undefine routine name */ 31 | 32 | #undef checkpw 33 | 34 | /* Redefine std checker's routine name */ 35 | 36 | #define checkpw checkpw_std 37 | -------------------------------------------------------------------------------- /src/osdep/unix/tz_nul.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Null Time Zone String (unknown) 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 30 August 1994 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | /* Append local timezone name 31 | * Accepts: destination string 32 | */ 33 | 34 | void rfc822_timezone (char *s,void *t) 35 | { 36 | } 37 | -------------------------------------------------------------------------------- /src/osdep/wce/setproto.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | REM ======================================================================== 3 | REM Copyright 1988-2006 University of Washington 4 | REM 5 | REM Licensed under the Apache License, Version 2.0 (the "License"); 6 | REM you may not use this file except in compliance with the License. 7 | REM You may obtain a copy of the License at 8 | REM 9 | REM http://www.apache.org/licenses/LICENSE-2.0 10 | REM 11 | REM 12 | REM ======================================================================== 13 | 14 | REM Program: Set default prototype for DOS/NT 15 | REM 16 | REM Author: Mark Crispin 17 | REM Networks and Distributed Computing 18 | REM Computing & Communications 19 | REM University of Washington 20 | REM Administration Building, AG-44 21 | REM Seattle, WA 98195 22 | REM Internet: MRC@CAC.Washington.EDU 23 | REM 24 | REM Date: 9 October 1995 25 | REM Last Edited: 30 August 2006 26 | 27 | REM Set the default drivers 28 | ECHO #define CREATEPROTO %1proto >> LINKAGE.H 29 | ECHO #define APPENDPROTO %2proto >> LINKAGE.H 30 | -------------------------------------------------------------------------------- /src/dmail/dquota.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2007 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Procmail-Callable Mail Delivery Module Quota Hook 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 10 September 2007 26 | * Last Edited: 10 September 2007 27 | */ 28 | 29 | /* Function prototypes */ 30 | 31 | long dmail_quota (STRING *msg,char *path,char *tmp,char *sender, 32 | long precedence); 33 | -------------------------------------------------------------------------------- /supplemental/patches/imap-2007f-ldflags.patch: -------------------------------------------------------------------------------- 1 | diff -up imap-2007f/src/osdep/unix/Makefile.ldflags imap-2007f/src/osdep/unix/Makefile 2 | --- imap-2007f/src/osdep/unix/Makefile.ldflags 2018-04-24 13:18:45.333043626 +0200 3 | +++ imap-2007f/src/osdep/unix/Makefile 2018-04-24 13:29:09.262125281 +0200 4 | @@ -73,7 +73,7 @@ SSLRSA= # -lRSAglue -lrsaref 5 | 6 | SSLCFLAGS= -I$(SSLINCLUDE) -I$(SSLINCLUDE)/openssl\ 7 | -DSSL_CERT_DIRECTORY=\"$(SSLCERTS)\" -DSSL_KEY_DIRECTORY=\"$(SSLKEYS)\" 8 | -SSLLDFLAGS= -L$(SSLLIB) -lssl $(SSLCRYPTO) $(SSLRSA) 9 | +SSLLDFLAGS= -L$(SSLLIB) -lssl $(SSLCRYPTO) $(SSLRSA) $(EXTRALDFLAGS) 10 | 11 | 12 | # Extended flags needed for non-standard passwd types. You may need to modify. 13 | @@ -502,7 +502,7 @@ lnp: # Linux Pluggable Authentication mo 14 | ACTIVEFILE=/var/lib/news/active \ 15 | RSHPATH=/usr/bin/rsh \ 16 | BASECFLAGS="$(GCCCFLAGS)" \ 17 | - BASELDFLAGS="$(PAMLDFLAGS)" 18 | + BASELDFLAGS="$(EXTRALDFLAGS) $(PAMLDFLAGS)" 19 | 20 | lnx: # Linux non-shadow passwords 21 | @echo You are building for traditional Linux *without* shadow 22 | -------------------------------------------------------------------------------- /src/c-client/nl.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Newline routines 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | /* Function prototypes */ 31 | 32 | unsigned long strcrlfcpy (unsigned char **dst,unsigned long *dstl, 33 | unsigned char *src,unsigned long srcl); 34 | unsigned long strcrlflen (STRING *s); 35 | -------------------------------------------------------------------------------- /src/osdep/unix/fsync.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: File sync emulator 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 3 May 1995 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | /* Emulator for BSD fsync() call 31 | * Accepts: file name 32 | * Returns: 0 if successful, -1 if failure 33 | */ 34 | 35 | int fsync (int fd) 36 | { 37 | sync (); 38 | return 0; 39 | } 40 | -------------------------------------------------------------------------------- /src/osdep/unix/os_s40.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- SUN-OS 4.0 version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 11 May 1989 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | void *malloc (size_t byteSize); 30 | void free (void *ptr); 31 | void *realloc (void *oldptr,size_t newsize); 32 | 33 | #include "os_sun.h" /* now use regular SUN-OS file */ 34 | -------------------------------------------------------------------------------- /src/osdep/dos/mkautaux.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | REM ======================================================================== 3 | REM Copyright 1988-2006 University of Washington 4 | REM 5 | REM Licensed under the Apache License, Version 2.0 (the "License"); 6 | REM you may not use this file except in compliance with the License. 7 | REM You may obtain a copy of the License at 8 | REM 9 | REM http://www.apache.org/licenses/LICENSE-2.0 10 | REM 11 | REM 12 | REM ======================================================================== 13 | 14 | REM Program: Authenticator Linkage Generator auxillary for DOS 15 | REM 16 | REM Author: Mark Crispin 17 | REM Networks and Distributed Computing 18 | REM Computing & Communications 19 | REM University of Washington 20 | REM Administration Building, AG-44 21 | REM Seattle, WA 98195 22 | REM Internet: MRC@CAC.Washington.EDU 23 | REM 24 | REM Date: 7 December 1995 25 | REM Last Edited:30 August 2006 26 | 27 | ECHO extern AUTHENTICATOR auth_%1; >> LINKAGE.H 28 | ECHO auth_link (&auth_%1); /* link in the %1 authenticator */ >> LINKAGE.C 29 | ECHO #include "auth_%1.c" >> AUTHS.C 30 | -------------------------------------------------------------------------------- /src/osdep/nt/drivers.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | REM ======================================================================== 3 | REM Copyright 1988-2006 University of Washington 4 | REM 5 | REM Licensed under the Apache License, Version 2.0 (the "License"); 6 | REM you may not use this file except in compliance with the License. 7 | REM You may obtain a copy of the License at 8 | REM 9 | REM http://www.apache.org/licenses/LICENSE-2.0 10 | REM 11 | REM 12 | REM ======================================================================== 13 | 14 | REM Program: Driver Linkage Generator for DOS/NT 15 | REM 16 | REM Author: Mark Crispin 17 | REM Networks and Distributed Computing 18 | REM Computing & Communications 19 | REM University of Washington 20 | REM Administration Building, AG-44 21 | REM Seattle, WA 98195 22 | REM Internet: MRC@CAC.Washington.EDU 23 | REM 24 | REM Date: 11 October 1989 25 | REM Last Edited:30 August 2006 26 | 27 | REM Erase old driver linkage 28 | IF EXIST LINKAGE.* DEL LINKAGE.* 29 | 30 | REM Now define the new list 31 | FOR %%D IN (%1 %2 %3 %4 %5 %6 %7 %8 %9) DO CALL DRIVRAUX %%D 32 | 33 | EXIT 0 34 | -------------------------------------------------------------------------------- /src/osdep/dos/drivers.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | REM ======================================================================== 3 | REM Copyright 1988-2006 University of Washington 4 | REM 5 | REM Licensed under the Apache License, Version 2.0 (the "License"); 6 | REM you may not use this file except in compliance with the License. 7 | REM You may obtain a copy of the License at 8 | REM 9 | REM http://www.apache.org/licenses/LICENSE-2.0 10 | REM 11 | REM 12 | REM ======================================================================== 13 | 14 | REM Program: Driver Linkage Generator for DOS/NT 15 | REM 16 | REM Author: Mark Crispin 17 | REM Networks and Distributed Computing 18 | REM Computing & Communications 19 | REM University of Washington 20 | REM Administration Building, AG-44 21 | REM Seattle, WA 98195 22 | REM Internet: MRC@CAC.Washington.EDU 23 | REM 24 | REM Date: 11 October 1989 25 | REM Last Edited:30 August 2006 26 | 27 | REM Erase old driver linkage 28 | IF EXIST LINKAGE.* DEL LINKAGE.* 29 | 30 | REM Now define the new list 31 | FOR %%D IN (%1 %2 %3 %4 %5 %6 %7 %8 %9) DO CALL DRIVRAUX %%D 32 | 33 | EXIT 0 34 | -------------------------------------------------------------------------------- /src/osdep/wce/drivers.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | REM ======================================================================== 3 | REM Copyright 1988-2006 University of Washington 4 | REM 5 | REM Licensed under the Apache License, Version 2.0 (the "License"); 6 | REM you may not use this file except in compliance with the License. 7 | REM You may obtain a copy of the License at 8 | REM 9 | REM http://www.apache.org/licenses/LICENSE-2.0 10 | REM 11 | REM 12 | REM ======================================================================== 13 | 14 | REM Program: Driver Linkage Generator for DOS/NT 15 | REM 16 | REM Author: Mark Crispin 17 | REM Networks and Distributed Computing 18 | REM Computing & Communications 19 | REM University of Washington 20 | REM Administration Building, AG-44 21 | REM Seattle, WA 98195 22 | REM Internet: MRC@CAC.Washington.EDU 23 | REM 24 | REM Date: 11 October 1989 25 | REM Last Edited:30 August 2006 26 | 27 | REM Erase old driver linkage 28 | IF EXIST LINKAGE.* DEL LINKAGE.* 29 | 30 | REM Now define the new list 31 | FOR %%D IN (%1 %2 %3 %4 %5 %6 %7 %8 %9) DO CALL DRIVRAUX %%D 32 | 33 | EXIT 0 34 | -------------------------------------------------------------------------------- /src/osdep/nt/ftl_nt.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: DOS/VMS/TOPS-20 crash management routines 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | /* Report a fatal error 31 | * Accepts: string to output 32 | */ 33 | 34 | void fatal (char *string) 35 | { 36 | mm_fatal (string); /* pass up the string */ 37 | abort (); /* die horribly */ 38 | } 39 | -------------------------------------------------------------------------------- /src/osdep/unix/setpgrp.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Set process group emulator 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 3 May 1995 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | /* Emulator for BSD setpgrp() call 31 | * Accepts: process ID 32 | * group ID 33 | * Returns: 0 if successful, -1 if failure 34 | */ 35 | 36 | int Setpgrp (int pid,int gid) 37 | { 38 | return setpgrp (); 39 | } 40 | -------------------------------------------------------------------------------- /src/c-client/netmsg.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Network message (SMTP/NNTP/POP2/POP3) routines 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 8 June 1995 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | /* stream must be void* for use as readfn_t */ 31 | long netmsg_read (void *stream,unsigned long count,char *buffer); 32 | FILE *netmsg_slurp (NETSTREAM *stream,unsigned long *size,unsigned long *hsiz); 33 | -------------------------------------------------------------------------------- /src/osdep/amiga/ftl_ami.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: DOS/VMS/TOPS-20 crash management routines 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | /* Report a fatal error 31 | * Accepts: string to output 32 | */ 33 | 34 | void fatal (char *string) 35 | { 36 | mm_fatal (string); /* pass up the string */ 37 | abort (); /* die horribly */ 38 | } 39 | -------------------------------------------------------------------------------- /src/osdep/dos/ftl_dos.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: DOS/VMS/TOPS-20 crash management routines 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | /* Report a fatal error 31 | * Accepts: string to output 32 | */ 33 | 34 | void fatal (char *string) 35 | { 36 | mm_fatal (string); /* pass up the string */ 37 | abort (); /* die horribly */ 38 | } 39 | -------------------------------------------------------------------------------- /src/osdep/dos/mkauths.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | REM ======================================================================== 3 | REM Copyright 1988-2006 University of Washington 4 | REM 5 | REM Licensed under the Apache License, Version 2.0 (the "License"); 6 | REM you may not use this file except in compliance with the License. 7 | REM You may obtain a copy of the License at 8 | REM 9 | REM http://www.apache.org/licenses/LICENSE-2.0 10 | REM 11 | REM 12 | REM ======================================================================== 13 | 14 | REM Program: Authenticator Linkage Generator for DOS and Windows 15 | REM 16 | REM Author: Mark Crispin 17 | REM Networks and Distributed Computing 18 | REM Computing & Communications 19 | REM University of Washington 20 | REM Administration Building, AG-44 21 | REM Seattle, WA 98195 22 | REM Internet: MRC@CAC.Washington.EDU 23 | REM 24 | REM Date: 6 December 1995 25 | REM Last Edited:30 August 2006 26 | 27 | REM Erase old authenticators list 28 | IF EXIST AUTHS.C DEL AUTHS.C 29 | 30 | REM Now define the new list 31 | FOR %%D IN (%1 %2 %3 %4 %5 %6 %7 %8 %9) DO CALL MKAUTAUX %%D 32 | 33 | EXIT 0 34 | -------------------------------------------------------------------------------- /src/osdep/nt/mkauths.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | REM ======================================================================== 3 | REM Copyright 1988-2006 University of Washington 4 | REM 5 | REM Licensed under the Apache License, Version 2.0 (the "License"); 6 | REM you may not use this file except in compliance with the License. 7 | REM You may obtain a copy of the License at 8 | REM 9 | REM http://www.apache.org/licenses/LICENSE-2.0 10 | REM 11 | REM 12 | REM ======================================================================== 13 | 14 | REM Program: Authenticator Linkage Generator for DOS and Windows 15 | REM 16 | REM Author: Mark Crispin 17 | REM Networks and Distributed Computing 18 | REM Computing & Communications 19 | REM University of Washington 20 | REM Administration Building, AG-44 21 | REM Seattle, WA 98195 22 | REM Internet: MRC@CAC.Washington.EDU 23 | REM 24 | REM Date: 6 December 1995 25 | REM Last Edited:30 August 2006 26 | 27 | REM Erase old authenticators list 28 | IF EXIST AUTHS.C DEL AUTHS.C 29 | 30 | REM Now define the new list 31 | FOR %%D IN (%1 %2 %3 %4 %5 %6 %7 %8 %9) DO CALL MKAUTAUX %%D 32 | 33 | EXIT 0 34 | -------------------------------------------------------------------------------- /src/osdep/os2/ftl_os2.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: DOS/VMS/TOPS-20 crash management routines 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | /* Report a fatal error 31 | * Accepts: string to output 32 | */ 33 | 34 | void fatal (char *string) 35 | { 36 | mm_fatal (string); /* pass up the string */ 37 | abort (); /* die horribly */ 38 | } 39 | -------------------------------------------------------------------------------- /src/osdep/os2/setproto.cmd: -------------------------------------------------------------------------------- 1 | /* rexx */ 2 | /* ======================================================================== 3 | * Copyright 1988-2006 University of Washington 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * 12 | * ======================================================================== 13 | */ 14 | /* 15 | * Program: Set default prototype for OS/2 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 10 June 1999 26 | * Last Edited: 30 August 2006 27 | */ 28 | '@echo off' 29 | parse arg default args 30 | h_file='linkage.h' 31 | call stream h_file, 'C', 'open write' 32 | call lineout h_file, '#define DEFAULTPROTO' default'proto' 33 | call stream h_file, 'C', 'close' 34 | exit 0 35 | -------------------------------------------------------------------------------- /src/osdep/tops-20/ftl_t20.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: DOS/VMS/TOPS-20 crash management routines 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | /* Report a fatal error 31 | * Accepts: string to output 32 | */ 33 | 34 | void fatal (char *string) 35 | { 36 | mm_fatal (string); /* pass up the string */ 37 | abort (); /* die horribly */ 38 | } 39 | -------------------------------------------------------------------------------- /src/osdep/vms/ftl_vms.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: DOS/VMS/TOPS-20 crash management routines 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | /* Report a fatal error 31 | * Accepts: string to output 32 | */ 33 | 34 | void fatal (char *string) 35 | { 36 | mm_fatal (string); /* pass up the string */ 37 | abort (); /* die horribly */ 38 | } 39 | -------------------------------------------------------------------------------- /src/osdep/wce/ftl_wce.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: DOS/VMS/TOPS-20 crash management routines 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | /* Report a fatal error 31 | * Accepts: string to output 32 | */ 33 | 34 | void fatal (char *string) 35 | { 36 | mm_fatal (string); /* pass up the string */ 37 | abort (); /* die horribly */ 38 | } 39 | -------------------------------------------------------------------------------- /src/osdep/wce/mkauths.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | REM ======================================================================== 3 | REM Copyright 1988-2006 University of Washington 4 | REM 5 | REM Licensed under the Apache License, Version 2.0 (the "License"); 6 | REM you may not use this file except in compliance with the License. 7 | REM You may obtain a copy of the License at 8 | REM 9 | REM http://www.apache.org/licenses/LICENSE-2.0 10 | REM 11 | REM 12 | REM ======================================================================== 13 | 14 | REM Program: Authenticator Linkage Generator for DOS and Windows 15 | REM 16 | REM Author: Mark Crispin 17 | REM Networks and Distributed Computing 18 | REM Computing & Communications 19 | REM University of Washington 20 | REM Administration Building, AG-44 21 | REM Seattle, WA 98195 22 | REM Internet: MRC@CAC.Washington.EDU 23 | REM 24 | REM Date: 6 December 1995 25 | REM Last Edited:30 August 2006 26 | 27 | REM Erase old authenticators list 28 | IF EXIST AUTHS.C DEL AUTHS.C 29 | 30 | REM Now define the new list 31 | FOR %%D IN (%1 %2 %3 %4 %5 %6 %7 %8 %9) DO CALL MKAUTAUX %%D 32 | 33 | EXIT 0 34 | -------------------------------------------------------------------------------- /src/osdep/unix/sig_bsd.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: BSD Signals 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 29 April 1997 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #include 30 | 31 | /* Arm a signal 32 | * Accepts: signal number 33 | * desired action 34 | * Returns: old action 35 | */ 36 | 37 | void *arm_signal (int sig,void *action) 38 | { 39 | return (void *) signal (sig,action); 40 | } 41 | -------------------------------------------------------------------------------- /src/osdep/unix/sig_sv4.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: SVR4 Signals 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 29 April 1997 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #include 30 | 31 | /* Arm a signal 32 | * Accepts: signal number 33 | * desired action 34 | * Returns: old action 35 | */ 36 | 37 | void *arm_signal (int sig,void *action) 38 | { 39 | return (void *) sigset (sig,action); 40 | } 41 | -------------------------------------------------------------------------------- /src/osdep/os2/os_os2.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- OS/2 emx version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 14 March 1996 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include "env_os2.h" 35 | #include "fs.h" 36 | #include "ftl.h" 37 | #include "nl.h" 38 | #include "tcp.h" 39 | -------------------------------------------------------------------------------- /src/osdep/amiga/drivers: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ======================================================================== 3 | # Copyright 1988-2006 University of Washington 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # 12 | # ======================================================================== 13 | 14 | # Program: Driver Linkage Generator 15 | # 16 | # Author: Mark Crispin 17 | # Networks and Distributed Computing 18 | # Computing & Communications 19 | # University of Washington 20 | # Administration Building, AG-44 21 | # Seattle, WA 98195 22 | # Internet: MRC@CAC.Washington.EDU 23 | # 24 | # Date: 11 October 1989 25 | # Last Edited: 30 August 2006 26 | 27 | 28 | # Erase old driver linkage 29 | rm -f linkage.[ch] 30 | 31 | # Now define the new list 32 | for driver 33 | do 34 | echo "extern DRIVER "$driver"driver;" >> linkage.h 35 | echo " mail_link (&"$driver"driver); /* link in the $driver driver */" | cat >> linkage.c 36 | done 37 | -------------------------------------------------------------------------------- /src/osdep/amiga/gethstid.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Get host ID emulator 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 3 May 1995 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | /* Emulator for BSD gethostid() call 31 | * Returns: unique identifier for this machine 32 | */ 33 | 34 | long gethostid (void) 35 | { 36 | /* No gethostid() here, so just fake it and hope things turn out okay. */ 37 | return 0xdeadface; 38 | } 39 | -------------------------------------------------------------------------------- /src/osdep/unix/drivers: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ======================================================================== 3 | # Copyright 1988-2006 University of Washington 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # 12 | # ======================================================================== 13 | 14 | # Program: Driver Linkage Generator 15 | # 16 | # Author: Mark Crispin 17 | # Networks and Distributed Computing 18 | # Computing & Communications 19 | # University of Washington 20 | # Administration Building, AG-44 21 | # Seattle, WA 98195 22 | # Internet: MRC@CAC.Washington.EDU 23 | # 24 | # Date: 11 October 1989 25 | # Last Edited: 30 August 2006 26 | 27 | 28 | # Erase old driver linkage 29 | rm -f linkage.[ch] 30 | 31 | # Now define the new list 32 | for driver 33 | do 34 | echo "extern DRIVER "$driver"driver;" >> linkage.h 35 | echo " mail_link (&"$driver"driver); /* link in the $driver driver */" | cat >> linkage.c 36 | done 37 | -------------------------------------------------------------------------------- /src/osdep/unix/gethstid.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Get host ID emulator 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 3 May 1995 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | /* Emulator for BSD gethostid() call 31 | * Returns: unique identifier for this machine 32 | */ 33 | 34 | long gethostid (void) 35 | { 36 | /* No gethostid() here, so just fake it and hope things turn out okay. */ 37 | return 0xdeadface; 38 | } 39 | -------------------------------------------------------------------------------- /src/osdep/unix/strerror.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Error number to string 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* Return implementation-defined string corresponding to error 30 | * Accepts: error number 31 | * Returns: string for that error 32 | */ 33 | 34 | char *strerror (int n) 35 | { 36 | return (n >= 0 && n < sys_nerr) ? sys_errlist[n] : NIL; 37 | } 38 | -------------------------------------------------------------------------------- /src/osdep/mac/linkage.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Default driver linkage 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 13 June 1995 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | extern DRIVER imapdriver; 30 | extern DRIVER nntpdriver; 31 | extern DRIVER pop3driver; 32 | extern DRIVER dummydriver; 33 | extern AUTHENTICATOR auth_ext; 34 | extern AUTHENTICATOR auth_log; 35 | extern AUTHENTICATOR auth_md5; 36 | extern AUTHENTICATOR auth_pla; 37 | -------------------------------------------------------------------------------- /src/osdep/tops-20/linkage.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Default driver linkage 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 13 June 1995 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | extern DRIVER imapdriver; 30 | extern DRIVER nntpdriver; 31 | extern DRIVER pop3driver; 32 | extern DRIVER dummydriver; 33 | extern AUTHENTICATOR auth_ext; 34 | extern AUTHENTICATOR auth_log; 35 | extern AUTHENTICATOR auth_md5; 36 | extern AUTHENTICATOR auth_pla; 37 | -------------------------------------------------------------------------------- /src/osdep/unix/tz_bsd.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: BSD-style Time Zone String 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 30 August 1994 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | /* Append local timezone name 31 | * Accepts: destination string 32 | */ 33 | 34 | void rfc822_timezone (char *s,void *t) 35 | { 36 | /* append timezone from tm struct */ 37 | sprintf (s + strlen (s)," (%.50s)",((struct tm *) t)->tm_zone); 38 | } 39 | -------------------------------------------------------------------------------- /src/osdep/vms/linkage.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Default driver linkage 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 13 June 1995 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | extern DRIVER imapdriver; 30 | extern DRIVER nntpdriver; 31 | extern DRIVER pop3driver; 32 | extern DRIVER dummydriver; 33 | extern AUTHENTICATOR auth_ext; 34 | extern AUTHENTICATOR auth_log; 35 | extern AUTHENTICATOR auth_md5; 36 | extern AUTHENTICATOR auth_pla; 37 | -------------------------------------------------------------------------------- /src/osdep/amiga/tz_bsd.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: BSD-style Time Zone String 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 30 August 1994 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | /* Append local timezone name 31 | * Accepts: destination string 32 | */ 33 | 34 | void rfc822_timezone (char *s,void *t) 35 | { 36 | /* append timezone from tm struct */ 37 | sprintf (s + strlen (s)," (%.50s)",((struct tm *) t)->tm_zone); 38 | } 39 | -------------------------------------------------------------------------------- /src/ansilib/memmove.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Memory move 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* Copy memory block 30 | * Accepts: destination pointer 31 | * source pointer 32 | * length 33 | * Returns: destination pointer 34 | */ 35 | 36 | void *memmove (void *s,void *ct,size_t n) 37 | { 38 | bcopy (ct,s,n); /* they should have this one */ 39 | return s; 40 | } 41 | -------------------------------------------------------------------------------- /src/osdep/unix/ftl_unix.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: UNIX crash management routines 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | /* Report a fatal error 31 | * Accepts: string to output 32 | */ 33 | 34 | void fatal (char *string) 35 | { 36 | MM_FATAL (string); /* pass up the string */ 37 | syslog (LOG_ALERT,"IMAP toolkit crash: %.100s",string); 38 | abort (); /* die horribly */ 39 | } 40 | -------------------------------------------------------------------------------- /src/ansilib/memset.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Set memory 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * 24 | * Date: 11 May 1989 25 | * Last Edited: 30 August 2006 26 | */ 27 | 28 | /* Set a block of memory 29 | * Accepts: destination pointer 30 | * value to set 31 | * length 32 | * Returns: destination pointer 33 | */ 34 | 35 | void *memset (void *s,int c,size_t n) 36 | { 37 | if (c) while (n) s[--n] = c; /* this way if non-zero */ 38 | else bzero (s,n); /* they should have this one */ 39 | return s; 40 | } 41 | -------------------------------------------------------------------------------- /src/osdep/mac/ftl_mac.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Mac crash management routines 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 26 January 1992 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* Report a fatal error 30 | * Accepts: string to output 31 | */ 32 | 33 | void fatal (char *string) 34 | { 35 | mm_fatal (string); /* pass up the string */ 36 | /* nuke the resolver */ 37 | if (resolveropen) CloseResolver (); 38 | abort (); /* die horribly */ 39 | } 40 | -------------------------------------------------------------------------------- /src/osdep/dos/os_dpc.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- DOS (PC/TCP) version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 11 May 1989 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #define INADEQUATE_MEMORY 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | #include "env_dos.h" 38 | #include "fs.h" 39 | #include "ftl.h" 40 | #include "nl.h" 41 | #include "tcp.h" 42 | -------------------------------------------------------------------------------- /src/osdep/unix/log_old.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Standard login for very old UNIX systems 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* Log in 30 | * Accepts: login passwd struct 31 | * argument count 32 | * argument vector 33 | * Returns: T if success, NIL otherwise 34 | */ 35 | 36 | long loginpw (struct passwd *pw,int argc,char *argv[]) 37 | { 38 | return !(setgid (pw->pw_gid) || setuid (pw->pw_uid)); 39 | } 40 | -------------------------------------------------------------------------------- /src/osdep/unix/tz_sv4.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: SVR4-style Time Zone String 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 30 August 1994 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | /* Append local timezone name 31 | * Accepts: destination string 32 | */ 33 | 34 | void rfc822_timezone (char *s,void *t) 35 | { 36 | tzset (); /* get timezone from TZ environment stuff */ 37 | sprintf (s + strlen (s)," (%.50s)", 38 | tzname[daylight ? (((struct tm *) t)->tm_isdst > 0) : 0]); 39 | } 40 | -------------------------------------------------------------------------------- /src/osdep/unix/os_ult.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- Ultrix version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 11 May 1989 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | 38 | #include "env_unix.h" 39 | #include "fs.h" 40 | #include "ftl.h" 41 | #include "nl.h" 42 | #include "tcp.h" 43 | -------------------------------------------------------------------------------- /src/osdep/dos/os_dbw.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- DOS (B&W/Novell) version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 11 May 1989 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #define INADEQUATE_MEMORY 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | #define gethostid clock 38 | 39 | #include "env_dos.h" 40 | #include "fs.h" 41 | #include "ftl.h" 42 | #include "nl.h" 43 | #include "tcp.h" 44 | -------------------------------------------------------------------------------- /src/osdep/dos/os_dnv.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- DOS (B&W/Novell) version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 11 May 1989 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #define INADEQUATE_MEMORY 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | #define gethostid clock 38 | 39 | #include "env_dos.h" 40 | #include "fs.h" 41 | #include "ftl.h" 42 | #include "nl.h" 43 | #include "tcp.h" 44 | -------------------------------------------------------------------------------- /src/osdep/dos/os_dwa.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- DOS (Waterloo) version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 11 May 1989 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #define INADEQUATE_MEMORY 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | #define tcp_open TCP_open 38 | 39 | #include "env_dos.h" 40 | #include "fs.h" 41 | #include "ftl.h" 42 | #include "nl.h" 43 | #include "tcp.h" 44 | -------------------------------------------------------------------------------- /src/osdep/nt/drivraux.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | REM ======================================================================== 3 | REM Copyright 1988-2006 University of Washington 4 | REM 5 | REM Licensed under the Apache License, Version 2.0 (the "License"); 6 | REM you may not use this file except in compliance with the License. 7 | REM You may obtain a copy of the License at 8 | REM 9 | REM http://www.apache.org/licenses/LICENSE-2.0 10 | REM 11 | REM 12 | REM ======================================================================== 13 | 14 | REM Program: Driver Linkage Generator auxillary for NT/Win9x 15 | REM 16 | REM Author: Mark Crispin 17 | REM Networks and Distributed Computing 18 | REM Computing & Communications 19 | REM University of Washington 20 | REM Administration Building, AG-44 21 | REM Seattle, WA 98195 22 | REM Internet: MRC@CAC.Washington.EDU 23 | REM 24 | REM Date: 11 October 1989 25 | REM Last Edited:30 August 2006 26 | 27 | ECHO extern DRIVER %1driver; >> LINKAGE.H 28 | REM Note the introduction of the caret to quote the ampersand in NT 29 | if "%OS%" == "Windows_NT" ECHO mail_link (^&%1driver); /* link in the %1 driver */ >> LINKAGE.C 30 | if "%OS%" == "" ECHO mail_link (&%1driver); /* link in the %1 driver */ >> LINKAGE.C 31 | -------------------------------------------------------------------------------- /src/osdep/wce/drivraux.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | REM ======================================================================== 3 | REM Copyright 1988-2006 University of Washington 4 | REM 5 | REM Licensed under the Apache License, Version 2.0 (the "License"); 6 | REM you may not use this file except in compliance with the License. 7 | REM You may obtain a copy of the License at 8 | REM 9 | REM http://www.apache.org/licenses/LICENSE-2.0 10 | REM 11 | REM 12 | REM ======================================================================== 13 | 14 | REM Program: Driver Linkage Generator auxillary for NT/Win9x 15 | REM 16 | REM Author: Mark Crispin 17 | REM Networks and Distributed Computing 18 | REM Computing & Communications 19 | REM University of Washington 20 | REM Administration Building, AG-44 21 | REM Seattle, WA 98195 22 | REM Internet: MRC@CAC.Washington.EDU 23 | REM 24 | REM Date: 11 October 1989 25 | REM Last Edited:30 August 2006 26 | 27 | ECHO extern DRIVER %1driver; >> LINKAGE.H 28 | REM Note the introduction of the caret to quote the ampersand in NT 29 | if "%OS%" == "Windows_NT" ECHO mail_link (^&%1driver); /* link in the %1 driver */ >> LINKAGE.C 30 | if "%OS%" == "" ECHO mail_link (&%1driver); /* link in the %1 driver */ >> LINKAGE.C 31 | -------------------------------------------------------------------------------- /src/osdep/amiga/fdstring.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: File descriptor string routines 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 15 April 1997 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* Driver-dependent data passed to init method */ 30 | 31 | typedef struct fd_data { 32 | int fd; /* file descriptor */ 33 | unsigned long pos; /* initial position */ 34 | char *chunk; /* I/O buffer chunk */ 35 | unsigned long chunksize; /* I/O buffer chunk length */ 36 | } FDDATA; 37 | 38 | 39 | extern STRINGDRIVER fd_string; 40 | -------------------------------------------------------------------------------- /src/osdep/dos/fdstring.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: File descriptor string routines 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 15 April 1997 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* Driver-dependent data passed to init method */ 30 | 31 | typedef struct fd_data { 32 | int fd; /* file descriptor */ 33 | unsigned long pos; /* initial position */ 34 | char *chunk; /* I/O buffer chunk */ 35 | unsigned long chunksize; /* I/O buffer chunk length */ 36 | } FDDATA; 37 | 38 | 39 | extern STRINGDRIVER fd_string; 40 | -------------------------------------------------------------------------------- /src/osdep/nt/fdstring.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: File descriptor string routines 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 15 April 1997 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* Driver-dependent data passed to init method */ 30 | 31 | typedef struct fd_data { 32 | int fd; /* file descriptor */ 33 | unsigned long pos; /* initial position */ 34 | char *chunk; /* I/O buffer chunk */ 35 | unsigned long chunksize; /* I/O buffer chunk length */ 36 | } FDDATA; 37 | 38 | 39 | extern STRINGDRIVER fd_string; 40 | -------------------------------------------------------------------------------- /src/osdep/unix/ckp_nul.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Null check password 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 23 July 1998 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* Check password 30 | * Accepts: login passwd struct 31 | * password string 32 | * argument count 33 | * argument vector 34 | * Returns: passwd struct if password validated, NIL otherwise 35 | */ 36 | 37 | struct passwd *checkpw (struct passwd *pw,char *pass,int argc,char *argv[]) 38 | { 39 | return NIL; /* always fails */ 40 | } 41 | -------------------------------------------------------------------------------- /src/osdep/unix/fdstring.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: File descriptor string routines 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 15 April 1997 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* Driver-dependent data passed to init method */ 30 | 31 | typedef struct fd_data { 32 | int fd; /* file descriptor */ 33 | unsigned long pos; /* initial position */ 34 | char *chunk; /* I/O buffer chunk */ 35 | unsigned long chunksize; /* I/O buffer chunk length */ 36 | } FDDATA; 37 | 38 | 39 | extern STRINGDRIVER fd_string; 40 | -------------------------------------------------------------------------------- /src/osdep/unix/os_bsi.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- BSDI BSD/386 version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 5 March 1993 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | 39 | #include "env_unix.h" 40 | #include "fs.h" 41 | #include "ftl.h" 42 | #include "nl.h" 43 | #include "tcp.h" 44 | -------------------------------------------------------------------------------- /src/osdep/amiga/gr_waitp.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: UNIX Grim PID Reaper -- waitpid() version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 30 November 1993 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* Grim PID reaper 30 | * Accepts: process ID 31 | * kill request flag 32 | * status return value 33 | */ 34 | 35 | void grim_pid_reap_status (int pid,int killreq,void *status) 36 | { 37 | if (killreq) kill(pid,SIGHUP);/* kill if not already dead */ 38 | while ((waitpid (pid,status,NIL) < 0) && (errno != ECHILD)); 39 | } 40 | -------------------------------------------------------------------------------- /src/osdep/unix/gr_wait4.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: UNIX Grim PID Reaper -- wait4() version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 30 November 1993 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* Grim PID reaper 30 | * Accepts: process ID 31 | * kill request flag 32 | * status return value 33 | */ 34 | 35 | void grim_pid_reap_status (int pid,int killreq,void *status) 36 | { 37 | if (killreq) kill(pid,SIGHUP);/* kill if not already dead */ 38 | while ((wait4 (pid,status,NIL,NIL) < 0) && (errno != ECHILD)); 39 | } 40 | -------------------------------------------------------------------------------- /src/osdep/unix/gr_waitp.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: UNIX Grim PID Reaper -- waitpid() version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 30 November 1993 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* Grim PID reaper 30 | * Accepts: process ID 31 | * kill request flag 32 | * status return value 33 | */ 34 | 35 | void grim_pid_reap_status (int pid,int killreq,void *status) 36 | { 37 | if (killreq) kill(pid,SIGHUP);/* kill if not already dead */ 38 | while ((waitpid (pid,status,NIL) < 0) && (errno != ECHILD)); 39 | } 40 | -------------------------------------------------------------------------------- /src/osdep/unix/os_lyn.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- LynxOS version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 5 March 1993 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | #define gethostid clock 38 | 39 | 40 | #include "env_unix.h" 41 | #include "fs.h" 42 | #include "ftl.h" 43 | #include "nl.h" 44 | #include "tcp.h" 45 | -------------------------------------------------------------------------------- /src/osdep/unix/ckp_ult.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: ULTRIX check password 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* Check password 30 | * Accepts: login passwd struct 31 | * password string 32 | * argument count 33 | * argument vector 34 | * Returns: passwd struct if password validated, NIL otherwise 35 | */ 36 | 37 | struct passwd *checkpw (struct passwd *pw,char *pass,int argc,char *argv[]) 38 | { 39 | return (authenticate_user (pw,pass,NIL) >= 0) ? pw : NIL; 40 | } 41 | -------------------------------------------------------------------------------- /src/osdep/unix/os_mct.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- MachTen version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 7 December 2006 27 | */ 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | #define unix 1 39 | 40 | #include "env_unix.h" 41 | #include "fs.h" 42 | #include "ftl.h" 43 | #include "nl.h" 44 | #include "tcp.h" 45 | -------------------------------------------------------------------------------- /src/osdep/unix/truncate.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Truncate a file 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 30 June 1994 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* Emulator for ftruncate() call 30 | * Accepts: file descriptor 31 | * length 32 | * Returns: 0 if success, -1 if failure 33 | */ 34 | 35 | int ftruncate (int fd,off_t length) 36 | { 37 | struct flock fb; 38 | fb.l_whence = 0; 39 | fb.l_len = 0; 40 | fb.l_start = length; 41 | fb.l_type = F_WRLCK; /* write lock on file space */ 42 | return fcntl (fd,F_FREESP,&fb); 43 | } 44 | -------------------------------------------------------------------------------- /src/osdep/unix/os_bsf.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- FreeBSD version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 5 March 1993 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | 39 | #define direct dirent 40 | 41 | 42 | #include "env_unix.h" 43 | #include "fs.h" 44 | #include "ftl.h" 45 | #include "nl.h" 46 | #include "tcp.h" 47 | -------------------------------------------------------------------------------- /src/osdep/dos/os_dnf.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- DOS (PC-NFS) version 16 | * 17 | * Author: Mike Seibel from Novell version by Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MikeS@CAC.Washington.EDU 24 | * 25 | * Date: 11 May 1989 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #define INADEQUATE_MEMORY 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | #define gethostid clock 39 | 40 | #include "env_dos.h" 41 | #include "fs.h" 42 | #include "ftl.h" 43 | #include "nl.h" 44 | #include "tcp.h" 45 | -------------------------------------------------------------------------------- /src/ansilib/strpbrk.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: String search for break character 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * 24 | * Date: 11 May 1989 25 | * Last Edited: 30 August 2006 26 | */ 27 | 28 | /* Return pointer to first occurance in string of any delimiter 29 | * Accepts: source pointer 30 | * vector of delimiters pointer 31 | * Returns: pointer to delimiter or NIL if not found 32 | */ 33 | 34 | char *strpbrk (char *cs,char *ct) 35 | { 36 | char *s; 37 | /* search for delimiter until end of string */ 38 | for (; *cs; cs++) for (s = ct; *s; s++) if (*s == *cs) return cs; 39 | return NIL; /* not found */ 40 | } 41 | -------------------------------------------------------------------------------- /src/osdep/nt/mkautaux.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | REM ======================================================================== 3 | REM Copyright 1988-2006 University of Washington 4 | REM 5 | REM Licensed under the Apache License, Version 2.0 (the "License"); 6 | REM you may not use this file except in compliance with the License. 7 | REM You may obtain a copy of the License at 8 | REM 9 | REM http://www.apache.org/licenses/LICENSE-2.0 10 | REM 11 | REM 12 | REM ======================================================================== 13 | 14 | REM Program: Authenticator Linkage Generator auxillary for NT/Win9x 15 | REM 16 | REM Author: Mark Crispin 17 | REM Networks and Distributed Computing 18 | REM Computing & Communications 19 | REM University of Washington 20 | REM Administration Building, AG-44 21 | REM Seattle, WA 98195 22 | REM Internet: MRC@CAC.Washington.EDU 23 | REM 24 | REM Date: 6 December 1995 25 | REM Last Edited:30 August 2006 26 | 27 | ECHO extern AUTHENTICATOR auth_%1; >> LINKAGE.H 28 | REM Note the introduction of the caret to quote the ampersand in NT 29 | if "%OS%" == "Windows_NT" ECHO auth_link (^&auth_%1); /* link in the %1 authenticator */ >> LINKAGE.C 30 | if "%OS%" == "" ECHO auth_link (&auth_%1); /* link in the %1 authenticator */ >> LINKAGE.C 31 | ECHO #include "auth_%1.c" >> AUTHS.C 32 | -------------------------------------------------------------------------------- /src/osdep/wce/mkautaux.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | REM ======================================================================== 3 | REM Copyright 1988-2006 University of Washington 4 | REM 5 | REM Licensed under the Apache License, Version 2.0 (the "License"); 6 | REM you may not use this file except in compliance with the License. 7 | REM You may obtain a copy of the License at 8 | REM 9 | REM http://www.apache.org/licenses/LICENSE-2.0 10 | REM 11 | REM 12 | REM ======================================================================== 13 | 14 | REM Program: Authenticator Linkage Generator auxillary for NT/Win9x 15 | REM 16 | REM Author: Mark Crispin 17 | REM Networks and Distributed Computing 18 | REM Computing & Communications 19 | REM University of Washington 20 | REM Administration Building, AG-44 21 | REM Seattle, WA 98195 22 | REM Internet: MRC@CAC.Washington.EDU 23 | REM 24 | REM Date: 6 December 1995 25 | REM Last Edited:30 August 2006 26 | 27 | ECHO extern AUTHENTICATOR auth_%1; >> LINKAGE.H 28 | REM Note the introduction of the caret to quote the ampersand in NT 29 | if "%OS%" == "Windows_NT" ECHO auth_link (^&auth_%1); /* link in the %1 authenticator */ >> LINKAGE.C 30 | if "%OS%" == "" ECHO auth_link (&auth_%1); /* link in the %1 authenticator */ >> LINKAGE.C 31 | ECHO #include "auth_%1.c" >> AUTHS.C 32 | -------------------------------------------------------------------------------- /src/osdep/unix/os_cvx.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- Convex version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 11 May 1989 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | 38 | void *malloc (size_t byteSize); 39 | void *realloc (void *oldptr,size_t newsize); 40 | 41 | #include "env_unix.h" 42 | #include "fs.h" 43 | #include "ftl.h" 44 | #include "nl.h" 45 | #include "tcp.h" 46 | -------------------------------------------------------------------------------- /src/osdep/unix/log_sv4.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: SVR4 login 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* Log in 30 | * Accepts: login passwd struct 31 | * argument count 32 | * argument vector 33 | * Returns: T if success, NIL otherwise 34 | */ 35 | 36 | long loginpw (struct passwd *pw,int argc,char *argv[]) 37 | { 38 | uid_t uid = pw->pw_uid; 39 | char *name = cpystr (pw->pw_name); 40 | long ret = !(setgid (pw->pw_gid) || initgroups (name) || setuid (uid)); 41 | fs_give ((void **) &name); 42 | return ret; 43 | } 44 | -------------------------------------------------------------------------------- /src/mlock/Makefile: -------------------------------------------------------------------------------- 1 | # ======================================================================== 2 | # Copyright 1988-2006 University of Washington 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # 11 | # ======================================================================== 12 | 13 | 14 | # Program: MLOCK Makefile 15 | # 16 | # Author: Mark Crispin 17 | # Networks and Distributed Computing 18 | # Computing & Communications 19 | # University of Washington 20 | # Administration Building, AG-44 21 | # Seattle, WA 98195 22 | # Internet: MRC@CAC.Washington.EDU 23 | # 24 | # Date: 8 February 1999 25 | # Last Edited: 30 August 2006 26 | 27 | 28 | C = ../c-client 29 | SHELL = /bin/sh 30 | 31 | # Get local definitions from c-client directory 32 | 33 | CC = `cat $C/CCTYPE` 34 | CFLAGS = `cat $C/CFLAGS` 35 | 36 | all: mlock 37 | 38 | mlock: mlock.o 39 | $(CC) $(CFLAGS) -o mlock mlock.o 40 | 41 | install: mlock 42 | chgrp mail mlock 43 | chmod 3711 mlock 44 | cp -p mlock /etc/mlock 45 | 46 | clean: 47 | rm -f *.o mlock || true 48 | 49 | # A monument to a hack of long ago and far away... 50 | love: 51 | @echo 'not war?' 52 | -------------------------------------------------------------------------------- /src/osdep/unix/os_aix.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- AIX version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | 38 | #define direct dirent 39 | 40 | char *strerror (int n); 41 | void *memmove (void *s,void *ct,size_t n); 42 | 43 | #include "env_unix.h" 44 | #include "fs.h" 45 | #include "ftl.h" 46 | #include "nl.h" 47 | #include "tcp.h" 48 | -------------------------------------------------------------------------------- /src/osdep/unix/rename.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Rename file 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 20 May 1996 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* Emulator for working Unix rename() call 30 | * Accepts: old file name 31 | * new file name 32 | * Returns: 0 if success, -1 if error with error in errno 33 | */ 34 | 35 | int Rename (char *oldname,char *newname) 36 | { 37 | int ret; 38 | unlink (newname); /* make sure the old name doesn't exist */ 39 | /* link to new name, unlink old name */ 40 | if (!(ret = link (oldname,newname))) unlink (oldname); 41 | return ret; 42 | } 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/osdep/amiga/log_std.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Standard login 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* Log in 30 | * Accepts: login passwd struct 31 | * argument count 32 | * argument vector 33 | * Returns: T if success, NIL otherwise 34 | */ 35 | 36 | long loginpw (struct passwd *pw,int argc,char *argv[]) 37 | { 38 | uid_t uid = pw->pw_uid; 39 | char *name = cpystr (pw->pw_name); 40 | long ret = !(setgid (pw->pw_gid) || initgroups (name,pw->pw_gid) || 41 | setuid (uid)); 42 | fs_give ((void **) &name); 43 | return ret; 44 | } 45 | -------------------------------------------------------------------------------- /src/osdep/unix/log_std.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Standard login 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* Log in 30 | * Accepts: login passwd struct 31 | * argument count 32 | * argument vector 33 | * Returns: T if success, NIL otherwise 34 | */ 35 | 36 | long loginpw (struct passwd *pw,int argc,char *argv[]) 37 | { 38 | uid_t uid = pw->pw_uid; 39 | char *name = cpystr (pw->pw_name); 40 | long ret = !(setgid (pw->pw_gid) || initgroups (name,pw->pw_gid) || 41 | setuid (uid)); 42 | fs_give ((void **) &name); 43 | return ret; 44 | } 45 | -------------------------------------------------------------------------------- /src/osdep/dos/os_wsk.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- 16-bit Winsock version 16 | * 17 | * Author: Mike Seibel from Novell version by Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MikeS@CAC.Washington.EDU 24 | * 25 | * Date: 11 May 1989 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #define INADEQUATE_MEMORY 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | #define gethostid clock 38 | #define WSA_VERSION ((1 << 8) | 1) 39 | 40 | #include "env_dos.h" 41 | #include "fs.h" 42 | #include "ftl.h" 43 | #include "nl.h" 44 | #include "tcp.h" 45 | 46 | 47 | #undef noErr 48 | #undef MAC 49 | -------------------------------------------------------------------------------- /src/osdep/wce/os_wce.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- WCE version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 11 April 1989 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #include "tcp_wce.h" /* must be before osdep includes tcp.h */ 30 | #include "mail.h" 31 | #include "osdep.h" 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include "misc.h" 39 | 40 | #include "fs_wce.c" 41 | #include "ftl_wce.c" 42 | #include "nl_wce.c" 43 | #include "env_wce.c" 44 | #include "tcp_wce.c" 45 | #include "auths.c" 46 | -------------------------------------------------------------------------------- /src/osdep/unix/ckp_std.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Standard check password 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* Check password 30 | * Accepts: login passwd struct 31 | * password string 32 | * argument count 33 | * argument vector 34 | * Returns: passwd struct if password validated, NIL otherwise 35 | */ 36 | 37 | struct passwd *checkpw (struct passwd *pw,char *pass,int argc,char *argv[]) 38 | { 39 | return (pw->pw_passwd && pw->pw_passwd[0] && pw->pw_passwd[1] && 40 | !strcmp (pw->pw_passwd,(char *) crypt (pass,pw->pw_passwd))) ? 41 | pw : NIL; 42 | } 43 | -------------------------------------------------------------------------------- /src/osdep/unix/log_sec.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: SecureWare login 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* Log in 30 | * Accepts: login passwd struct 31 | * argument count 32 | * argument vector 33 | * Returns: T if success, NIL otherwise 34 | */ 35 | 36 | long loginpw (struct passwd *pw,int argc,char *argv[]) 37 | { 38 | uid_t uid = pw->pw_uid; 39 | char *name = cpystr (pw->pw_name); 40 | long ret = !(setluid (uid) || setgid (pw->pw_gid) || 41 | initgroups (name,pw->pw_gid) || setuid (uid)); 42 | fs_give ((void **) &name); 43 | return ret; 44 | } 45 | -------------------------------------------------------------------------------- /src/osdep/amiga/ckp_std.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Standard check password 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* Check password 30 | * Accepts: login passwd struct 31 | * password string 32 | * argument count 33 | * argument vector 34 | * Returns: passwd struct if password validated, NIL otherwise 35 | */ 36 | 37 | struct passwd *checkpw (struct passwd *pw,char *pass,int argc,char *argv[]) 38 | { 39 | return (pw->pw_passwd && pw->pw_passwd[0] && pw->pw_passwd[1] && 40 | !strcmp (pw->pw_passwd,(char *) crypt (pass,pw->pw_passwd))) ? 41 | pw : NIL; 42 | } 43 | -------------------------------------------------------------------------------- /src/osdep/amiga/mkauths: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ======================================================================== 3 | # Copyright 1988-2006 University of Washington 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # 12 | # ======================================================================== 13 | 14 | # Program: Authenticator Linkage Generator 15 | # 16 | # Author: Mark Crispin 17 | # Networks and Distributed Computing 18 | # Computing & Communications 19 | # University of Washington 20 | # Administration Building, AG-44 21 | # Seattle, WA 98195 22 | # Internet: MRC@CAC.Washington.EDU 23 | # 24 | # Date: 5 December 1995 25 | # Last Edited: 30 August 2006 26 | 27 | # Erase old authenticators list 28 | rm -f auths.c 29 | touch auths.c 30 | 31 | # Now define the new list 32 | for authenticator 33 | do 34 | if [ -f Makefile."$authenticator" ]; then 35 | make -f Makefile."$authenticator" `cat SPECIALS` 36 | fi 37 | echo "extern AUTHENTICATOR auth_"$authenticator";" >> linkage.h 38 | echo " auth_link (&auth_"$authenticator"); /* link in the $authenticator authenticator */" | cat >> linkage.c 39 | echo "#include \"auth_"$authenticator".c\"" >> auths.c 40 | done 41 | -------------------------------------------------------------------------------- /src/osdep/unix/mkauths: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ======================================================================== 3 | # Copyright 1988-2006 University of Washington 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # 12 | # ======================================================================== 13 | 14 | # Program: Authenticator Linkage Generator 15 | # 16 | # Author: Mark Crispin 17 | # Networks and Distributed Computing 18 | # Computing & Communications 19 | # University of Washington 20 | # Administration Building, AG-44 21 | # Seattle, WA 98195 22 | # Internet: MRC@CAC.Washington.EDU 23 | # 24 | # Date: 5 December 1995 25 | # Last Edited: 30 August 2006 26 | 27 | # Erase old authenticators list 28 | rm -f auths.c 29 | touch auths.c 30 | 31 | # Now define the new list 32 | for authenticator 33 | do 34 | if [ -f Makefile."$authenticator" ]; then 35 | make -f Makefile."$authenticator" `cat SPECIALS` 36 | fi 37 | echo "extern AUTHENTICATOR auth_"$authenticator";" >> linkage.h 38 | echo " auth_link (&auth_"$authenticator"); /* link in the $authenticator authenticator */" | cat >> linkage.c 39 | echo "#include \"auth_"$authenticator".c\"" >> auths.c 40 | done 41 | -------------------------------------------------------------------------------- /src/osdep/dos/os_wsk.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- Winsock version 16 | * 17 | * Author: Mike Seibel from Unix version by Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MikeS@CAC.Washington.EDU 24 | * 25 | * Date: 11 April 1989 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #include "tcp_wsk.h" /* must be before osdep includes tcp.h */ 30 | #undef ERROR /* quell conflicting def warning */ 31 | #include "mail.h" 32 | #include "osdep.h" 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include "misc.h" 39 | 40 | 41 | #include "fs_dos.c" 42 | #include "ftl_dos.c" 43 | #include "nl_dos.c" 44 | #include "env_dos.c" 45 | #include "tcp_wsk.c" 46 | -------------------------------------------------------------------------------- /src/osdep/unix/os_sua.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2007 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- Windows Vista SUA 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 10 September 1993 26 | * Last Edited: 4 May 2007 27 | */ 28 | 29 | #define _REENTRANT /* for strtok_r() */ 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include /* for struct tm */ 36 | #include 37 | #include 38 | #include 39 | 40 | 41 | #define setpgrp setpgid 42 | 43 | #define direct dirent 44 | 45 | 46 | #include "env_unix.h" 47 | #include "fs.h" 48 | #include "ftl.h" 49 | #include "nl.h" 50 | #include "tcp.h" 51 | -------------------------------------------------------------------------------- /src/osdep/nt/pseudo.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Pseudo Header Strings 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 26 September 1996 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* Local sites may wish to alter this text */ 30 | 31 | char *pseudo_from = "MAILER-DAEMON"; 32 | char *pseudo_name = "Mail System Internal Data"; 33 | char *pseudo_subject = "DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA"; 34 | char *pseudo_msg = 35 | "This text is part of the internal format of your mail folder, and is not\na real message. It is created automatically by the mail system software.\nIf deleted, important folder data will be lost, and it will be re-created\nwith the data reset to initial values." 36 | ; 37 | -------------------------------------------------------------------------------- /src/osdep/os2/pseudo.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Pseudo Header Strings 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 26 September 1996 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* Local sites may wish to alter this text */ 30 | 31 | char *pseudo_from = "MAILER-DAEMON"; 32 | char *pseudo_name = "Mail System Internal Data"; 33 | char *pseudo_subject = "DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA"; 34 | char *pseudo_msg = 35 | "This text is part of the internal format of your mail folder, and is not\na real message. It is created automatically by the mail system software.\nIf deleted, important folder data will be lost, and it will be re-created\nwith the data reset to initial values." 36 | ; 37 | -------------------------------------------------------------------------------- /src/mailutil/Makefile: -------------------------------------------------------------------------------- 1 | # ======================================================================== 2 | # Copyright 1988-2006 University of Washington 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # 11 | # ======================================================================== 12 | 13 | 14 | # Program: mailutil Makefile 15 | # 16 | # Author: Mark Crispin 17 | # Networks and Distributed Computing 18 | # Computing & Communications 19 | # University of Washington 20 | # Administration Building, AG-44 21 | # Seattle, WA 98195 22 | # Internet: MRC@CAC.Washington.EDU 23 | # 24 | # Date: 2 February 1993 25 | # Last Edited: 30 August 2006 26 | 27 | 28 | C = ../c-client 29 | CCLIENTLIB = $C/c-client.a 30 | SHELL = /bin/sh 31 | 32 | # Get local definitions from c-client directory 33 | 34 | CC = `cat $C/CCTYPE` 35 | CFLAGS = -I$C `cat $C/CFLAGS` 36 | LDFLAGS = $(CCLIENTLIB) `cat $C/LDFLAGS` 37 | 38 | mailutil: $(CCLIENTLIB) mailutil.o 39 | $(CC) $(CFLAGS) -o mailutil mailutil.o $(LDFLAGS) 40 | 41 | mailutil.o: $C/mail.h $C/misc.h $C/osdep.h 42 | 43 | $(CCLIENTLIB): 44 | cd $C;make 45 | 46 | clean: 47 | rm -f *.o mailutil 48 | 49 | # A monument to a hack of long ago and far away... 50 | love: 51 | @echo 'not war?' 52 | -------------------------------------------------------------------------------- /src/osdep/amiga/pseudo.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Pseudo Header Strings 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 26 September 1996 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* Local sites may wish to alter this text */ 30 | 31 | char *pseudo_from = "MAILER-DAEMON"; 32 | char *pseudo_name = "Mail System Internal Data"; 33 | char *pseudo_subject = "DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA"; 34 | char *pseudo_msg = 35 | "This text is part of the internal format of your mail folder, and is not\na real message. It is created automatically by the mail system software.\nIf deleted, important folder data will be lost, and it will be re-created\nwith the data reset to initial values." 36 | ; 37 | -------------------------------------------------------------------------------- /src/osdep/unix/os_os4.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- OSF/Digital UNIX/Tru64 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include /* for struct tm */ 35 | #include 36 | #include 37 | #include 38 | 39 | 40 | /* OSF/1 gets this wrong */ 41 | 42 | #define setpgrp setpgid 43 | 44 | #define direct dirent 45 | 46 | #include "env_unix.h" 47 | #include "fs.h" 48 | #include "ftl.h" 49 | #include "nl.h" 50 | #include "tcp.h" 51 | #include "flocksim.h" 52 | -------------------------------------------------------------------------------- /src/osdep/unix/os_osf.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- OSF/Digital UNIX/Tru64 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include /* for struct tm */ 35 | #include 36 | #include 37 | #include 38 | 39 | 40 | /* OSF/1 gets this wrong */ 41 | 42 | #define setpgrp setpgid 43 | 44 | #define direct dirent 45 | 46 | #include "env_unix.h" 47 | #include "fs.h" 48 | #include "ftl.h" 49 | #include "nl.h" 50 | #include "tcp.h" 51 | #include "flocksim.h" 52 | -------------------------------------------------------------------------------- /src/osdep/unix/os_sos.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- OSF/Digital UNIX/Tru64 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include /* for struct tm */ 35 | #include 36 | #include 37 | #include 38 | 39 | 40 | /* OSF/1 gets this wrong */ 41 | 42 | #define setpgrp setpgid 43 | 44 | #define direct dirent 45 | 46 | #include "env_unix.h" 47 | #include "fs.h" 48 | #include "ftl.h" 49 | #include "nl.h" 50 | #include "tcp.h" 51 | #include "flocksim.h" 52 | -------------------------------------------------------------------------------- /src/osdep/unix/pseudo.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Pseudo Header Strings 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 26 September 1996 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* Local sites may wish to alter this text */ 30 | 31 | char *pseudo_from = "MAILER-DAEMON"; 32 | char *pseudo_name = "Mail System Internal Data"; 33 | char *pseudo_subject = "DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA"; 34 | char *pseudo_msg = 35 | "This text is part of the internal format of your mail folder, and is not\na real message. It is created automatically by the mail system software.\nIf deleted, important folder data will be lost, and it will be re-created\nwith the data reset to initial values." 36 | ; 37 | -------------------------------------------------------------------------------- /src/osdep/dos/tcp_dwa.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Waterloo DOS TCP/IP routines 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 11 April 1989 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* TCP input buffer -- must be large enough to prevent overflow */ 30 | 31 | #define BUFLEN 8192 32 | 33 | 34 | /* TCP I/O stream (must be before osdep.h is included) */ 35 | 36 | #define TCPSTREAM struct tcp_stream 37 | TCPSTREAM { 38 | char *host; /* host name */ 39 | unsigned long port; /* port number */ 40 | char *localhost; /* local host name */ 41 | tcp_Socket *tcps; /* tcp socket */ 42 | long ictr; /* input counter */ 43 | char *iptr; /* input pointer */ 44 | char ibuf[BUFLEN]; /* input buffer */ 45 | }; 46 | -------------------------------------------------------------------------------- /src/osdep/unix/crx_std.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Exclusive create of a file 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 17 December 1999 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* Exclusive create of a file 30 | * Accepts: file name 31 | * Return: T if success, NIL if failed, -1 if retry 32 | */ 33 | 34 | long crexcl (char *name) 35 | { 36 | int i; 37 | int mask = umask (0); 38 | long ret = LONGT; 39 | /* try to get the lock */ 40 | if ((i = open (name,O_WRONLY|O_CREAT|O_EXCL,(int) shlock_mode)) < 0) 41 | ret = (errno == EEXIST) ? -1 : NIL; 42 | else close (i); /* made the file, now close it */ 43 | umask (mask); /* restore previous mask */ 44 | return LONGT; /* success */ 45 | } 46 | -------------------------------------------------------------------------------- /src/osdep/unix/os_mnt.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- Mint version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 10 September 1993 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | 40 | #define EAGAIN EWOULDBLOCK 41 | #define FNDELAY O_NDELAY 42 | 43 | /* MiNT gets this wrong */ 44 | 45 | #define setpgrp setpgid 46 | 47 | #include "env_unix.h" 48 | #include "fs.h" 49 | #include "ftl.h" 50 | #include "nl.h" 51 | #include "tcp.h" 52 | -------------------------------------------------------------------------------- /src/osdep/unix/os_nxt.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2007 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- NeXT version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 January 2007 27 | */ 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | /* Use ours instead of theirs */ 39 | 40 | #define strtok STRTOK 41 | #define strtok_r STRTOK_R 42 | 43 | char *strtok (char *s,char *ct); 44 | char *strtok_r (char *s,char *ct,char **r); 45 | 46 | #include "env_unix.h" 47 | #include "fs.h" 48 | #include "ftl.h" 49 | #include "nl.h" 50 | #include "tcp.h" 51 | -------------------------------------------------------------------------------- /src/osdep/amiga/tcp_ami.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: UNIX TCP/IP routines 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | /* TCP input buffer */ 31 | 32 | #define BUFLEN 8192 33 | 34 | 35 | /* TCP I/O stream */ 36 | 37 | #define TCPSTREAM struct tcp_stream 38 | TCPSTREAM { 39 | char *host; /* host name */ 40 | unsigned long port; /* port number */ 41 | char *localhost; /* local host name */ 42 | char *remotehost; /* remote host name */ 43 | int tcpsi; /* input socket */ 44 | int tcpso; /* output socket */ 45 | int ictr; /* input counter */ 46 | char *iptr; /* input pointer */ 47 | char ibuf[BUFLEN]; /* input buffer */ 48 | }; 49 | -------------------------------------------------------------------------------- /src/osdep/unix/os_aux.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- A/UX version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 11 May 1989 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | 39 | 40 | extern int errno; 41 | 42 | char *strerror (int n); 43 | unsigned long strtoul (char *s,char **endp,int base); 44 | void *memmove (void *s,void *ct,size_t n); 45 | 46 | #include "env_unix.h" 47 | #include "fs.h" 48 | #include "ftl.h" 49 | #include "nl.h" 50 | #include "tcp.h" 51 | #include "flocksim.h" 52 | -------------------------------------------------------------------------------- /src/osdep/unix/tcp_unix.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: UNIX TCP/IP routines 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | /* TCP input buffer */ 31 | 32 | #define BUFLEN 8192 33 | 34 | 35 | /* TCP I/O stream */ 36 | 37 | #define TCPSTREAM struct tcp_stream 38 | TCPSTREAM { 39 | char *host; /* host name */ 40 | unsigned long port; /* port number */ 41 | char *localhost; /* local host name */ 42 | char *remotehost; /* remote host name */ 43 | int tcpsi; /* input socket */ 44 | int tcpso; /* output socket */ 45 | int ictr; /* input counter */ 46 | char *iptr; /* input pointer */ 47 | char ibuf[BUFLEN]; /* input buffer */ 48 | }; 49 | -------------------------------------------------------------------------------- /src/dmail/dquota.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2007 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Procmail-Callable Mail Delivery Module Quota Hook 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 10 September 2007 26 | * Last Edited: 10 September 2007 27 | */ 28 | 29 | #include "c-client.h" 30 | 31 | /* Site-written routine to validate delivery per quota and policy 32 | * Accepts: stringstruct of message temporary file 33 | * filesystem path 34 | * return path 35 | * buffer to write error message 36 | * precedence setting 37 | * Returns: T if can deliver, or NIL if quota issue and must bounce 38 | */ 39 | 40 | long dmail_quota (STRING *msg,char *path,char *tmp,char *sender, 41 | long precedence) 42 | { 43 | return LONGT; /* dummy success return */ 44 | } 45 | -------------------------------------------------------------------------------- /src/osdep/unix/utime.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: BSD utime() emulator 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 10 October 1996 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #undef utime 30 | 31 | /* Portable utime() that takes it args like real Unix systems 32 | * Accepts: file path 33 | * traditional utime() argument 34 | * Returns: utime() results 35 | */ 36 | 37 | int portable_utime (char *file,time_t timep[2]) 38 | { 39 | struct utimbuf times; 40 | /* in case there's other cruft there */ 41 | memset (×,0,sizeof (struct utimbuf)); 42 | times.actime = timep[0]; /* copy the portable values */ 43 | times.modtime = timep[1]; 44 | return utime (file,×); /* now call the SVR4 routine */ 45 | } 46 | -------------------------------------------------------------------------------- /src/osdep/vms/os_vms.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2007 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- VMS version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 2 August 1994 26 | * Last Edited: 30 January 2007 27 | */ 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | #define L_SET SEEK_SET 37 | #define L_INCR SEEK_CUR 38 | #define L_XTND SEEK_END 39 | 40 | #include "env_vms.h" 41 | #include "fs.h" 42 | #include "ftl.h" 43 | #include "nl.h" 44 | #include "tcp.h" 45 | 46 | #define gethostid clock 47 | #define random rand 48 | #define unlink delete 49 | 50 | char *getpass (const char *prompt); 51 | 52 | #define strtok_r(a,b,c) strtok(a,b) 53 | -------------------------------------------------------------------------------- /src/dmail/Makefile: -------------------------------------------------------------------------------- 1 | # ======================================================================== 2 | # Copyright 1988-2006 University of Washington 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # 11 | # ======================================================================== 12 | 13 | 14 | # Program: dmail Makefile 15 | # 16 | # Author: Mark Crispin 17 | # Networks and Distributed Computing 18 | # Computing & Communications 19 | # University of Washington 20 | # Administration Building, AG-44 21 | # Seattle, WA 98195 22 | # Internet: MRC@CAC.Washington.EDU 23 | # 24 | # Date: 5 April 1993 25 | # Last Edited: 10 September 2007 26 | 27 | 28 | C = ../c-client 29 | CCLIENTLIB = $C/c-client.a 30 | SHELL = /bin/sh 31 | 32 | # Get local definitions from c-client directory 33 | 34 | CC = `cat $C/CCTYPE` 35 | CFLAGS = -I$C `cat $C/CFLAGS` 36 | LDFLAGS = $(CCLIENTLIB) `cat $C/LDFLAGS` 37 | 38 | dmail: $(CCLIENTLIB) dmail.o dquota.o 39 | $(CC) $(CFLAGS) -o dmail dmail.o dquota.o $(LDFLAGS) 40 | 41 | dmail.o: $C/mail.h $C/misc.h $C/osdep.h dquota.h 42 | 43 | dquota.o: dquota.h 44 | 45 | $(CCLIENTLIB): 46 | cd $C;make 47 | 48 | clean: 49 | rm -f *.o dmail 50 | 51 | # A monument to a hack of long ago and far away... 52 | love: 53 | @echo 'not war?' 54 | -------------------------------------------------------------------------------- /src/osdep/unix/os_a32.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- AIX on RS6000 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include /* for struct tm */ 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | 41 | 42 | #define utime portable_utime 43 | int portable_utime (char *file,time_t timep[2]); 44 | 45 | #include "env_unix.h" 46 | #include "fs.h" 47 | #include "ftl.h" 48 | #include "nl.h" 49 | #include "tcp.h" 50 | #include "flocksim.h" 51 | -------------------------------------------------------------------------------- /src/osdep/unix/os_a41.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- AIX on RS6000 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include /* for struct tm */ 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | 41 | 42 | #define utime portable_utime 43 | int portable_utime (char *file,time_t timep[2]); 44 | 45 | #include "env_unix.h" 46 | #include "fs.h" 47 | #include "ftl.h" 48 | #include "nl.h" 49 | #include "tcp.h" 50 | #include "flocksim.h" 51 | -------------------------------------------------------------------------------- /src/tmail/Makefile: -------------------------------------------------------------------------------- 1 | # ======================================================================== 2 | # Copyright 1988-2006 University of Washington 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # 11 | # ======================================================================== 12 | 13 | 14 | # Program: tmail Makefile 15 | # 16 | # Author: Mark Crispin 17 | # Networks and Distributed Computing 18 | # Computing & Communications 19 | # University of Washington 20 | # Administration Building, AG-44 21 | # Seattle, WA 98195 22 | # Internet: MRC@CAC.Washington.EDU 23 | # 24 | # Date: 5 April 1993 25 | # Last Edited: 10 September 2007 26 | 27 | 28 | C = ../c-client 29 | CCLIENTLIB = $C/c-client.a 30 | SHELL = /bin/sh 31 | 32 | # Get local definitions from c-client directory 33 | 34 | CC = `cat $C/CCTYPE` 35 | CFLAGS = -I$C `cat $C/CFLAGS` 36 | LDFLAGS = $(CCLIENTLIB) `cat $C/LDFLAGS` 37 | 38 | tmail: $(CCLIENTLIB) tmail.o tquota.o 39 | $(CC) $(CFLAGS) -o tmail tmail.o tquota.o $(LDFLAGS) 40 | 41 | tmail.o: $C/mail.h $C/misc.h $C/osdep.h tquota.h 42 | 43 | tquota.o: tquota.h 44 | 45 | $(CCLIENTLIB): 46 | cd $C;make 47 | 48 | clean: 49 | rm -f *.o tmail 50 | 51 | # A monument to a hack of long ago and far away... 52 | love: 53 | @echo 'not war?' 54 | -------------------------------------------------------------------------------- /src/mtest/Makefile: -------------------------------------------------------------------------------- 1 | # ======================================================================== 2 | # Copyright 1988-2006 University of Washington 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # 11 | # ======================================================================== 12 | 13 | 14 | # Program: MTEST Makefile 15 | # 16 | # Author: Mark Crispin 17 | # Networks and Distributed Computing 18 | # Computing & Communications 19 | # University of Washington 20 | # Administration Building, AG-44 21 | # Seattle, WA 98195 22 | # Internet: MRC@CAC.Washington.EDU 23 | # 24 | # Date: 25 February 1996 25 | # Last Edited: 30 August 2006 26 | 27 | 28 | C = ../c-client 29 | CCLIENTLIB = $C/c-client.a 30 | SHELL = /bin/sh 31 | 32 | # Get local definitions from c-client directory 33 | 34 | CC = `cat $C/CCTYPE` 35 | CFLAGS = -I$C `cat $C/CFLAGS` 36 | LDFLAGS = $(CCLIENTLIB) `cat $C/LDFLAGS` 37 | 38 | all: mtest 39 | 40 | mtest: $(CCLIENTLIB) mtest.o 41 | $(CC) $(CFLAGS) -o mtest mtest.o $(LDFLAGS) 42 | 43 | mtest.o: $C/mail.h $C/misc.h $C/osdep.h $C/rfc822.h $C/smtp.h $C/nntp.h 44 | 45 | $(CCLIENTLIB): 46 | cd $C;make 47 | 48 | clean: 49 | rm -f *.o mtest || true 50 | 51 | # A monument to a hack of long ago and far away... 52 | love: 53 | @echo 'not war?' 54 | -------------------------------------------------------------------------------- /src/osdep/mac/linkage.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2007 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Default driver linkage 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 13 June 1995 26 | * Last Edited: 23 May 2007 27 | */ 28 | 29 | mail_link (&imapdriver); /* link in the imap driver */ 30 | mail_link (&nntpdriver); /* link in the nntp driver */ 31 | mail_link (&pop3driver); /* link in the pop3 driver */ 32 | mail_link (&dummydriver); /* link in the dummy driver */ 33 | auth_link (&auth_ext); /* link in the ext authenticator */ 34 | auth_link (&auth_md5); /* link in the md5 authenticator */ 35 | auth_link (&auth_pla); /* link in the plain authenticator */ 36 | auth_link (&auth_log); /* link in the log authenticator */ 37 | mail_versioncheck (CCLIENTVERSION); /* validate version */ 38 | -------------------------------------------------------------------------------- /src/osdep/vms/linkage.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2007 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Default driver linkage 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 13 June 1995 26 | * Last Edited: 23 May 2007 27 | */ 28 | 29 | mail_link (&imapdriver); /* link in the imap driver */ 30 | mail_link (&nntpdriver); /* link in the nntp driver */ 31 | mail_link (&pop3driver); /* link in the pop3 driver */ 32 | mail_link (&dummydriver); /* link in the dummy driver */ 33 | auth_link (&auth_ext); /* link in the ext authenticator */ 34 | auth_link (&auth_md5); /* link in the md5 authenticator */ 35 | auth_link (&auth_pla); /* link in the plain authenticator */ 36 | auth_link (&auth_log); /* link in the log authenticator */ 37 | mail_versioncheck (CCLIENTVERSION); /* validate version */ 38 | -------------------------------------------------------------------------------- /src/tmail/tquota.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2007 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Mail Delivery Module Quota Hook 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 10 September 2007 26 | * Last Edited: 10 September 2007 27 | */ 28 | 29 | #include "c-client.h" 30 | 31 | /* Site-written routine to validate delivery per quota and policy 32 | * Accepts: stringstruct of message temporary file 33 | * filesystem path 34 | * recipient user id 35 | * return path 36 | * buffer to write error message 37 | * precedence setting 38 | * Returns: T if can deliver, or NIL if quota issue and must bounce 39 | */ 40 | 41 | long tmail_quota (STRING *msg,char *path,uid_t uid,char *tmp,char *sender, 42 | long precedence) 43 | { 44 | return LONGT; /* dummy success return */ 45 | } 46 | -------------------------------------------------------------------------------- /src/osdep/tops-20/linkage.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2007 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Default driver linkage 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 13 June 1995 26 | * Last Edited: 23 May 2007 27 | */ 28 | 29 | mail_link (&imapdriver); /* link in the imap driver */ 30 | mail_link (&nntpdriver); /* link in the nntp driver */ 31 | mail_link (&pop3driver); /* link in the pop3 driver */ 32 | mail_link (&dummydriver); /* link in the dummy driver */ 33 | auth_link (&auth_ext); /* link in the ext authenticator */ 34 | auth_link (&auth_md5); /* link in the md5 authenticator */ 35 | auth_link (&auth_pla); /* link in the plain authenticator */ 36 | auth_link (&auth_log); /* link in the log authenticator */ 37 | mail_versioncheck (CCLIENTVERSION); /* validate version */ 38 | -------------------------------------------------------------------------------- /src/osdep/unix/log_cyg.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Cygwin login 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* Log in 30 | * Accepts: login passwd struct 31 | * argument count 32 | * argument vector 33 | * Returns: T if success, NIL otherwise 34 | */ 35 | 36 | long loginpw (struct passwd *pw,int argc,char *argv[]) 37 | { 38 | uid_t uid = pw->pw_uid; 39 | /* must be same user name as last checkpw() */ 40 | if (!(cyg_user && !strcmp (pw->pw_name,cyg_user))) return NIL; 41 | /* do the ImpersonateLoggedOnUser() */ 42 | cygwin_set_impersonation_token (cyg_hdl); 43 | 44 | return !(setgid (pw->pw_gid) || initgroups (cyg_user,pw->pw_gid) || 45 | setuid (uid)); 46 | } 47 | -------------------------------------------------------------------------------- /src/osdep/unix/os_do4.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- Apollo Domain/OS sr10.4 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 11 May 1989 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #ifndef htons 37 | #include /* needed for htons() prototypes */ 38 | #endif 39 | 40 | extern int daylight; /* local timzone uses daylight savings time */ 41 | extern long altzone; /* seconds west of UTC during daylight time */ 42 | 43 | #include "env_unix.h" 44 | #include "fs.h" 45 | #include "ftl.h" 46 | #include "nl.h" 47 | #include "tcp.h" 48 | -------------------------------------------------------------------------------- /src/osdep/nt/os_nt.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- NT version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 11 April 1989 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #include "tcp_nt.h" /* must be before osdep includes tcp.h */ 30 | #undef ERROR /* quell conflicting def warning */ 31 | #include "mail.h" 32 | #include "osdep.h" 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include "misc.h" 40 | #include "mailfile.h" 41 | 42 | #include "fs_nt.c" 43 | #include "ftl_nt.c" 44 | #include "nl_nt.c" 45 | #include "yunchan.c" 46 | #include "tcp_nt.c" /* must be before env_nt.c */ 47 | #include "env_nt.c" 48 | #include "ssl_nt.c" 49 | -------------------------------------------------------------------------------- /src/osdep/unix/Makefile.gss: -------------------------------------------------------------------------------- 1 | # ======================================================================== 2 | # Copyright 1988-2007 University of Washington 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # 11 | # ======================================================================== 12 | 13 | # Program: GSSAPI makefile 14 | # 15 | # Author: Mark Crispin 16 | # Networks and Distributed Computing 17 | # Computing & Communications 18 | # University of Washington 19 | # Administration Building, AG-44 20 | # Seattle, WA 98195 21 | # Internet: MRC@CAC.Washington.EDU 22 | # 23 | # Date: 11 May 1989 24 | # Last Edited: 4 April 2007 25 | 26 | 27 | # Extended flags needed for additional authenticators. You may need to modify. 28 | 29 | GSSDIR=/usr/local 30 | GSSINCLUDE=$(GSSDIR)/include 31 | GSSLIB=$(GSSDIR)/lib 32 | GSSCFLAGS= -I$(GSSINCLUDE) -DGSS_C_NT_HOSTBASED_SERVICE=gss_nt_service_name -DKRB5_DEPRECATED=1 33 | GSSOLDLDFLAGS= -L$(GSSLIB) -lgssapi_krb5 -lkrb5 -lcrypto -lcom_err 34 | GSSNEWLDFLAGS= -L$(GSSLIB) -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err 35 | 36 | gss: # GSSAPI Kerberos V flags 37 | echo $(GSSCFLAGS) >> OSCFLAGS 38 | sh -c '(test -f $(GSSLIB)/libk5crypto.a) && echo $(GSSNEWLDFLAGS) || echo $(GSSOLDLDFLAGS)' >> LDFLAGS 39 | echo "#include \"kerb_mit.c\"" >> auths.c 40 | -------------------------------------------------------------------------------- /src/osdep/vms/tcp_vms.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: VMS TCP/IP routines 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | /* TCP input buffer */ 31 | 32 | #define BUFLEN 8192 33 | 34 | 35 | /* TCP I/O stream */ 36 | 37 | #define TCPSTREAM struct tcp_stream 38 | TCPSTREAM { 39 | char *host; /* host name */ 40 | unsigned long port; /* port number */ 41 | char *localhost; /* local host name */ 42 | int tcpsi; /* input socket */ 43 | int tcpso; /* output socket */ 44 | int ictr; /* input counter */ 45 | char *iptr; /* input pointer */ 46 | char ibuf[BUFLEN]; /* input buffer */ 47 | }; 48 | 49 | 50 | /* Local function prototypes */ 51 | 52 | long tcp_abort (TCPSTREAM *stream); 53 | -------------------------------------------------------------------------------- /src/osdep/nt/os_old.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- NT version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 11 April 1989 26 | * Last Edited: 21 December 2007 27 | */ 28 | 29 | #include "tcp_nt.h" /* must be before osdep includes tcp.h */ 30 | #undef ERROR /* quell conflicting def warning */ 31 | #include "mail.h" 32 | #include "osdep.h" 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include "misc.h" 40 | #include "mailfile.h" 41 | 42 | #include "fs_nt.c" 43 | #include "ftl_nt.c" 44 | #include "nl_nt.c" 45 | #include "yunchan.c" 46 | #include "tcp_nt.c" /* must be before env_nt.c */ 47 | #include "env_nt.c" 48 | #include "ssl_old.c" 49 | -------------------------------------------------------------------------------- /src/ansilib/strstr.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Substring search 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * 24 | * Date: 11 May 1989 25 | * Last Edited: 30 August 2006 26 | */ 27 | 28 | /* Return pointer to first occurance in string of a substring 29 | * Accepts: source pointer 30 | * substring pointer 31 | * Returns: pointer to substring in source or NIL if not found 32 | */ 33 | 34 | char *strstr (char *cs,char *ct) 35 | { 36 | char *s; 37 | char *t; 38 | while (cs = strchr (cs,*ct)) {/* for each occurance of the first character */ 39 | /* see if remainder of string matches */ 40 | for (s = cs + 1, t = ct + 1; *t && *s == *t; s++, t++); 41 | if (!*t) return cs; /* if ran out of substring then have match */ 42 | cs++; /* try from next character */ 43 | } 44 | return NIL; /* not found */ 45 | } 46 | -------------------------------------------------------------------------------- /src/imapd/imapd.8: -------------------------------------------------------------------------------- 1 | .ig 2 | * ======================================================================== 3 | * Copyright 1988-2006 University of Washington 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * 12 | * ======================================================================== 13 | .. 14 | .TH IMAPD 8 "August 30, 2006" 15 | .UC 5 16 | .SH NAME 17 | IMAPd \- Internet Message Access Protocol server 18 | .SH SYNOPSIS 19 | .B /usr/sbin/imapd 20 | .SH DESCRIPTION 21 | .I imapd 22 | is a server which supports the 23 | .B IMAP4rev1 24 | remote mail access protocol as documented in RFC-3501. 25 | .I imapd 26 | is invoked by the internet server (see 27 | .IR inetd (8)), 28 | normally for requests to connect to the 29 | .B IMAP 30 | port as indicated by the 31 | .I /etc/services 32 | file (see 33 | .IR services (5)). 34 | Normally, this is port 143 for plaintext IMAP and 993 for SSL IMAP. 35 | .PP 36 | This daemons contains CRAM-MD5 support. See the md5.txt documentation 37 | file for additional information. 38 | .PP 39 | .I imapd 40 | can also be accessed via 41 | .IR rsh (1) 42 | by many Unix-based clients. To do this, the 43 | .I imapd 44 | binary must have a link to 45 | .I /etc/rimapd 46 | since this is where this software expects it to be located. 47 | .SH "SEE ALSO" 48 | rsh(1) ipopd(8) 49 | -------------------------------------------------------------------------------- /src/osdep/os2/drivers.cmd: -------------------------------------------------------------------------------- 1 | /* rexx */ 2 | /* ======================================================================== 3 | * Copyright 1988-2006 University of Washington 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * 12 | * ======================================================================== 13 | */ 14 | /* 15 | * Program: Authenticator Linkage Generator for OS/2 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 10 June 1999 26 | * Last Edited: 30 August 2006 27 | */ 28 | '@echo off' 29 | /* Erase old authenticators list */ 30 | 'if exist linkage.h del linkage.h' 31 | 'if exist linkage.c del linkage.c' 32 | parse arg args 33 | n=words(args) 34 | c_file='linkage.c' 35 | h_file='linkage.h' 36 | call stream c_file, 'C', 'open write' 37 | call stream h_file, 'C', 'open write' 38 | do i=1 to n 39 | arg=word(args,i) 40 | call lineout h_file, 'extern DRIVER 'arg'driver;' 41 | call lineout c_file, ' mail_link (&'arg'driver); /* link in the 'arg' driver */' 42 | end 43 | call stream h_file, 'C', 'close' 44 | call stream c_file, 'C', 'close' 45 | exit 0 46 | -------------------------------------------------------------------------------- /src/mtest/makefile.os2: -------------------------------------------------------------------------------- 1 | # ======================================================================== 2 | # Copyright 1988-2006 University of Washington 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # 11 | # ======================================================================== 12 | 13 | 14 | # Program: MTEST Makefile 15 | # 16 | # Author: Mark Crispin 17 | # Networks and Distributed Computing 18 | # Computing & Communications 19 | # University of Washington 20 | # Administration Building, AG-44 21 | # Seattle, WA 98195 22 | # Internet: MRC@CAC.Washington.EDU 23 | # 24 | # Date: 25 February 1996 25 | # Last Edited: 30 August 2006 26 | 27 | # Thanks to Nicholas Paul Sheppard who contributed the original version 28 | 29 | CC = gcc 30 | CFLAGS = -O2 -Zomf 31 | LD = gcc 32 | LDFLAGS = -s -Zomf -Zcrtdll 33 | 34 | C = ..\c-client 35 | CCLIENTLIB = $C\\c-client.lib 36 | LIBS = $(CCLIENTLIB) -l socket 37 | 38 | mtest.exe: $(CCLIENTLIB) mtest.obj 39 | $(LD) $(LDFLAGS) -o $@ $^ $(LIBS) 40 | 41 | $(CCLIENTLIB): 42 | @echo Make c-client first 43 | false 44 | 45 | mtest.obj: mtest.c $C\mail.h $C\smtp.h $C\misc.h $C\osdep.h 46 | $(CC) $(CFLAGS) -I$C -o $@ -c $< 47 | 48 | clean: 49 | if exist *.obj del *.obj 50 | 51 | # A monument to a hack of long ago and far away... 52 | love: 53 | @echo not war? 54 | -------------------------------------------------------------------------------- /src/osdep/unix/gr_wait.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: UNIX Grim PID Reaper -- wait() version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 30 November 1993 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | /* Grim PID reaper 30 | * Accepts: process ID 31 | * kill request flag 32 | * status return value 33 | */ 34 | 35 | void grim_pid_reap_status (int pid,int killreq,void *status) 36 | { 37 | int r; 38 | if (killreq) { 39 | kill (pid,SIGHUP); /* kill if not already dead */ 40 | alarm (10); /* in case we get hosed */ 41 | while (((r = wait (NIL)) != pid) && 42 | ((r > 0) || ((errno != ECHILD) && (errno != EINTR)))); 43 | alarm (0); /* cancel the alarm */ 44 | } 45 | else while (((r = wait (status)) != pid) && ((r > 0) || (errno != ECHILD))); 46 | } 47 | -------------------------------------------------------------------------------- /src/osdep/unix/os_aos.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- AOS version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 11 May 1989 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | 37 | char *getenv (char *name); 38 | char *strstr (char *cs,char *ct); 39 | char *strerror (int n); 40 | void *memmove (void *s,void *ct,size_t n); 41 | unsigned long strtoul (char *s,char **endp,int base); 42 | void *malloc (size_t byteSize); 43 | void free (void *ptr); 44 | void *realloc (void *oldptr,size_t newsize); 45 | 46 | #include "env_unix.h" 47 | #include "fs.h" 48 | #include "ftl.h" 49 | #include "nl.h" 50 | #include "tcp.h" 51 | -------------------------------------------------------------------------------- /src/osdep/wce/tcp_wce.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Winsock TCP/IP routines 16 | * 17 | * Author: Mike Seibel from Unix version by Mark Crispin 18 | * Computing & Communications 19 | * University of Washington 20 | * Administration Building, AG-44 21 | * Seattle, WA 98195 22 | * Internet: MRC@CAC.Washington.EDU 23 | * 24 | * Date: 11 April 1989 25 | * Last Edited: 30 August 2006 26 | */ 27 | 28 | /* TCP input buffer -- must be large enough to prevent overflow */ 29 | 30 | #define BUFLEN 8192 31 | 32 | 33 | /* TCP I/O stream (must be before osdep.h is included) */ 34 | 35 | #define TCPSTREAM struct tcp_stream 36 | TCPSTREAM { 37 | char *host; /* host name */ 38 | char *remotehost; /* remote host name */ 39 | unsigned long port; /* port number */ 40 | char *localhost; /* local host name */ 41 | int tcpsi; /* input tcp socket */ 42 | int tcpso; /* output tcp socket */ 43 | long ictr; /* input counter */ 44 | char *iptr; /* input pointer */ 45 | char ibuf[BUFLEN]; /* input buffer */ 46 | }; 47 | -------------------------------------------------------------------------------- /src/osdep/nt/os_w2k.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- Windows 2000 version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 11 April 1989 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #include "tcp_nt.h" /* must be before osdep includes tcp.h */ 30 | #undef ERROR /* quell conflicting def warning */ 31 | #include "mail.h" 32 | #include "osdep.h" 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include "misc.h" 40 | #include "mailfile.h" 41 | 42 | #include "fs_nt.c" 43 | #include "ftl_nt.c" 44 | #include "nl_nt.c" 45 | #include "yunchan.c" 46 | #include "kerb_w2k.c" 47 | #include "tcp_nt.c" /* must be before env_nt.c */ 48 | #include "env_nt.c" 49 | #include "ssl_w2k.c" 50 | -------------------------------------------------------------------------------- /src/osdep/mac/tcp_mac.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Macintosh TCP/IP routines 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 26 January 1992 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | 30 | /* TCP input buffer */ 31 | 32 | #define BUFLEN (size_t) 8192 /* TCP input buffer */ 33 | 34 | 35 | /* TCP I/O stream */ 36 | 37 | #define TCPSTREAM struct tcp_stream 38 | TCPSTREAM { 39 | char *host; /* host name */ 40 | unsigned long port; /* port number */ 41 | char *localhost; /* local host name */ 42 | struct TCPiopb pb; /* MacTCP parameter block */ 43 | long ictr; /* input counter */ 44 | char *iptr; /* input pointer */ 45 | char ibuf[BUFLEN]; /* input buffer */ 46 | }; 47 | 48 | extern ResultUPP tcp_dns_upp; 49 | pascal void tcp_dns_result (struct hostInfo *hostInfoPtr,char *userDataPtr); 50 | -------------------------------------------------------------------------------- /src/osdep/unix/os_ult.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2007 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- Ultrix version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * 24 | * Date: 11 May 1989 25 | * Last Edited: 16 August 2007 26 | */ 27 | 28 | #include "tcp_unix.h" /* must be before osdep includes tcp.h */ 29 | #include "mail.h" 30 | #include "osdep.h" 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | extern int errno; /* just in case */ 41 | #include 42 | #include "misc.h" 43 | 44 | 45 | #include "fs_unix.c" 46 | #include "ftl_unix.c" 47 | #include "nl_unix.c" 48 | #include "env_unix.c" 49 | #define fork vfork 50 | #include "tcp_unix.c" 51 | #include "gr_waitp.c" 52 | #include "tz_bsd.c" 53 | -------------------------------------------------------------------------------- /src/mtest/makefile.w2k: -------------------------------------------------------------------------------- 1 | # ======================================================================== 2 | # Copyright 1988-2006 University of Washington 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # 11 | # ======================================================================== 12 | 13 | 14 | # Program: MTEST Makefile for Windows 2000/XP 15 | # 16 | # Author: Mark Crispin 17 | # Networks and Distributed Computing 18 | # Computing & Communications 19 | # University of Washington 20 | # Administration Building, AG-44 21 | # Seattle, WA 98195 22 | # Internet: MRC@CAC.Washington.EDU 23 | # 24 | # Date: 25 February 1996 25 | # Last Edited: 30 August 2006 26 | 27 | 28 | C = ..\c-client 29 | CCLIENTLIB = $C\cclient.lib 30 | LIBS = $(CCLIENTLIB) ws2_32.lib winmm.lib advapi32.lib secur32.lib crypt32.lib 31 | OSCOMPAT = /DWIN32 32 | VSCOMPAT = /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE 33 | CFLAGS= -I$C /MT /W3 $(OSCOMPAT) $(VSCOMPAT) -nologo $(EXTRACFLAGS) 34 | 35 | mtest: $(CCLIENTLIB) mtest.obj 36 | LINK /NOLOGO mtest.obj $(LIBS) 37 | 38 | mtest.obj: $C\mail.h $C\smtp.h $C\misc.h $C\osdep.h mtest.c 39 | 40 | $(CCLIENTLIB): 41 | @echo Make c-client first 42 | false 43 | 44 | clean: 45 | del *.obj *.exe *.lib *.exp || rem 46 | 47 | # A monument to a hack of long ago and far away... 48 | love: 49 | @echo not war? 50 | -------------------------------------------------------------------------------- /src/osdep/unix/os_a52.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- AIX on RS6000 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include /* for struct tm */ 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | 41 | 42 | #define setpgrp(a,b) Setpgrp(a,b) 43 | int Setpgrp (int pid,int gid); 44 | 45 | #define utime portable_utime 46 | int portable_utime (char *file,time_t timep[2]); 47 | 48 | #include "env_unix.h" 49 | #include "fs.h" 50 | #include "ftl.h" 51 | #include "nl.h" 52 | #include "tcp.h" 53 | #include "flocksim.h" 54 | -------------------------------------------------------------------------------- /src/osdep/unix/os_sun.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- SUN-OS version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 11 May 1989 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | 38 | #define strstr Strstr /* override system definition */ 39 | 40 | #include "env_unix.h" 41 | #include "fs.h" 42 | #include "ftl.h" 43 | #include "nl.h" 44 | #include "tcp.h" 45 | 46 | char *Strstr (char *cs,char *ct); 47 | char *strerror (int n); 48 | unsigned long strtoul (char *s,char **endp,int base); 49 | #define memcpy memmove 50 | void *memmove (void *s,void *ct,size_t n); 51 | void *memset (void *s,int c,size_t n); 52 | -------------------------------------------------------------------------------- /makefile.os2: -------------------------------------------------------------------------------- 1 | # ======================================================================== 2 | # Copyright 1988-2006 University of Washington 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # 11 | # ======================================================================== 12 | 13 | # Program: IMAP Toolkit Makefile 14 | # 15 | # Author: Mark Crispin 16 | # Networks and Distributed Computing 17 | # Computing & Communications 18 | # University of Washington 19 | # Administration Building, AG-44 20 | # Seattle, WA 98195 21 | # Internet: MRC@CAC.Washington.EDU 22 | # 23 | # Date: 7 December 1989 24 | # Last Edited: 30 August 2006 25 | 26 | 27 | COPY=copy 28 | MAKE=make -f makefile.os2 29 | MKDIR=md 30 | RD=rm -rf 31 | 32 | 33 | # Make the IMAP Toolkit 34 | 35 | build: c-client mtest mailutil 36 | (cd c-client & $(MAKE)) 37 | (cd mtest & $(MAKE)) 38 | (cd mailutil & $(MAKE)) 39 | 40 | c-client: 41 | $(MKDIR) c-client 42 | $(COPY) src\c-client\\* c-client 43 | $(COPY) src\charset\\* c-client 44 | $(COPY) src\osdep\os2\\* c-client 45 | 46 | mtest: 47 | $(MKDIR) mtest 48 | $(COPY) src\mtest\\* mtest 49 | 50 | mailutil: 51 | $(MKDIR) mailutil 52 | $(COPY) src\mailutil\\* mailutil 53 | 54 | clean: 55 | $(RD) c-client mtest mailutil 56 | 57 | # A monument to a hack of long ago and far away... 58 | love: 59 | @echo 'not war?' 60 | -------------------------------------------------------------------------------- /src/mtest/makefile.nt: -------------------------------------------------------------------------------- 1 | # ======================================================================== 2 | # Copyright 1988-2006 University of Washington 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # 11 | # ======================================================================== 12 | 13 | 14 | # Program: MTEST Makefile for Windows 9x and Windows NT 15 | # 16 | # Author: Mark Crispin 17 | # Networks and Distributed Computing 18 | # Computing & Communications 19 | # University of Washington 20 | # Administration Building, AG-44 21 | # Seattle, WA 98195 22 | # Internet: MRC@CAC.Washington.EDU 23 | # 24 | # Date: 25 February 1996 25 | # Last Edited: 30 August 2006 26 | 27 | 28 | C = ..\c-client 29 | CCLIENTLIB = $C\cclient.lib 30 | LIBS = $(CCLIENTLIB) ws2_32.lib winmm.lib advapi32.lib 31 | OSCOMPAT = /DWIN32 /D_WIN32_WINNT=0x0400 32 | VSCOMPAT = /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE 33 | CFLAGS= -I$C /MT /W3 $(OSCOMPAT) $(VSCOMPAT) -nologo $(EXTRACFLAGS) 34 | 35 | mtest: $(CCLIENTLIB) mtest.obj 36 | LINK /NOLOGO mtest.obj $(LIBS) 37 | 38 | mtest.obj: $C\mail.h $C\smtp.h $C\misc.h $C\osdep.h mtest.c 39 | 40 | $(CCLIENTLIB): 41 | @echo Make c-client first 42 | false 43 | 44 | clean: 45 | del *.obj *.exe *.lib *.exp || rem 46 | 47 | # A monument to a hack of long ago and far away... 48 | love: 49 | @echo not war? 50 | -------------------------------------------------------------------------------- /src/osdep/unix/os_osx.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- Mac OS X version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 26 October 2007 27 | */ 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | 39 | /* Mac OS X gets this wrong as of Leopard */ 40 | 41 | #define setpgrp setpgid 42 | 43 | 44 | #define unix 1 45 | 46 | /* Mac OS X security framework also has checkpw, and this causes 47 | * multiple-definition problems when building Alpine. 48 | */ 49 | 50 | #define checkpw Checkpw 51 | 52 | #include "env_unix.h" 53 | #include "fs.h" 54 | #include "ftl.h" 55 | #include "nl.h" 56 | #include "tcp.h" 57 | -------------------------------------------------------------------------------- /src/osdep/unix/os_mct.c: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- MachTen version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 1 August 1988 26 | * Last Edited: 7 December 2006 27 | */ 28 | 29 | #include "tcp_unix.h" /* must be before osdep includes tcp.h */ 30 | #include "mail.h" 31 | #include "osdep.h" 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | extern int errno; /* just in case */ 42 | #include 43 | #include "misc.h" 44 | 45 | 46 | #include "fs_unix.c" 47 | #include "ftl_unix.c" 48 | #include "nl_unix.c" 49 | #include "env_unix.c" 50 | #include "tcp_unix.c" 51 | #include "gr_wait4.c" 52 | #include "tz_bsd.c" 53 | -------------------------------------------------------------------------------- /src/osdep/wce/os_wce.h: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Copyright 1988-2006 University of Washington 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * 11 | * ======================================================================== 12 | */ 13 | 14 | /* 15 | * Program: Operating-system dependent routines -- WCE version 16 | * 17 | * Author: Mark Crispin 18 | * Networks and Distributed Computing 19 | * Computing & Communications 20 | * University of Washington 21 | * Administration Building, AG-44 22 | * Seattle, WA 98195 23 | * Internet: MRC@CAC.Washington.EDU 24 | * 25 | * Date: 11 May 1989 26 | * Last Edited: 30 August 2006 27 | */ 28 | 29 | #include 30 | #include 31 | #include 32 | /* missing in string.h */ 33 | _CRTIMP char * __cdecl strpbrk (const char *, const char *); 34 | _CRTIMP char * __cdecl strrchr(const char *, int); 35 | #include 36 | #undef ERROR 37 | #include 38 | #undef ERROR 39 | #define ERROR (long) 2 /* must match mail.h */ 40 | #include 41 | #include 42 | 43 | #define gethostid clock 44 | #define WSA_VERSION ((1 << 8) | 1) 45 | 46 | #include "env_wce.h" 47 | #include "fs.h" 48 | #include "ftl.h" 49 | #include "nl.h" 50 | #include "tcp.h" 51 | 52 | #undef noErr 53 | #undef MAC 54 | -------------------------------------------------------------------------------- /src/mailutil/makefile.w2k: -------------------------------------------------------------------------------- 1 | # ======================================================================== 2 | # Copyright 1988-2006 University of Washington 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # 11 | # ======================================================================== 12 | 13 | 14 | # Program: MAILUTIL Makefile for Windows 2000/XP 15 | # 16 | # Author: Mark Crispin 17 | # Networks and Distributed Computing 18 | # Computing & Communications 19 | # University of Washington 20 | # Administration Building, AG-44 21 | # Seattle, WA 98195 22 | # Internet: MRC@CAC.Washington.EDU 23 | # 24 | # Date: 25 February 1996 25 | # Last Edited: 30 August 2006 26 | 27 | 28 | C = ..\c-client 29 | CCLIENTLIB = $C\cclient.lib 30 | LIBS = $(CCLIENTLIB) ws2_32.lib winmm.lib advapi32.lib secur32.lib crypt32.lib 31 | OSCOMPAT = /DWIN32 32 | VSCOMPAT = /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE 33 | CFLAGS= -I$C /MT /W3 $(OSCOMPAT) $(VSCOMPAT) -nologo $(EXTRACFLAGS) 34 | 35 | mailutil: $(CCLIENTLIB) mailutil.obj 36 | LINK /NOLOGO mailutil.obj $(LIBS) 37 | 38 | mailutil.obj: $C\mail.h $C\smtp.h $C\misc.h $C\osdep.h mailutil.c 39 | 40 | $(CCLIENTLIB): 41 | @echo Make c-client first 42 | false 43 | 44 | clean: 45 | del *.obj *.exe *.lib *.exp || rem 46 | 47 | # A monument to a hack of long ago and far away... 48 | love: 49 | @echo not war? 50 | --------------------------------------------------------------------------------