Bug 6090 - glibc getwpent() calls don't handle HP-UX NIS password aging
glibc getwpent() calls don't handle HP-UX NIS password aging
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
6.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Cristian Gafton
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-10-19 13:16 EDT by baz
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-01-04 22:04:33 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description baz 1999-10-19 13:16:29 EDT
HP-UX implements password aging information as an extension
to the encrypted password field - eg "oMTEeSwfFGf8I,F/FM".

pwdb/pam would now appear to have been updated to handle
this, but the core glibc calls are still broken when called
from legacy applications.
Comment 1 Cristian Gafton 2000-01-04 22:04:59 EST
I don't see how glibc can handle any of that. This is a HP-UX extension designed
to be used and dealt with at the application level, not in the library.
Comment 2 baz 2000-01-05 04:12:59 EST
Duh! The encrypted password returned by getpwent() inlcudes the aging info -
this causes applications to break. How to handle the password aging is a
separate issue, but the inability to login is a problem.

Supplied patch is against RH6.0 Source RPM.

*** glibc/pwd/fgetpwent_r.c.orig        Sat Apr 10 06:57:43 1999
--- glibc/pwd/fgetpwent_r.c     Sat Apr 10 07:33:08 1999
***************
*** 53,58 ****
--- 53,63 ----
   else
     {
       STRING_FIELD (result->pw_passwd, ISCOLON, 0);
+      /* truncate password at ',' in 14th character */
+      if ((result->pw_passwd != NULL) && (result->pw_passwd[13] == ','))
+        {
+          result->pw_passwd[13] = '\0';
+        }
       if (result->pw_name[0] == '+' || result->pw_name[0] == '-')
         {
         INT_FIELD_MAYBE_NULL (result->pw_uid, ISCOLON, 0, 10, , 0)

Note You need to log in before you can comment on or make changes to this bug.