🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: nl.comp.os.linux
Article #163

Re: crypt() onder RedHat

#163
From: J.H.M. Dassen (Ray)
Date: Wed, 13 Jan 1999 00:00
74 lines
3729 bytes
Voetelink D. <voetelink@ecn.nl> wrote:
>Op het moment dat ik de functie crypt() gebruik, dat krijg ik een error:
>
>Undefined reference to crypt
>
>Ik heb alle benodigde includes gebruikt, en het is precies zo gebruikt als
>in crypt(3) is uitgelegd.
>
>Ik denk dat het komt door de PAM-security onder RedHat.

Nee. Het heeft met glibc te maken.

>Als ik 't compileer op een slackware-machine, dan gaat alles goed....

Die Slackware machine draait waarschijnlijk nog libc5.

>Het vreemde is dat crypt WEL in de include-file <unistd.h> staat.... Kan
>iemand mij vertellen waarom het niet werkt, en hoe ik 't wel kan laten
>werken ?!?

Uit de FAQ van glibc:

:1.7.    What are these `add-ons'?
:
:{UD} To avoid complications with export rules or external source code some
:optional parts of the libc are distributed as separate packages (e.g., the
:crypt package, see question 2.5).
:
:To use these packages as part of GNU libc, just unpack the tarfiles in the
:libc source directory and tell the configuration script about them using
:the --enable-add-ons option.  If you give just --enable-add-ons configure
:tries to find all the add-on packages in your source tree. This may not
:work.  If it doesn't, or if you want to select only a subset of the
:add-ons, give a comma-separated list of the add-ons to enable:
:
:        configure --enable-add-ons=crypt,linuxthreads
:
:for example.
:
:Add-ons can add features (including entirely new shared libraries),
:override files, provide support for additional architectures, and just
:about anything else.  The existing makefiles do most of the work; only some
:few stub rules must be written to get everything running.

:2.5.    When linking with the new libc I get unresolved symbols
:        `crypt' and `setkey'.  Why aren't these functions in the
:        libc anymore?
:
:{UD} The US places restrictions on exporting cryptographic programs and
:source code.  Until this law gets abolished we cannot ship the
:cryptographic functions together with glibc.

Geen linuxdistributeur trekt zich er wat crypt() betreft iets van aan, voor
zover ik weet.

:The functions are available, as an add-on (see question 1.7).  People in
:the US may get it from the same place they got GNU libc from.  People
:outside the US should get the code from ftp://ftp.ifi.uio.no/pub/gnu, or
:another archive site outside the USA.  The README explains how to install
:the sources.

En hier staat de truuk:
:If you already have the crypt code on your system the reason for the
:failure is probably that you did not link with -lcrypt.  The crypto
:functions are in a separate library to make it possible to export GNU
:libc binaries from the US.

HTH,
Ray
-- 
ART  A friend of mine in Tulsa, Okla., when I was about eleven years old. 
I'd be interested to hear from him. There are so many pseudos around taking 
his name in vain. 
- The Hipcrime Vocab by Chad C. Mulligan 
Technical Details
Message-ID: <77hruh$rsf$1@noc.wi.leidenuniv.nl>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <369C5151.534A8C34@ecn.nl>

Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit
X-Google-Thread: fb7d6,36984cdb4643c606
X-Google-Attributes: gidfb7d6,public
X-Google-Thread: 100a19,36984cdb4643c606
X-Google-Attributes: gid100a19,public
From: jdassen@wi.LeidenUniv.nl (J.H.M. Dassen (Ray))
Subject: Re: crypt() onder RedHat
Date: 1999/01/13
Message-ID: <77hruh$rsf$1@noc.wi.leidenuniv.nl>
X-Deja-AN: 432081213
References: <369C5151.534A8C34@ecn.nl>
X-Complaints-To: abuse@wi.leidenuniv.nl
X-Trace: noc.wi.leidenuniv.nl 916222737 28559 132.229.128.75 (13 Jan 1999 10:18:57 GMT)
Organization: Dept. of Math. & Comp. Sc., Leiden University, Leiden, the Netherlands
User-Agent: slrn/0.9.5.4 (UNIX)
NNTP-Posting-Date: 13 Jan 1999 10:18:57 GMT
Newsgroups: nl.comp.os.linux,be.comp.os.linux