Bug 128235 - libcrack gives "size mismatch" from 32-bit app on ia64
Summary: libcrack gives "size mismatch" from 32-bit app on ia64
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: cracklib   
(Show other bugs)
Version: 3.0
Hardware: ia64
OS: Linux
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact: Brian Brock
Depends On:
Blocks: 126674
TreeView+ depends on / blocked
Reported: 2004-07-20 15:46 UTC by Geoff Gustafson
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-09-15 18:43:30 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

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

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

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

How reproducible:
Every time

Steps to Reproduce:
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.

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