Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 6090 - glibc getwpent() calls don't handle HP-UX NIS password aging
Summary: glibc getwpent() calls don't handle HP-UX NIS password aging
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc
Version: 6.1
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Cristian Gafton
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1999-10-19 17:16 UTC by baz
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2000-01-05 03:04:33 UTC

Attachments (Terms of Use)

Description baz 1999-10-19 17:16:29 UTC
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-05 03:04:59 UTC
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 09:12:59 UTC
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 ----
       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.