Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: binary MIME-Version: 1.0 X-Mailer: MIME-tools 5.411 (Entity 5.404) X-RT-Original-Encoding: iso-8859-1 Content-Length: 7543 From b17783@achilles.ctd.anl.gov Fri Sep 27 15:56:25 1996 Received: from MIT.EDU (PACIFIC-CARRIER-ANNEX.MIT.EDU [18.69.0.28]) by rt-11.MIT.EDU (8.7.5/8.7.3) with SMTP id PAA09118 for ; Fri, 27 Sep 1996 15:56:25 -0400 Received: from achilles.ctd.anl.gov by MIT.EDU with SMTP id AA06378; Fri, 27 Sep 96 15:56:24 EDT Received: from pembroke.ctd.anl.gov (pembroke.ctd.anl.gov [146.137.64.73]) by achilles.ctd.anl.gov (8.6.11/8.6.11) with ESMTP id OAA02253 for ; Fri, 27 Sep 1996 14:56:18 -0500 Received: (b17783@localhost) by pembroke.ctd.anl.gov (8.6.11/8.6.11) id OAA32602; Fri, 27 Sep 1996 14:56:17 -0500 Message-Id: <199609271956.OAA32602@pembroke.ctd.anl.gov> Date: Fri, 27 Sep 1996 14:56:17 -0500 From: Doug Engert To: krb5-bugs@MIT.EDU Subject: K5b7 util/pty/update_utmp.c and HPUX 10.10 >Number: 40 >Category: pty >Synopsis: K5b7 util/pty/update_utmp.c and HPUX 10.10 >Confidential: no >Severity: serious >Priority: medium >Responsible: hartmans >State: feedback >Class: sw-bug >Submitter-Id: unknown >Arrival-Date: Fri Sep e 15:57:00 EDT 1996 >Last-Modified: Thu Sep 13 21:32:19 EDT 2001 >Originator: Doug Engert >Organization: >Release: beta-7 >Environment: HPUX 10.10 >Description: The K5 beta 7 krlogind does not link, because the HPUX 10.10 system does not have the getutmpx routine. The following fix takes care of this. -- Douglas E. Engert Argonne National Laboratory 9700 South Cass Avenue Argonne, Illinois 60439 (630) 252-5444 PGP Key fingerprint = 20 2B 0C 78 43 8A 9C A6 29 F7 A3 6D 5E 30 A6 7F >How-To-Repeat: >Fix: *** ,update_utmp.c Tue Apr 16 21:11:19 1996 --- update_utmp.c Fri Sep 27 10:21:29 1996 *************** *** 124,129 **** --- 124,130 ---- pututline(&ent); endutent(); + #ifdef HAVE_UPDWTMPX #ifdef HAVE_SETUTXENT setutxent(); getutmpx(&ent, &utx); *************** *** 134,139 **** --- 135,141 ---- pututxline(&utx); endutxent(); #endif /* HAVE_SETUTXENT */ + #endif /* HAVE_UPDWTMPX */ #else /* HAVE_SETUTENT */ if (flags&PTY_TTYSLOT_USABLE) >Audit-Trail: Responsible-Changed-From-To: gnats-admin->hartmans Responsible-Changed-By: hartmans Responsible-Changed-When: Mon Sep 30 00:49:29 1996 Responsible-Changed-Why: Assign to category and update PR. From: "Theodore Y. Ts'o" To: Doug Engert Cc: krb5-bugs@MIT.EDU Subject: Re: pty/40: K5b7 util/pty/update_utmp.c and HPUX 10.10 Date: Wed, 30 Oct 1996 18:34:29 -0500 The problem with your proposed fix (to comment out that whole block of code) is that you no longer update the utmpx file, which is the wrong thing. I think this patch solves the problem in a cleaner fashion, but I haven't been able to test it yet. Does anyone with access to HPUX or DEC Unix want to comment? Index: update_utmp.c =================================================================== RCS file: /mit/krb5/.cvsroot/src/util/pty/update_utmp.c,v retrieving revision 1.12 diff -u -r1.12 update_utmp.c --- update_utmp.c 1996/04/17 02:11:19 1.12 +++ update_utmp.c 1996/10/30 23:31:06 @@ -126,7 +126,19 @@ #ifdef HAVE_SETUTXENT setutxent(); +#ifdef HAVE_GETUTMPX getutmpx(&ent, &utx); +#else + /* For platforms like HPUX and Dec Unix which don't have getutmpx */ + strncpy(utx.ut_user, ent.ut_user, sizeof(ent.ut_user)); + strncpy(utx.ut_id, ent.ut_id, sizeof(ent.ut_id)); + strncpy(utx.ut_line, ent.ut_line, sizeof(ent.ut_line)); + utx.ut_pid = ent.ut_pid; + utx.ut_type = ent.ut_type; + utx.ut_exit = ent.ut_exit; + utx.ut_tv.tv_sec = ent.ut_time; + utx.ut_tv.tv_usec = 0; +#endif if (host) strncpy(utx.ut_host, host, sizeof(utx.ut_host)); else - Ted From: "Theodore Y. Ts'o" To: Sam Hartman Cc: krb5-bugs@MIT.EDU Subject: Re: pty/40: K5b7 util/pty/update_utmp.c and HPUX 10.10 Date: Wed, 30 Oct 1996 18:35:37 -0500 `Theodore Y. Ts'o' made changes to this PR. My mail contained a proposed fix, and I'm looking for comments.... From: Sam Hartman To: "Theodore Y. Ts'o" Cc: krb5-bugs@MIT.EDU, krb5-prs@rt11.MIT.EDU Subject: Re: pty/40: K5b7 util/pty/update_utmp.c and HPUX 10.10 Date: 31 Oct 1996 16:16:16 -0500 I'll try an HP and Alpha build tonight; thanks for the patch. --Sam From: "Theodore Y. Ts'o" To: Sam Hartman Cc: "Theodore Y. Ts'o" , krb5-bugs@MIT.EDU, krb5-prs@rt11.MIT.EDU Subject: Re: pty/40: K5b7 util/pty/update_utmp.c and HPUX 10.10 Date: Thu, 31 Oct 1996 19:01:47 -0500 From: Sam Hartman Date: 31 Oct 1996 16:16:16 -0500 I'll try an HP and Alpha build tonight; thanks for the patch. Don't forget the obvious changes to configure.in, which I didn't include.... (not that it matters for HP and Alpha, since HAVE_GETUTXENT will be undefined anyway). - Ted State-Changed-From-To: open-feedback State-Changed-By: hartmans State-Changed-When: Thu Nov 14 22:09:26 1996 State-Changed-Why: Doug, could you look at the following patch that Ted checked in? (I am not including the configure.in hunk). We don't have any HPs to try it on. Index: update_utmp.c =================================================================== RCS file: /mit/krb5/.cvsroot/src/util/pty/update_utmp.c,v retrieving revision 1.12 diff -u -r1.12 update_utmp.c --- update_utmp.c 1996/04/17 02:11:19 1.12 +++ update_utmp.c 1996/10/30 23:31:06 @@ -126,7 +126,19 @@ #ifdef HAVE_SETUTXENT setutxent(); +#ifdef HAVE_GETUTMPX getutmpx(&ent, &utx); +#else + /* For platforms like HPUX and Dec Unix which don't have getutmpx */ + strncpy(utx.ut_user, ent.ut_user, sizeof(ent.ut_user)); + strncpy(utx.ut_id, ent.ut_id, sizeof(ent.ut_id)); + strncpy(utx.ut_line, ent.ut_line, sizeof(ent.ut_line)); + utx.ut_pid = ent.ut_pid; + utx.ut_type = ent.ut_type; + utx.ut_exit = ent.ut_exit; + utx.ut_tv.tv_sec = ent.ut_time; + utx.ut_tv.tv_usec = 0; +#endif if (host) strncpy(utx.ut_host, host, sizeof(utx.ut_host)); else From: "Theodore Y. Ts'o" To: Doug Engert Cc: krb5-bugs@MIT.EDU Subject: Re: pty/40: K5b7 util/pty/update_utmp.c and HPUX 10.10 Date: Thu, 5 Dec 1996 22:29:48 -0500 (This is just a note to update our gnats database.) Doug reported that on top of the changes I made, the following patch was still necessary. It's not a final fix, but it is suitable for application during the 1.0 code thaw, since it won't cause any problems for other platforms; in the long run, we want to try to make some configure tests that test for this cleanly. For now, though, I'll be applying this suggested patch to the 1.0 release branch. *** ./util/pty/,update_utmp.c Fri Nov 15 07:40:31 1996 --- ./util/pty/update_utmp.c Sun Dec 1 11:48:56 1996 *************** *** 138,144 **** --- 138,149 ---- #ifdef UT_EXIT_STRUCTURE_DIFFER utx.ut_exit.ut_exit = ent.ut_exit.e_exit; #else + #ifdef __hpux + utx.ut_exit.__e_termination = ent.ut_exit.e_termination; + utx.ut_exit.__e_exit = ent.ut_exit.e_exit; + #else utx.ut_exit = ent.ut_exit; + #endif #endif utx.ut_tv.tv_sec = ent.ut_time; utx.ut_tv.tv_usec = 0; >Unformatted: