Unix Technical Forum

TZ and HZ

This is a discussion on TZ and HZ within the Sco Unix forums, part of the Unix Operating Systems category; --> Peculiar behavior of a 5.0.6 machine: If one telnets into the system, TZ and HZ are correct, but if ...


Go Back   Unix Technical Forum > Unix Operating Systems > Sco Unix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-15-2008, 03:47 PM
Jean-Pierre Radley
 
Posts: n/a
Default TZ and HZ

Peculiar behavior of a 5.0.6 machine:

If one telnets into the system, TZ and HZ are correct, but if one
comes in with ssh, neither HZ nor TZ are in the environment.


--
JP
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-15-2008, 03:47 PM
Roger Cornelius
 
Posts: n/a
Default Re: TZ and HZ

Jean-Pierre Radley wrote:
>
> Peculiar behavior of a 5.0.6 machine:
>
> If one telnets into the system, TZ and HZ are correct, but if one
> comes in with ssh, neither HZ nor TZ are in the environment.
>
> --
> JP


What version of (I assume) openssh? 3.8p1 was overzealous in clearing
it's environment and would cause the problem you describe. It's fixed
in 3.8.1p1
--
Roger Cornelius racpop@tenzing.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-15-2008, 03:47 PM
Jean-Pierre Radley
 
Posts: n/a
Default Re: TZ and HZ

Roger Cornelius typed (on Thu, Jul 15, 2004 at 10:14:10PM +0000):
| Jean-Pierre Radley wrote:
| >
| > Peculiar behavior of a 5.0.6 machine:
| >
| > If one telnets into the system, TZ and HZ are correct, but if one
| > comes in with ssh, neither HZ nor TZ are in the environment.
|
| What version of (I assume) openssh? 3.8p1 was overzealous in clearing
| it's environment and would cause the problem you describe. It's fixed
| in 3.8.1p1

sshd version OpenSSH_3.8p1, OpenSSL 0.9.7d 17 Mar 2004

--
JP
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-15-2008, 03:48 PM
Roger Cornelius
 
Posts: n/a
Default Re: TZ and HZ

Jean-Pierre Radley <jpr@jpr.com> wrote in message news:<20040715225334.GD5829@jpradley.jpr.com>...
> Roger Cornelius typed (on Thu, Jul 15, 2004 at 10:14:10PM +0000):
> | Jean-Pierre Radley wrote:
> | >
> | > Peculiar behavior of a 5.0.6 machine:
> | >
> | > If one telnets into the system, TZ and HZ are correct, but if one
> | > comes in with ssh, neither HZ nor TZ are in the environment.
> |
> | What version of (I assume) openssh? 3.8p1 was overzealous in clearing
> | it's environment and would cause the problem you describe. It's fixed
> | in 3.8.1p1
>
> sshd version OpenSSH_3.8p1, OpenSSL 0.9.7d 17 Mar 2004


I see maintenance pack 3 includes 3.8p1. Here's a link describing the problem:

http://marc.theaimsgroup.com/?l=open...6319901648&w=2

3.8.1p1 also has a problem on SCO. Here's a link to that:

http://marc.theaimsgroup.com/?l=open...0516232529&w=2
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-15-2008, 03:48 PM
Jean-Pierre Radley
 
Posts: n/a
Default Re: TZ and HZ

Roger Cornelius typed (on Mon, Jul 19, 2004 at 08:55:26AM -0700):
| Jean-Pierre Radley <jpr@jpr.com> wrote in message news:<20040715225334.GD5829@jpradley.jpr.com>...
| > Roger Cornelius typed (on Thu, Jul 15, 2004 at 10:14:10PM +0000):
| > | Jean-Pierre Radley wrote:
| > | >
| > | > Peculiar behavior of a 5.0.6 machine:
| > | >
| > | > If one telnets into the system, TZ and HZ are correct, but if one
| > | > comes in with ssh, neither HZ nor TZ are in the environment.
| > |
| > | What version of (I assume) openssh? 3.8p1 was overzealous in clearing
| > | it's environment and would cause the problem you describe. It's fixed
| > | in 3.8.1p1
| >
| > sshd version OpenSSH_3.8p1, OpenSSL 0.9.7d 17 Mar 2004
|
| I see maintenance pack 3 includes 3.8p1. Here's a link describing the problem:
|
| http://marc.theaimsgroup.com/?l=open...6319901648&w=2
|
| 3.8.1p1 also has a problem on SCO. Here's a link to that:
|
| http://marc.theaimsgroup.com/?l=open...0516232529&w=2

