From jrj@gandalf.cc.purdue.edu Tue Aug 6 11:54:57 2002 Received: from gandalf.cc.purdue.edu (root@gandalf.cc.purdue.edu [128.210.135.25]) by underdog.stansell.org (8.12.4/8.12.4) with ESMTP id g76IsuRc028824 for ; Tue, 6 Aug 2002 11:54:57 -0700 (PDT) Received: from gandalf.cc.purdue.edu (jrj@localhost [127.0.0.1]) by gandalf.cc.purdue.edu (8.12.1/8.12.1) with ESMTP id g76Issc4022347 for ; Tue, 6 Aug 2002 13:54:55 -0500 (EST) Message-Id: <200208061854.g76Issc4022347@gandalf.cc.purdue.edu> To: users@conserver.com Subject: Patch for Solaris BSM support Reply-to: jrj@purdue.edu MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <22342.1028660050.0@gandalf.cc.purdue.edu> Date: Tue, 06 Aug 2002 13:54:54 -0500 From: "John R. Jackson" Sender: users-admin@conserver.com Errors-To: users-admin@conserver.com X-BeenThere: users@conserver.com X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Conserver Users List-Unsubscribe: , List-Archive: ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <22342.1028660050.1@gandalf.cc.purdue.edu> If you run Solaris and enable BSM (kernel audit logging), magic has to happen any time a process "logs in". Examples include /bin/login, telnetd, sshd, etc. Autologin also falls in this category, and the following patch makes it do the right thing. For more information, see: ftp://gandalf.cc.purdue.edu/pub/ssh/openssh-vs-bsm.tgz John R. Jackson, Technical Software Specialist, jrj@purdue.edu ------- =_aaaaaaaaaa0 Content-Type: application/octet-stream; type="patch"; name="autologin-bsm.diff" Content-ID: <22342.1028660050.2@gandalf.cc.purdue.edu> Content-Description: autologin-bsm.diff Index: configure.in --- configure.in.000 2002-03-25 18:34:53.000000000 -0500 +++ configure.in 2002-08-05 18:26:16.473019000 -0500 @@ -291,6 +291,20 @@ AC_CHECK_FUNCS(getopt strerror getrlimit getsid setsid getuserattr setgroups tcgetpgrp tcsetpgrp tcgetattr tcsetattr tcsendbreak setpgrp getutent setttyent getspnam setlinebuf setvbuf ptsname grantpt unlockpt flock sigaction setsockopt getdtablesize putenv memset memcpy memcmp sysconf getpassphrase getlogin) AC_FUNC_SETPGRP +dnl Checks for libbsm functions +AC_CHECK_HEADERS(bsm/audit.h) +AC_CHECK_LIB(bsm, getaudit) +AC_CHECK_FUNC(getaudit, AC_DEFINE(HAVE_GETAUDIT, + 1, + [Define if libbsm has `getaudit'.] + ) + ) +AC_CHECK_FUNC(getaudit_addr, AC_DEFINE(HAVE_GETAUDIT_ADDR, + 1, + [Define if libbsm has `getaudit_addr'.] + ) + ) + dnl ### Create output files. ####################################### AC_SUBST(LIBOBJS) Index: autologin/autologin.c --- autologin/autologin.c~ 2002-02-12 23:26:03.000000000 -0500 +++ autologin/autologin.c 2002-08-06 13:12:58.793784000 -0500 @@ -19,6 +19,29 @@ #include #include #include +#if defined(HAVE_BSM_AUDIT_H) && defined(HAVE_LIBBSM) + +/* + * There is no official registry of non-vendor audit event numbers, + * but the following should be OK. + * + * You need to add a line by hand to /etc/security/audit_event to make + * praudit(1) look pretty: + * + * 32900:AUE_autologin:autologin:lo + * + * If you have to change the value for AUE_autologin, you'll also need + * to change the /etc/security/audit_event line. + */ + +#define AUE_autologin 32900 + +#include +#include +#include +#include +#include +#endif #include @@ -96,8 +119,18 @@ # endif # endif #endif +#if defined(HAVE_BSM_AUDIT_H) && defined(HAVE_LIBBSM) + char my_hostname[MAXHOSTNAMELEN]; +#endif +#if defined(HAVE_BSM_AUDIT_H) && defined(HAVE_LIBBSM) + if (0 != gethostname(my_hostname, sizeof(my_hostname))) { + (void) fprintf(stderr, "%s: gethostname: %s\n", strerror(errno)); + exit(1); + /* NOTREACHED */ + } +#endif if ((char *)0 != pcCommand) { if ((char *)0 == (pcCmd = (char *)malloc(strlen(pcCommand) + 4))) { (void) fprintf(stderr, "%s: malloc: %s\n", progname, strerror(errno)); @@ -127,6 +160,7 @@ } wUid = pwd->pw_uid; wGid = pwd->pw_gid; + (void)endpwent(); #ifdef HAVE_GETUSERATTR /* getuserattr() returns a funny list of groups: * "grp1\0grp2\0grp3\0\0" @@ -141,6 +175,7 @@ } } #endif /* HAVE_GETUSERATTR */ + (void)endgrent(); if ((char *)0 != pcTty) { if ( '/' == *pcTty ) { @@ -199,6 +234,100 @@ } } +#if defined(HAVE_BSM_AUDIT_H) && defined(HAVE_LIBBSM) + if (!cannot_audit(0)) { +# if defined(HAVE_GETAUDIT_ADDR) + struct auditinfo_addr audit_info; +# else + struct auditinfo audit_info; +# endif + au_mask_t audit_mask; +# if !defined(HAVE_GETAUDIT_ADDR) + struct hostent *hp; +# endif + int iAuditFile; + int fShowEvent = 1; + token_t *ptAuditToken; + + (void)memset(&audit_info, 0, sizeof(audit_info)); + audit_info.ai_auid = wUid; + audit_info.ai_asid = getpid(); + audit_mask.am_success = audit_mask.am_failure = 0; + (void) au_user_mask(pcLogin, &audit_mask); + audit_info.ai_mask.am_success = audit_mask.am_success; + audit_info.ai_mask.am_failure = audit_mask.am_failure; +# if defined(HAVE_GETAUDIT_ADDR) + (void)aug_get_machine(my_hostname, + &audit_info.ai_termid.at_addr[0], + &audit_info.ai_termid.at_type); +# else + if ((char *)0 != (hp = gethostbyname(my_hostname)) + && AF_INET == hp->h_addrtype) { + (void)memcpy(&audit_info.ai_termid.machine, + hp->h_addr, + sizeof(audit_info.ai_termid.machine)); + } +# endif +# if defined(HAVE_GETAUDIT_ADDR) + if (0 > setaudit_addr(&audit_info, sizeof(audit_info))) +# else + if (0 > setaudit(&audit_info)) +# endif + { + fprintf(stderr, "%s: setaudit failed: %s\n", + progname, + strerror(errno)); + fShowEvent = 0; + } + if (fShowEvent) { + fShowEvent = au_preselect(AUE_autologin, + &audit_mask, + AU_PRS_SUCCESS, + AU_PRS_REREAD); + } + if (fShowEvent) { + iAuditFile = au_open(); +# if defined(HAVE_GETAUDIT_ADDR) + ptAuditToken = au_to_subject_ex(wUid, + wUid, + wGid, + wUid, + wGid, + audit_info.ai_asid, + audit_info.ai_asid, + &audit_info.ai_termid), +# else + ptAuditToken = au_to_subject(wUid, + wUid, + wGid, + wUid, + wGid, + audit_info.ai_asid, + audit_info.ai_asid, + &audit_info.ai_termid), +# endif + (void)au_write(iAuditFile, ptAuditToken); + ptAuditToken = au_to_text(gettext("successful login")); + (void)au_write(iAuditFile, ptAuditToken); + if ((char *)0 != pcCmd) { + ptAuditToken = au_to_text(pcCmd); + (void)au_write(iAuditFile, ptAuditToken); + } +# if defined(HAVE_GETAUDIT_ADDR) + ptAuditToken = au_to_return32(0, 0); +# else + ptAuditToken = au_to_return(0, 0); +# endif + (void)au_write(iAuditFile, ptAuditToken); + if(0 > au_close(iAuditFile, AU_TO_WRITE, AUE_autologin)) { + fprintf(stderr, "%s: audit write failed", + progname, + strerror(errno)); + } + } + } +#endif + /* Open the TTY for stdin, stdout and stderr */ if ((char *)0 != pcDevTty) { ------- =_aaaaaaaaaa0-- From jrj@gandalf.cc.purdue.edu Tue Aug 6 12:04:06 2002 Received: from gandalf.cc.purdue.edu (root@gandalf.cc.purdue.edu [128.210.135.25]) by underdog.stansell.org (8.12.4/8.12.4) with ESMTP id g76J45Rc028948 for ; Tue, 6 Aug 2002 12:04:06 -0700 (PDT) Received: from gandalf.cc.purdue.edu (jrj@localhost [127.0.0.1]) by gandalf.cc.purdue.edu (8.12.1/8.12.1) with ESMTP id g76J44c4022566 for ; Tue, 6 Aug 2002 14:04:04 -0500 (EST) Message-Id: <200208061904.g76J44c4022566@gandalf.cc.purdue.edu> To: users@conserver.com Subject: Compiler warnings with 7.2.2 Reply-to: jrj@purdue.edu MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <22500.1028660563.0@gandalf.cc.purdue.edu> Date: Tue, 06 Aug 2002 14:04:04 -0500 From: "John R. Jackson" Sender: users-admin@conserver.com Errors-To: users-admin@conserver.com X-BeenThere: users@conserver.com X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Conserver Users List-Unsubscribe: , List-Archive: ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <22500.1028660563.1@gandalf.cc.purdue.edu> The following 7.2.2 patch does three things: * Cleans up several compiler warnings related to unsigned char pointers being passed to routines wanting "normal" char pointers. * Cleans up two bad fileOpenFD result tests (should now be comparing against (CONSFILE *)0, not < 0). * Enhances the config file parsing so a ':' may appear on the right hand side of one of the variable assignment type lines. For instance, the current code would not handle this: LOGFILE=C:\Conserver\Logs Surely that should be considered a serious deficiency :-) :-) :-). John R. Jackson, Technical Software Specialist, jrj@purdue.edu ------- =_aaaaaaaaaa0 Content-Type: application/octet-stream; type="patch"; name="cleanup-7.2.2.diff" Content-ID: <22500.1028660563.2@gandalf.cc.purdue.edu> Content-Description: cleanup-7.2.2.diff Index: conserver/readcfg.c --- conserver/readcfg.c~ 2002-03-25 20:27:44.000000000 -0500 +++ conserver/readcfg.c 2002-08-06 13:31:20.226410000 -0500 @@ -337,16 +337,17 @@ } iLine = 0; - while ((acIn = readLine(fp, &acInSave, &iLine)) != (unsigned char *)0) { + while ((acIn = (unsigned char *)readLine(fp, &acInSave, &iLine)) != (unsigned char *)0) { char *pcLine, *pcMode, *pcLog, *pcRem, *pcStart, *pcMark, *pcBreak; + char *pcColon; - acStart = pruneSpace(acIn); + acStart = pruneSpace((char *)acIn); if ('%' == acStart[0] && '%' == acStart[1] && '\000' == acStart[2]) { break; } - if ((char *)0 == strchr(acStart, ':') && - (char *)0 != (pcLine = strchr(acStart, '='))) { + if ((char *)0 != (pcLine = strchr(acStart, '=')) && + ((char *)0 == (pcColon = strchr(acStart, ':')) || pcColon > pcLine)) { *pcLine++ = '\000'; acStart = pruneSpace(acStart); pcLine = pruneSpace(pcLine); @@ -896,12 +897,12 @@ pACList = (ACCESS *) 0; ppAC = &pACList; - while ((acIn = readLine(fp, &acInSave, &iLine)) != (unsigned char *)0) { + while ((acIn = (unsigned char *)readLine(fp, &acInSave, &iLine)) != (unsigned char *)0) { char *pcMach, *pcNext, *pcMem; char cType; int iLen; - acStart = pruneSpace(acIn); + acStart = pruneSpace((char *)acIn); if ('%' == acStart[0] && '%' == acStart[1] && '\000' == acStart[2]) { break; Index: conserver/group.c --- conserver/group.c.000 2002-06-05 17:05:05.000000000 -0500 +++ conserver/group.c 2002-08-06 13:36:39.777202000 -0500 @@ -1298,8 +1298,8 @@ simpleSignal(SIGCHLD, FlagReapVirt); simpleSignal(SIGINT, FlagGoAwayAlso); - sprintf(acOut, "ctl_%d", pGE->port); - buildMyString(acOut, &pGE->pCEctl->server); + sprintf((char *)acOut, "ctl_%d", pGE->port); + buildMyString((char *)acOut, &pGE->pCEctl->server); pGE->pCEctl->iend = 0; buildMyString((char *)0, &pGE->pCEctl->lfile); buildMyString("/dev/null", &pGE->pCEctl->lfile); @@ -1506,7 +1506,7 @@ /* log it and write to all connections on this server */ if (!pCEServing->nolog) { - (void)writeLog(pCEServing, acIn, nr); + (void)writeLog(pCEServing, (char *)acIn, nr); } /* output all console info nobody is attached @@ -1537,7 +1537,7 @@ for (pCL = pCEServing->pCLon; (CONSCLIENT *) 0 != pCL; pCL = pCL->pCLnext) { if (pCL->fcon) { - (void)fileWrite(pCL->fd, acIn, nr); + (void)fileWrite(pCL->fd, (char *)acIn, nr); } } } @@ -1636,7 +1636,7 @@ buildMyStringChar(acIn[i], &pCLServing->msg); if (pGE->pCEctl != pCEServing) - fileWrite(pCLServing->fd, &acIn[i], 1); + fileWrite(pCLServing->fd, (char *)&acIn[i], 1); } else if ((acIn[i] == '\b' || acIn[i] == 0x7f) && pCLServing->msg.used > 1) { if (pCLServing->msg. @@ -1878,10 +1878,10 @@ if (acIn[i] >= '0' && acIn[i] <= '7') { buildMyStringChar(acIn[i], &pCLServing->accmd); if (pCLServing->accmd.used < 4) { - fileWrite(pCLServing->fd, &acIn[i], 1); + fileWrite(pCLServing->fd, (char *)&acIn[i], 1); continue; } - fileWrite(pCLServing->fd, &acIn[i], 1); + fileWrite(pCLServing->fd, (char *)&acIn[i], 1); fileWrite(pCLServing->fd, "]", 1); pCLServing->accmd.string[0] = @@ -2287,7 +2287,7 @@ pCL = pCL->pCLscan) { if (pGE->pCEctl == pCL->pCEto) continue; - sprintf(acOut, + sprintf((char *)acOut, " %-32.32s %c %-7.7s %6s ", pCL->acid.string, pCL == pCLServing ? '*' : ' ', @@ -2296,7 +2296,7 @@ "spy") : "stopped", IdleTyme(tyme - pCL->typetym)); - fileWrite(pCLServing->fd, acOut, -1); + fileWrite(pCLServing->fd, (char *)acOut, -1); filePrint(pCLServing->fd, "%s\r\n", pCL->pCEto->server.string); } @@ -2521,7 +2521,7 @@ for (pCE = pGE->pCElist; pCE != (CONSENT *) 0; pCE = pCE->pCEnext) { - sprintf(acOut, + sprintf((char *)acOut, " %-24.24s %c %-4.4s %-.40s\r\n", pCE->server.string, pCE == pCEServing ? '*' : ' ', @@ -2529,7 +2529,8 @@ pCE->pCLwr ? pCE->pCLwr->acid. string : pCE-> pCLon ? "" : ""); - (void)fileWrite(pCLServing->fd, acOut, + (void)fileWrite(pCLServing->fd, + (char *)acOut, -1); } break; @@ -2548,7 +2549,7 @@ for (pCL = pCEServing->pCLon; (CONSCLIENT *) 0 != pCL; pCL = pCL->pCLnext) { - sprintf(acOut, + sprintf((char *)acOut, " %-32.32s %c %-7.7s %6s %s\r\n", pCL->acid.string, pCL == pCLServing ? '*' : ' ', @@ -2558,7 +2559,8 @@ "stopped", IdleTyme(tyme - pCL->typetym), pCL->actym); - (void)fileWrite(pCLServing->fd, acOut, + (void)fileWrite(pCLServing->fd, + (char *)acOut, -1); } break; @@ -2570,14 +2572,15 @@ for (pCE = pGE->pCElist; pCE != (CONSENT *) 0; pCE = pCE->pCEnext) { - sprintf(acOut, + sprintf((char *)acOut, " %-24.24s on %-32.32s at %5.5s%c\r\n", pCE->server.string, pCE->fvirtual ? pCE->acslave. string : pCE->dfile.string, pCE->pbaud->acrate, pCE->pparity->ckey); - (void)fileWrite(pCLServing->fd, acOut, + (void)fileWrite(pCLServing->fd, + (char *)acOut, -1); } break; @@ -2730,7 +2733,7 @@ } pGE->pCLfree->fd = fileOpenFD(fd, simpleSocket); - if (pGE->pCLfree->fd < 0) { + if ((CONSFILE *)0 == pGE->pCLfree->fd) { Error("fileOpenFD: %s", strerror(errno)); close(fd); continue; @@ -2940,7 +2943,7 @@ exit(EX_UNAVAILABLE); } ssocket = fileOpenFD(sfd, simpleSocket); - if (ssocket < 0) { + if ((CONSFILE *)0 == ssocket) { Error("fileOpenFD: %s", strerror(errno)); close(sfd); exit(EX_UNAVAILABLE); Index: conserver/master.c --- conserver/master.c.000 2002-06-05 17:05:06.000000000 -0500 +++ conserver/master.c 2002-08-06 13:39:01.117501000 -0500 @@ -463,12 +463,12 @@ fileClose(&csocket); exit(EX_OK); } - if ((char *)0 != (pcArgs = strchr(acIn, ':'))) { + if ((char *)0 != (pcArgs = strchr((char *)acIn, ':'))) { *pcArgs++ = '\000'; - } else if ((char *)0 != (pcArgs = strchr(acIn, ' '))) { + } else if ((char *)0 != (pcArgs = strchr((char *)acIn, ' '))) { *pcArgs++ = '\000'; } - if (0 == strcmp(acIn, "help")) { + if (0 == strcmp((char *)acIn, "help")) { static char *apcHelp[] = { "call provide port for given machine\r\n", "groups provide ports for group leaders\r\n", @@ -486,7 +486,7 @@ fileClose(&csocket); exit(EX_OK); } - if (0 == strcmp(acIn, "quit")) { + if (0 == strcmp((char *)acIn, "quit")) { struct passwd *pwd; if ('t' == cType) { @@ -505,12 +505,12 @@ fileClose(&csocket); exit(EX_OK); } - if (0 == strcmp(acIn, "pid")) { + if (0 == strcmp((char *)acIn, "pid")) { filePrint(csocket, "%d\r\n", parentpid); fileClose(&csocket); exit(EX_OK); } - if (0 == strcmp(acIn, "groups")) { + if (0 == strcmp((char *)acIn, "groups")) { int iSep = 1; for (pGE = pGroups; pGE != (GRPENT *) 0; pGE = pGE->pGEnext) { @@ -523,7 +523,7 @@ fileClose(&csocket); exit(EX_OK); } - if (0 == strcmp(acIn, "master")) { + if (0 == strcmp((char *)acIn, "master")) { int iSep = 1; if ((GRPENT *) 0 != pGroups) { @@ -549,12 +549,12 @@ fileClose(&csocket); exit(EX_OK); } - if (0 == strcmp(acIn, "version")) { + if (0 == strcmp((char *)acIn, "version")) { filePrint(csocket, "version `%s\'\r\n", THIS_VERSION); fileClose(&csocket); exit(EX_OK); } - if (0 != strcmp(acIn, "call")) { + if (0 != strcmp((char *)acIn, "call")) { fileWrite(csocket, "unknown command\r\n", -1); fileClose(&csocket); exit(EX_OK); ------- =_aaaaaaaaaa0-- From jrj@gandalf.cc.purdue.edu Sat Aug 10 17:26:21 2002 Received: from gandalf.cc.purdue.edu (root@gandalf.cc.purdue.edu [128.210.135.25]) by underdog.stansell.org (8.12.4/8.12.4) with ESMTP id g7B0QKRc027563 for ; Sat, 10 Aug 2002 17:26:21 -0700 (PDT) Received: from gandalf.cc.purdue.edu (jrj@localhost [127.0.0.1]) by gandalf.cc.purdue.edu (8.12.1/8.12.1) with ESMTP id g7B0QJc4008189 for ; Sat, 10 Aug 2002 19:26:19 -0500 (EST) Message-Id: <200208110026.g7B0QJc4008189@gandalf.cc.purdue.edu> To: users@conserver.com Subject: Lost ALRM signals Reply-to: jrj@purdue.edu MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <8179.1029025354.0@gandalf.cc.purdue.edu> Date: Sat, 10 Aug 2002 19:26:19 -0500 From: "John R. Jackson" Sender: users-admin@conserver.com Errors-To: users-admin@conserver.com X-BeenThere: users@conserver.com X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Conserver Users List-Unsubscribe: , List-Archive: ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <8179.1029025354.1@gandalf.cc.purdue.edu> One of my (more annoying :-) cohorts noticed the timestamps were missing for one of the log files he was looking at. After poking around, I found about 1/3 of the child processes looked "normal": # psig 12550 | grep ^ALRM 12550: ALRM caught 0 while the others looked "odd": # psig 12555 | grep ^ALRM 12555: ALRM caught RESETHAND,NODEFER and there was a direct correlation between "normal"/"odd" and whether the timestamps were working. Sending an ALRM signal to an "odd" process by hand caused it to die, although at least the master restarted it. However, the flags were still "wrong". Looking at the code I noticed some sleep() and usleep() calls that could potentially disturb the ALRM handler and clearly needed to be protected. However, a debugging session showed the real culprit to be, of all things, TCP wrappers. It messes with the ALRM signal and makes no attempt whatsoever to save/restore it (grrrr). So every time a connection was made and hosts_access() was called, our ALRM handler was clobbered (of course, it only took one). The following code adds a small function that must be called from any place that might mess up the handler. Future coding should be sure to call it if any sleep() or usleep() calls are added (maybe sleep/usleep should be wrapped with our own code and never be called directly?). This was all tested on Solaris 2.8 with conserver 7.2.2, although the problem first showed up my production system, which is Solaris 2.6 and conserver 7.1.3 (upgrade to both is imminent). John R. Jackson, Technical Software Specialist, jrj@purdue.edu ------- =_aaaaaaaaaa0 Content-Type: application/octet-stream; type="patch"; name="ALRM.diff" Content-ID: <8179.1029025354.2@gandalf.cc.purdue.edu> Content-Description: ALRM.diff Index: conserver/consent.c --- conserver/consent.c.000 2002-06-05 17:05:05.000000000 -0500 +++ conserver/consent.c 2002-08-10 18:56:34.944945000 -0500 @@ -719,6 +719,7 @@ } else { usleep(USLEEP_FOR_SLOW_PORTS); } + resetMark(); } pCE->autoReUp = 0; @@ -759,6 +760,7 @@ return; } usleep(USLEEP_FOR_SLOW_PORTS); /* Sleep for slow network ports */ + resetMark(); #if HAVE_MEMSET (void)memset((void *)&port, 0, sizeof(port)); Index: conserver/group.h --- conserver/group.h.000 2002-02-25 17:00:39.000000000 -0500 +++ conserver/group.h 2002-08-10 18:57:05.605030000 -0500 @@ -56,6 +56,7 @@ extern void destroyGroup(GRPENT *); extern void destroyConsent(GRPENT *, CONSENT *); extern void SendClientsMsg(CONSENT *, char *); +extern void resetMark(void); #else extern void Spawn(); extern int CheckPass(); @@ -65,4 +66,5 @@ extern void destroyGroup(); extern void destroyConsent(); extern void SendClientsMsg(); +extern void resetMark(); #endif --- conserver/group.c.000 2002-08-10 18:44:30.000000000 -0500 +++ conserver/group.c 2002-08-10 18:58:09.395240000 -0500 @@ -431,6 +431,22 @@ #endif } +/* various areas of the code (sometimes not even our own) mess with + * the alarm signal, so this function is here to reset it to what + * we need. We do not actually set an alarm here, but set the flag + * that will call Mark() which will set the next alarm. + */ +void +#if USE_ANSI_PROTO +resetMark(void) +#else +resetMark() +#endif +{ + simpleSignal(SIGALRM, FlagMark); + fSawMark = 1; +} + void #if USE_ANSI_PROTO tagLogfile(const CONSENT * pCE, const char *fmt, ...) @@ -927,6 +943,7 @@ } fileWrite(pCLServing->fd, "- ", -1); sleep(1); + resetMark(); if (-1 == ioctl(pCEServing->fdtty, TIOCCBRK, (char *)0)) { fileWrite(pCLServing->fd, "failed]\r\n", -1); return; @@ -1348,8 +1365,7 @@ simpleSignal(SIGUSR1, FlagReUp); /* on a SIGALRM we should mark log files */ - simpleSignal(SIGALRM, FlagMark); - fSawMark = 1; /* start during first pass */ + resetMark(); /* the MAIN loop a group server */ @@ -2747,8 +2763,10 @@ fileWrite(pGE->pCLfree->fd, "access from your host refused\r\n", -1); fileClose(&pGE->pCLfree->fd); + resetMark(); continue; } + resetMark(); } #endif ------- =_aaaaaaaaaa0-- From stoffel@lucent.com Fri Aug 30 12:39:46 2002 Received: from auemail2.firewall.lucent.com ([192.11.223.163]) by underdog.stansell.org (8.12.4/8.12.4) with ESMTP id g7UJdjRc024079 for ; Fri, 30 Aug 2002 12:39:45 -0700 (PDT) Received: from alpo.casc.com (h152-148-10-6.lucent.com [152.148.10.6]) by auemail2.firewall.lucent.com (Switch-2.2.2/Switch-2.2.0) with ESMTP id g7UJdY729249 for ; Fri, 30 Aug 2002 15:39:35 -0400 (EDT) Received: from sekrit.casc.com (sekrit [152.148.200.85]) by alpo.casc.com (8.9.1a/8.9.1) with ESMTP id PAA29156 for ; Fri, 30 Aug 2002 15:39:34 -0400 (EDT) From: stoffel@lucent.com Received: (from stoffel@localhost) by sekrit.casc.com (8.8.8+Sun/8.8.8) id PAA24251; Fri, 30 Aug 2002 15:39:32 -0400 (EDT) X-Authentication-Warning: sekrit.casc.com: stoffel set sender to stoffel@lucent.com using -f MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15727.51700.695254.3136@gargle.gargle.HOWL> Date: Fri, 30 Aug 2002 15:39:32 -0400 To: users@conserver.com Subject: Xyplex MAXserver 1620 questions X-Mailer: VM 6.95 under Emacs 20.6.1 Sender: users-admin@conserver.com Errors-To: users-admin@conserver.com X-BeenThere: users@conserver.com X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Conserver Users List-Unsubscribe: , List-Archive: Hi all, I'm working setup a Xyplex MAXserver 1620, 20 port serial port terminal server for use with conserver 7.2.2. I've managed to do the basic configuration on the MAXserver, and it's on the network and I can telnet to various ports and access system consoles by hand, but with some problems. 1. The spacebar doesn't work, at all. 2. When I hit return, I get two carriage returns and/or two prompts. I've been playing with the settings and looking at the docs I found on the net for "Configuring MX Access Server ports for Attached Console Devices", but it hasn't helped here. I'm talking to a Sun E4000 on port 1. Here's the status of the port from the Xyplex: Xyplex>> show port 1 Port 1: (Remote) 01 Jan 1986 00:35:47 Character Size: 8 Input Speed: 9600 Flow Control: None Output Speed: 9600 Parity: None Modem Control: Disabled Access: Remote Local Switch: None Backwards Switch: None Name: PORT_1 Break: Local Session Limit: 4 Break Length: 250ms Type: Soft Forwards Switch: None CCL Modem Speaker: Inaudible CCL Name: None Dialout Action: Logout APD Authentication Interactive Only: Disabled Preferred Service: None Authorized Groups: 0 (Current) Groups: 0 Enabled Characteristics: Autoprompt, Input Flow Control, Internet Connections, Loss Notification, Message Codes, Noloss, Output Flow Control, ULI, Verification Xyplex>> I've fiddled with various Flow Control and Modem Control settings to no avail. Could it be a problem with the serial cables/connectors that I'm using? The fact that I'm seeing data without any problems suggests no, but not having "space" or other characters is wierd. Has anyone else gotten this type of terminal server to work properly? Thanks, John John Stoffel - Senior Unix Systems Administrator - Lucent Technologies stoffel@lucent.com - http://www.lucent.com - 978-399-0479