Bug 128235

Summary: libcrack gives "size mismatch" from 32-bit app on ia64
Product: Red Hat Enterprise Linux 3 Reporter: Geoff Gustafson <grgustaf>
Component: cracklibAssignee: Nalin Dahyabhai <nalin>
Status: CLOSED DEFERRED QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: jbj
Target Milestone: ---   
Target Release: ---   
Hardware: ia64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-15 18:43:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 126674    

Description Geoff Gustafson 2004-07-20 15:46:46 UTC
Description of problem:
I built a simple test program on i386 that calls FascistCheck in
libcrack. When I copy it over to an ia64 box and run it, it reports:

% ./libcrack testing ate2much
Checking password: 'testing'
/usr/lib/cracklib_dict: size mismatch
PWOpen: Success

I don't know about common practice calling this function, but crack.h
comments lead me to hardcode "/usr/lib/cracklib_dict" to pass in. It
seems most likely to me that the 64-bit version of cracklib uses a
different dictionary format, and when the 32-bit version uses it, it
fails.

I just tried installing cracklib-dicts.i386, and now it works. But
then presumably the 64-bit one won't. (I'll check). Maybe the 32-bit
dict should be installed under /emul, and some magic performed? It
seems like including cracklib.i386 w/o cracklib-dicts.i386 is useless
though.

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


How reproducible:
Every time

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

// libcrack.c - exciting test app
// gcc -o libcrack -lcrack libcrack.c
#include <stdio.h>
#include <crack.h>

int main(int argc, char **argv) {
  char *rval;
  int i;

  for (i=1; i<argc; i++) {
    printf("Checking password: '%s'\n", argv[i]);
    rval = FascistCheck(argv[i], "/usr/lib/cracklib_dict");
    if (rval) {
      fprintf(stderr, "ERROR: %s\n\n", rval);
    }
    else {
      printf("Password OK\n\n");
    }
  }
}

Comment 1 Nalin Dahyabhai 2004-07-29 23:01:35 UTC
Relocating the dictionaries from /usr/lib to /usr/%{_lib} is the
current practice -- on 64-bit systems where you'd find the default
libraries in /lib64 and /usr/lib64, that means that the dictionaries
are in /usr/lib64/cracklib_dict and not /usr/lib/cracklib_dict.

We can adjust the comments in crack.h to mention this in 2.7-29, not
sure what else can be done at the package level.

Comment 2 Jeff Johnson 2004-07-30 17:53:54 UTC
/usr/lib and /usr/lib64 are the paths for multilib systems.

On ia64, the path is /emul/ia32/usr/lib.

Perhaps moving cracklib_dict onto a platform
peculier path is best all round solution.

Ick ...

Comment 4 Nalin Dahyabhai 2005-09-15 18:43:30 UTC
Fixed in upstream 2.8 and later, and in 2.7-29 and later on RHEL4 and Fedora. 
I'm marking this one DEFERRED for now, we can reopen it if we decide to backport
the fix to RHEL3.