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
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
(Show other bugs)
Version: 6.1
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Cristian Gafton
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
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:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-01-05 03:04:33 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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 ----
   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.