I don't find that the hack in that last URL fixes the problem.

--
JP
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-15-2008, 03:48 PM
Roger Cornelius
 
Posts: n/a
Default Re: TZ and HZ

Jean-Pierre Radley wrote:
>
> Roger Cornelius typed (on Mon, Jul 19, 2004 at 08:55:26AM -0700):
> | Jean-Pierre Radley <jpr@jpr.com> wrote in message news:<20040715225334.GD5829@jpradley.jpr.com>...
> | > Roger Cornelius typed (on Thu, Jul 15, 2004 at 10:14:10PM +0000):
> | > | Jean-Pierre Radley wrote:
> | > | >
> | > | > Peculiar behavior of a 5.0.6 machine:
> | > | >
> | > | > If one telnets into the system, TZ and HZ are correct, but if one
> | > | > comes in with ssh, neither HZ nor TZ are in the environment.
> | > |
> | > | What version of (I assume) openssh? 3.8p1 was overzealous in clearing
> | > | it's environment and would cause the problem you describe. It's fixed
> | > | in 3.8.1p1
> | >
> | > sshd version OpenSSH_3.8p1, OpenSSL 0.9.7d 17 Mar 2004
> |
> | I see maintenance pack 3 includes 3.8p1. Here's a link describing the problem:
> |
> | http://marc.theaimsgroup.com/?l=open...6319901648&w=2
> |
> | 3.8.1p1 also has a problem on SCO. Here's a link to that:
> |
> | http://marc.theaimsgroup.com/?l=open...0516232529&w=2
>
> I don't find that the hack in that last URL fixes the problem.


Here's the simplest patch I could come up with. In wtmpx_write(), you
want to prevent the use of updwtmpx() and use the alternate code
instead. One of the openssh maintainers has checked in a patch for the
problem, but I don't know what it is.

