Bug 52899 - passwd does not parse options correctly
Summary: passwd does not parse options correctly
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: util-linux   
(Show other bugs)
Version: 7.1
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Elliot Lee
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-08-30 17:48 UTC by Ken Cox
Modified: 2007-04-18 16:36 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-08-30 17:48:14 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 Ken Cox 2001-08-30 17:48:09 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)

Description of problem:
When running passwd to change a user's password, e.g. passwd bill, passwd 
will print out the usage string and exit.  I am seeing this on the ARM 
embedded platform, but the potential is present to see it on other 
platforms.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. cross compile for the ARM platform
2. try to change the passwd for a user, e.g. passwd bill
3.
	

Actual Results:  message is printed:

Usage: passwd [-foqsvV] [user [password]]

Expected Results:  It should have allowed me to set the password for that 
user.

Additional info:



Patch that fixes passwd.c:

--- util-linux-2.10s/login-utils/passwd.c.orig  Thu Aug 30 11:44:41 2001
+++ util-linux-2.10s/login-utils/passwd.c       Thu Aug 30 11:45:04 2001
@@ -234,7 +234,7 @@
     char salt[2];
     int force_passwd = 0;
     int silent = 0;
-    char c;
+    int c;
     int opt_index;
     int fullname = 0, shell = 0;
     static const struct option long_options[] =



Specfile patch:

--- SPECS/util-linux.spec.orig  Thu Aug 30 11:53:01 2001
+++ SPECS/util-linux.spec       Thu Aug 30 11:58:29 2001
@@ -1,7 +1,7 @@
 Summary: A collection of basic system utilities.
 Name: util-linux
 Version: 2.10s
-Release: 12b
+Release: 12b1
 Copyright: distributable
 Group: System Environment/Base
 Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/util-linux-%
{version}.
tar.gz
@@ -42,6 +42,7 @@
 Patch59: util-linux-2.10s-cross.patch
 Patch60: util-linux-nofdisk.patch
 Patch61: util-linux-2.10s-mount.patch
+Patch62: util-linux-2.10s-passwd.patch

 Obsoletes: fdisk tunelp
 %ifarch alpha sparc sparc64 sparcv9 s390
@@ -105,6 +106,7 @@
 %ifarch sh
 %patch60 -p1
 %endif
+%patch62 -p1 -b .passwd

 %build
 unset LINGUAS || :

Comment 1 Elliot Lee 2002-01-04 17:58:38 UTC
This patch appears to be in util-linux-2.11n


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