Bug 4068 - ypserv-1.3.36.94-2 (update.c:233) cannot change password
Summary: ypserv-1.3.36.94-2 (update.c:233) cannot change password
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: ypserv
Version: 1.0
Hardware: i386
OS: Linux
high
high
Target Milestone: ---
Assignee: Cristian Gafton
QA Contact:
URL: ftp://rawhide.redhat.com/SRPMS/SRPMS/...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-07-16 08:04 UTC by Wesley Tanaka
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-07-20 21:03:36 UTC
Embargoed:


Attachments (Terms of Use)

Description Wesley Tanaka 1999-07-16 08:04:04 UTC
I see a few problems with the source code at this point.

Line 231: sizeof (rootpass) on my computer is 4.  This is
always going to be less than strlen(pw->pw_passwd)  So this
if statement is redundant.  I think this was perhaps meant
to say strlen (rootpass)

However: rootpass is uninitialized if !HAVE_GETSPNAM &&
CHECKROOT  so strlen would not work.

Also: even if strlen(pw->pw_passwd) >= sizeof (rootpass) &&
strlen(pw->pw_passwd) >= strlen (rootpass), the code then
goes on to replace rootpass with enough space to complete
the strcpy unconditionally

P.S. there is no check to see whether or not the alloca
(line 236) has failed.

Could CHECKROOT be turned off in the binary rpm until this
problem is somehow otherwise resolved?

Comment 1 Wesley Tanaka 1999-07-16 08:21:59 UTC
ypserv-1.3.6.91-1.i386.rpm would segfault with yp-tools-2.2-1 (after
sucessfully changing the password).  However, it seems to work with
yp-tools-2.3-1.

This problem that I was experiencing was happening in combination with
yp-tools-2.3-1

Comment 2 Wesley Tanaka 1999-07-16 08:57:59 UTC
Thorsten Kukuk <kukuk> wrote me back and said that, indeed,
removing that bizarre if statement was the correct patch.  1.3.36
(which is newer than 1.3.36.94) has this fix incorporated.

Comment 3 Wesley Tanaka 1999-07-16 09:38:59 UTC
i misunderstood mr kukuk.  1.3.36 is the latest stable released
version, not the latest version.  1.3.36.94 is indeed the latest
version, and I guess he has that patch applied in some local
sourcetree of his:

  "No, it is fixed in my sourcetree. I only need patches
for the other things in the TODO file."

Comment 4 Jeff Johnson 1999-07-20 21:03:59 UTC
I believe this problem is fixed in ypserv-1.3.36.94-3. Please reopen
this bug if I'm mistaken.


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