*** imapd.c~ Mon Oct 18 15:40:33 1999 --- imapd.c Mon Oct 18 15:49:10 1999 *************** *** 278,283 **** --- 278,286 ---- mailbox_close(imapd_mailbox); } prot_flush(imapd_out); + #ifdef DRAC_AUTH + (void)dracdisc((char **)NULL); + #endif /* DRAC_AUTH */ exit(code); } *************** *** 334,339 **** --- 337,350 ---- 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) { *************** *** 972,977 **** --- 983,996 ---- 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()); *************** *** 1103,1108 **** --- 1122,1135 ---- else { mech->free_state(state); } + + #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, *************** *** 1133,1138 **** --- 1160,1173 ---- } prot_printf(imapd_out, "%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 */ + } /* *************** *** 1436,1441 **** --- 1471,1484 ---- 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~ Mon Oct 18 15:49:23 1999 --- pop3d.c Mon Oct 18 15:51:17 1999 *************** *** 876,881 **** --- 876,889 ---- 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~ Mon Oct 18 15:53:35 1999 --- Makefile Mon Oct 18 15:53:37 1999 *************** *** 48,60 **** 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_DB_185_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_MEMMOVE=1 -DHAVE_STRCASECMP=1 -DHAVE_FTRUNCATE=1 -DHAVE_STRERROR=1 -DHAVE_DIRENT_H=1 -DHAVE_VPRINTF=1 -DHAS_STRERROR=1 -DSPT_TYPE=SPT_BUILTIN -DHAVE_LIBCRYPT=1 -DHAVE_LIBDB=1 -DHAVE_LIBCRYPT=1 -DHAVE_LIBKRB=1 -DHAVE_SASL_KRB=1 -DHAVE_GETDTABLESIZE=1 -DENABLE_X_NETSCAPE_HACK=1 CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)/../lib -I./../et -I/usr/local/include -I/usr/include ! LIBS = -lkrb -lcrypt -lcrypt -lutil -ldes ../et/libcom_err.a DEPLIBS = ../lib/libcyrus.a CFLAGS = -g -O2 ! LDFLAGS = -L/usr/lib -R/usr/lib -L/usr/local/lib -R/usr/local/lib -g -O2 SHELL = /bin/sh MAKEDEPEND = makedepend --- 48,60 ---- 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_DB_185_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_MEMMOVE=1 -DHAVE_STRCASECMP=1 -DHAVE_FTRUNCATE=1 -DHAVE_STRERROR=1 -DHAVE_DIRENT_H=1 -DHAVE_VPRINTF=1 -DHAS_STRERROR=1 -DSPT_TYPE=SPT_BUILTIN -DHAVE_LIBCRYPT=1 -DHAVE_LIBDB=1 -DHAVE_LIBCRYPT=1 -DHAVE_LIBKRB=1 -DHAVE_SASL_KRB=1 -DHAVE_GETDTABLESIZE=1 -DENABLE_X_NETSCAPE_HACK=1 -DDRAC_AUTH CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)/../lib -I./../et -I/usr/local/include -I/usr/include ! LIBS = -ldrac -lkrb -lcrypt -lcrypt -lutil -ldes ../et/libcom_err.a DEPLIBS = ../lib/libcyrus.a CFLAGS = -g -O2 ! LDFLAGS = -L/usr/local/src/drac -L/usr/lib -R/usr/lib -L/usr/local/lib -R/usr/local/lib -g -O2 SHELL = /bin/sh MAKEDEPEND = makedepend