Bug 128235 - libcrack gives "size mismatch" from 32-bit app on ia64
libcrack gives "size mismatch" from 32-bit app on ia64
Status: CLOSED DEFERRED
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: cracklib (Show other bugs)
3.0
ia64 Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
Brian Brock
:
Depends On:
Blocks: 126674
  Show dependency treegraph
 
Reported: 2004-07-20 11:46 EDT by Geoff Gustafson
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

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


Attachments (Terms of Use)

  None (edit)
Description Geoff Gustafson 2004-07-20 11:46:46 EDT
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 19:01:35 EDT
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 13:53:54 EDT
/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 14:43:30 EDT
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.