*** imapd.c~ Tue Nov 2 21:31:12 1999 --- imapd.c Tue Nov 2 21:48:22 1999 *************** *** 527,532 **** --- 527,535 ---- mailbox_close(imapd_mailbox); } prot_flush(imapd_out); + #ifdef DRAC_AUTH + (void)dracdisc((char **)NULL); + #endif /* DRAC_AUTH */ exit(code); } *************** *** 577,582 **** --- 580,593 ---- close(fd); } + #ifdef DRAC_AUTH + { + char *err; + if (dracconn("localhost", &err) != 0) + syslog(LOG_NOTICE, "dracconn: %s", err); + } + #endif /* DRAC_AUTH */ + for (;;) { if (! imapd_userisadmin && (fd = open(shutdownfilename, O_RDONLY, 0)) != -1) { *************** *** 1223,1228 **** --- 1234,1247 ---- if (!reply) reply = "User logged in"; + #ifdef DRAC_AUTH + { + char *err; + if (dracsend(imapd_remoteaddr.sin_addr.s_addr, &err) != 0) + syslog(LOG_NOTICE, "dracsend: %s", err); + } + #endif /* DRAC_AUTH */ + /* Create telemetry log */ sprintf(buf, "%s%s%s/%u", config_dir, FNAME_LOGDIR, imapd_userid, getpid()); *************** *** 1354,1359 **** --- 1373,1386 ---- prot_setsasl(imapd_in, imapd_saslconn); prot_setsasl(imapd_out, imapd_saslconn); + #ifdef DRAC_AUTH + { + char *err; + if (dracsend(imapd_remoteaddr.sin_addr.s_addr, &err) != 0) + syslog(LOG_NOTICE, "dracsend: %s", err); + } + #endif /* DRAC_AUTH */ + /* Create telemetry log */ sprintf(buf, "%s%s%s/%u", config_dir, FNAME_LOGDIR, imapd_userid, getpid()); *************** *** 1420,1425 **** --- 1447,1460 ---- #endif prot_printf(imapd_out, "\r\n%s OK %s\r\n", tag, error_message(IMAP_OK_COMPLETED)); + #ifdef DRAC_AUTH + { + char *err; + if (dracsend(imapd_remoteaddr.sin_addr.s_addr, &err) != 0) + syslog(LOG_NOTICE, "dracsend: %s", err); + } + #endif /* DRAC_AUTH */ + } /* *************** *** 1699,1704 **** --- 1734,1748 ---- proc_register("imapd", imapd_clienthost, imapd_userid, mailboxname); syslog(LOG_DEBUG, "open: user %s opened %s", imapd_userid, name); + + #ifdef DRAC_AUTH + { + char *err; + if (dracsend(imapd_remoteaddr.sin_addr.s_addr, &err) != 0) + syslog(LOG_NOTICE, "dracsend: %s", err); + } + #endif /* DRAC_AUTH */ + } /* --- pop3d.c~ Tue Nov 2 21:31:21 1999 +++ pop3d.c Tue Nov 2 21:50:30 1999 @@ -978,6 +978,14 @@ popd_mailbox = &mboxstruct; proc_register("pop3d", popd_clienthost, popd_userid, popd_mailbox->name); +#ifdef DRAC_AUTH + { + char *err; + if (dracauth("localhost", popd_remoteaddr.sin_addr.s_addr, &err) != 0) + syslog(LOG_NOTICE, "dracauth: %s", err); + } + #endif /* DRAC_AUTH */ + /* Create telemetry log */ sprintf(buf, "%s%s%s/%u", config_dir, FNAME_LOGDIR, popd_userid, getpid()); --- Makefile~ Tue Nov 2 21:32:53 1999 +++ Makefile Tue Nov 2 21:57:57 1999 @@ -45,16 +45,16 @@ CYRUS_USER=cyrus CYRUS_GROUP=cyrus -DEFS = -DCYRUS_USER=\"cyrus\" -DSTATEDIR=\"/var\" -DHAVE_LONG_FILE_NAMES=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_SELECT_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_MEMMOVE=1 -DHAVE_STRCASECMP=1 -DHAVE_FTRUNCATE=1 -DHAVE_STRERROR=1 -DHAVE_DIRENT_H=1 -DHAVE_TM_ZONE=1 -DHAVE_VPRINTF=1 -DUSE_SIEVE=1 -DHAVE_LIBFL=1 -DHAS_STRERROR=1 -DSPT_TYPE=SPT_BUILTIN -DHAVE_LIBDB=1 -DHAVE_GETDTABLESIZE=1 -DENABLE_X_NETSCAPE_HACK=1 -DHAVE_LIBSASL=1 +DEFS = -DCYRUS_USER=\"cyrus\" -DSTATEDIR=\"/var\" -DHAVE_LONG_FILE_NAMES=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_SELECT_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_MEMMOVE=1 -DHAVE_STRCASECMP=1 -DHAVE_FTRUNCATE=1 -DHAVE_STRERROR=1 -DHAVE_DIRENT_H=1 -DHAVE_TM_ZONE=1 -DHAVE_VPRINTF=1 -DUSE_SIEVE=1 -DHAVE_LIBFL=1 -DHAS_STRERROR=1 -DSPT_TYPE=SPT_BUILTIN -DHAVE_LIBDB=1 -DHAVE_GETDTABLESIZE=1 -DENABLE_X_NETSCAPE_HACK=1 -DHAVE_LIBSASL=1 -DDRAC_AUTH CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)/../lib -I./../et -I$(srcdir)/../sieve -I/usr/local/include IMAP_LIBS = -lsasl -lfl -lutil SIEVE_LIBS = ../sieve/libsieve.a IMAP_COM_ERR_LIBS = ../et/libcom_err.a -LIBS = $(IMAP_LIBS) $(IMAP_COM_ERR_LIBS) +LIBS = $(IMAP_LIBS) $(IMAP_COM_ERR_LIBS) -ldrac DEPLIBS = ../lib/libcyrus.a CFLAGS = -g -O2 -LDFLAGS = -L/usr/local/lib -R/usr/local/lib -g -O2 +LDFLAGS = -L/usr/local/lib -R/usr/local/lib -L/usr/local/src/drac -g -O2 SHELL = /bin/sh MAKEDEPEND = makedepend