*** loginrec.c.orig 2004-07-20 22:03:24.000000000 -0400
--- loginrec.c 2004-07-20 22:04:15.000000000 -0400
***************
*** 1183,1189 ****
static int
wtmpx_write(struct logininfo *li, struct utmpx *utx)
{
! #ifndef HAVE_UPDWTMPX
struct stat buf;
int fd, ret = 1;

--- 1183,1189 ----
static int
wtmpx_write(struct logininfo *li, struct utmpx *utx)
{
! #ifdef HAVE_UPDWTMPX
struct stat buf;
int fd, ret = 1;
--
Roger Cornelius racpop@tenzing.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-15-2008, 03:48 PM
Jean-Pierre Radley
 
Posts: n/a
Default Re: TZ and HZ

Roger Cornelius typed (on Wed, Jul 21, 2004 at 02:12:52AM +0000):
| Jean-Pierre Radley wrote:
| >
| >
| > I don't find that the hack in that last URL fixes the problem.
|
| Here's the simplest patch I could come up with. In wtmpx_write(), you
| want to prevent the use of updwtmpx() and use the alternate code
| instead. One of the openssh maintainers has checked in a patch for the
| problem, but I don't know what it is.
|

Instead of what you did, Tim Rice defines BROKEN_UPDWTMPX.

This works for me, to a point. I'm working with Kean Johnston and Bela
Lubkin and Boyd Gerber on this issue.

--
JP
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-15-2008, 03:48 PM
Roger Cornelius
 
Posts: n/a
Default Re: TZ and HZ

Jean-Pierre Radley wrote:
>
> Roger Cornelius typed (on Wed, Jul 21, 2004 at 02:12:52AM +0000):
> | Jean-Pierre Radley wrote:
> | >
> | >
> | > I don't find that the hack in that last URL fixes the problem.
> |
> | Here's the simplest patch I could come up with. In wtmpx_write(), you
> | want to prevent the use of updwtmpx() and use the alternate code
> | instead. One of the openssh maintainers has checked in a patch for the
> | problem, but I don't know what it is.
> |
>
> Instead of what you did, Tim Rice defines BROKEN_UPDWTMPX.


[I'm cc'ing this to Tim Rice]

But is it broken? It seems to work as described in the man page. When
I discovered the problem I did a google search for "updwtmpx man page".
The results showed that some implementations worked like SCO's, others
updated only wtmpx. Here's a couple of examples:

http://www.uwo.ca/cgi-bin/rmanx.pl?t...ent/section=3C
http://www.mcsr.olemiss.edu/cgi-bin/man-cgi?getutx+3

It seems like this is more a problem of different implementations rather
than broken ones.

> This works for me, to a point. I'm working with Kean Johnston and Bela
> Lubkin and Boyd Gerber on this issue.


What do you mean by "to a point"?
--
Roger Cornelius racpop@tenzing.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-15-2008, 03:48 PM
Jean-Pierre Radley
 
Posts: n/a
Default Re: TZ and HZ

Roger Cornelius typed (on Wed, Jul 21, 2004 at 03:14:16PM +0000):
| Jean-Pierre Radley wrote:
| >
| > Roger Cornelius typed (on Wed, Jul 21, 2004 at 02:12:52AM +0000):
| > | Jean-Pierre Radley wrote:
| > | >
| > | > I don't find that the hack in that last URL fixes the problem.
| > |
|
| But is it broken? It seems to work as described in the man page. When
| I discovered the problem I did a google search for "updwtmpx man page".
| The results showed that some implementations worked like SCO's, others
| updated only wtmpx. Here's a couple of examples:
|
| http://www.uwo.ca/cgi-bin/rmanx.pl?t...ent/section=3C
| http://www.mcsr.olemiss.edu/cgi-bin/man-cgi?getutx+3
|
| It seems like this is more a problem of different implementations rather
| than broken ones.
|
| > This works for me, to a point.
|
| What do you mean by "to a point"?

The TZ variable is maintained, but HZ disappears.
There are no duplicate entries in the output of 'last',
but 'brand -t -u' does not show a license being consumed.

--
JP
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-15-2008, 03:48 PM
Roger Cornelius
 
Posts: n/a
Default Re: TZ and HZ

Jean-Pierre Radley wrote:
>
> Roger Cornelius typed (on Wed, Jul 21, 2004 at 03:14:16PM +0000):
> | Jean-Pierre Radley wrote:
> | >
> | > Roger Cornelius typed (on Wed, Jul 21, 2004 at 02:12:52AM +0000):
> | > | Jean-Pierre Radley wrote:
> | > | >
> | > | > I don't find that the hack in that last URL fixes the problem.
> | > |
> |
> | But is it broken? It seems to work as described in the man page. When
> | I discovered the problem I did a google search for "updwtmpx man page".
> | The results showed that some implementations worked like SCO's, others
> | updated only wtmpx. Here's a couple of examples:
> |
> | http://www.uwo.ca/cgi-bin/rmanx.pl?t...ent/section=3C
> | http://www.mcsr.olemiss.edu/cgi-bin/man-cgi?getutx+3
> |
> | It seems like this is more a problem of different implementations rather
> | than broken ones.
> |
> | > This works for me, to a point.
> |
> | What do you mean by "to a point"?
>
> The TZ variable is maintained, but HZ disappears.
> There are no duplicate entries in the output of 'last',
> but 'brand -t -u' does not show a license being consumed.


I can't explain why your unpatched copy of 3.8.1p1 does not produce
duplicate entries in wtmp/wtmpx. It did here and was confirmed by Tim
Rice on 5.0.4 and 5.0.7. The environment problem is a different issue.
Apparently it wasn't completely fixed between 3.8p1 and 3.8.1p1.
--
Roger Cornelius racpop@tenzing.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:43 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com