Technical article 127179

Applications built with the UDK using getlogin(S), getlogin_r(S) and cuserid(S) not returning values or returning incorrect values

OpenServer 5.0.7

Written · Last revised

Problem

I have compiled my application on UnixWare 7.1.4 and am now trying to run it on OpenServer 5.0.7. I am using calls like getlogin(S), getlogin_r(S) and cuserid(S) to get user data but no date or incorrect data is being returned when run on OpenServer 5.0.7.

Running the same binary on UnixWare 7.1.4 does not exhibit this problem.

Cause

In UDK binary, all three functions read /var/adm/utmpx in 372 byte chunks, which is the sizeof(utmpx) in udk mode. The problem is that /var/tmp/utmpx is written in 368 byte chunks which is the sizeof(utmpx) in osr mode.

Solution

To solve the problem install the latest UDK Compatibility Module for OpenServer 5.0.7. This can be downloaded from:

http://www.sco.com/support/update/download/release.php?rid=273

From the Xinuos technical article database, record 127179. Reproduced with permission. The original is at www.sco.com/ta/127179, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.