🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: nl.comp.os.linux
7 messages
7 total messages Started by Voetelink D. Wed, 13 Jan 1999 00:00
crypt() onder RedHat
#159
Author: Voetelink D.
Date: Wed, 13 Jan 1999 00:00
36 lines
1494 bytes
Hiya

Ik ben een beetje bezig met wat programeerwerk onder gcc, en ik zit met
een probleem.

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. Als ik 't
compileer op een slackware-machine, dan gaat alles goed....

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 ?!?

Groet

Dennis
-- 
*****************************************************************************

Dennis Voetelink
Energy Research Foundation
Petten, Netherlands

email : voetelink@ecn.nl

upgrade: replacing old bugs with new ones......

*****************************************************************************
Re: crypt() onder RedHat
#152
Author: Johan Wevers
Date: Wed, 13 Jan 1999 00:00
31 lines
1884 bytes
Ivo Schooneman  <ivo_away@usa.net> wrote:

>Crypt is een programma dat amerika niet uitmag.
>Het is ter bescherming van de data in dat land.
>In de europese linux pakket zit het dus niet.

Dan heb ik zeker de Amerikaanse gekregen:

vulcan:/lib# objdump -l --dynamic-syms libc.so.5 | grep crypt
00013ad0 g    DF .text  000000ba cbc_crypt
00013b90 g    DF .text  00000042 ecb_crypt
00014410 g    DF .text  000003dd _des_crypt
0004b4f0 g    DF .text  0000008b key_encryptsession
0004bcd0 g    DF .text  0000005f xdr_cryptkeyres
0004bbe0 g    DF .text  00000066 xdr_cryptkeyarg
0004b580 g    DF .text  0000008b key_decryptsession
0004b610 g    DF .text  0000009b key_encryptsession_pk
0004bc50 g    DF .text  00000076 xdr_cryptkeyarg2
0004b6b0 g    DF .text  0000009b key_decryptsession_pk
0008c84c g    DO .data  00000004 __key_encryptsession_pk_LOCAL
0008c850 g    DO .data  00000004 __key_decryptsession_pk_LOCAL
0004d290 g    DF .text  000000b2 xencrypt
0004d350 g    DF .text  000000b2 xdecrypt
0007ac90 g    DF .text  00000090 crypt
0007ad20 g    DF .text  00000090 fcrypt
0007adb0 g    DF .text  00000a71 encrypt
 
-- 
ir. J.C.A. Wevers       // For Physics and science fiction information:
johanw@vulcan.xs4all.nl // http://www.xs4all.nl/~johanw/index.html
Finger johanw@xs4all.nl for my PGP public key.  PGP-KeyID: 0xD42F80B1
Re: crypt() onder RedHat
#160
Author: Ivo Schooneman
Date: Wed, 13 Jan 1999 00:00
55 lines
2307 bytes
Crypt is een programma dat amerika niet uitmag.
Het is ter bescherming van de data in dat land.
In de europese linux pakket zit het dus niet.
Er zijn wel vervangers maar welke weet ik niet.
Vraag een amerikaan het op de mail te dumpen of zoek naar het neefje van
crypt.

"Voetelink D." wrote:
> 
> Hiya
> 
> Ik ben een beetje bezig met wat programeerwerk onder gcc, en ik zit met
> een probleem.
> 
> 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. Als ik 't
> compileer op een slackware-machine, dan gaat alles goed....
> 
> 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 ?!?
> 
> Groet
> 
> Dennis
> --
> *****************************************************************************
> 
> Dennis Voetelink
> Energy Research Foundation
> Petten, Netherlands
> 
> email : voetelink@ecn.nl
> 
> upgrade: replacing old bugs with new ones......
> 
> *****************************************************************************

-- 
          ___/^\___               __MM__
             o o                   O-O/
  ------o0O--(_)--O0o---------o0O--(_)--O0o------
 /     Naam     : Ivo Schooenman                 \
/      Homepage : www.euronet.nl/users/pozorjed   \
\      E-Mail   : Ivo_Schooneman@usa.net          /
 \     A/S/L    : 18/Male/Dutch                  /
  -----------------------------------------------
Re: crypt() onder RedHat
#161
Author: Ruud de Rooij
Date: Wed, 13 Jan 1999 00:00
26 lines
1400 bytes
"Voetelink D." <voetelink@ecn.nl> writes:

> Ik ben een beetje bezig met wat programeerwerk onder gcc, en ik zit met
> een probleem.
> 
> 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. Als ik 't
> compileer op een slackware-machine, dan gaat alles goed....
> 
> 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 ?!?

In glibc bevindt de crypt functie zich in een aparte library:

gcc ... -lcrypt

	- Ruud de Rooij.
Re: crypt() onder RedHat
#162
Author: A.van.Kessel
Date: Wed, 13 Jan 1999 00:00
24 lines
1572 bytes
Wat er wel niet/wel in de includefiles staat is niet belangrijk,
de objects die aangelinkt worden komen uit de libraries.

De crypt functie komt hoort volgens mij gewoon in libc.a // libc.so te zitten.
Formeel gesproken mag de DES encryptie de USA niet verlaten, dus misschien
dat ze hem expres weggelaten hebben.

Met objdump of met ar kan je kijken wat er wel in de library
zit (of in welke lib hij wel zit) . Met wat handigheid kan je hem evt uit
een andere distributie halen en aan jouw lib toevoegen. 

Als de login/passwd commando wel werken, moet ie wel in libc.so zitten.

NB mijn man 3 page crypt vermeldt ook een POSIX encrypt() functie.
Misschien is die er wel ?

-- 
Happy hacking,

Adriaan van Kessel.
Ingres DBA, C/Unix hacker
Email: Adriaan.van.Kessel@rivm.nl
(remove NotThere. from the address in the header)
*** Nederlandstalige zachtwaar is een pijn in de aars ***
Re: crypt() onder RedHat
#163
Author: 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 
Re: crypt() onder RedHat
#153
Author: Boudewijn W. Ch. Visser
Date: Thu, 14 Jan 1999 00:00
22 lines
1376 bytes
johanw@vulcan.xs4all.nl (Johan Wevers) writes:

>Ivo Schooneman  <ivo_away@usa.net> wrote:

>>Crypt is een programma dat amerika niet uitmag.
>>Het is ter bescherming van de data in dat land.
>>In de europese linux pakket zit het dus niet.

>Dan heb ik zeker de Amerikaanse gekregen:

Het is dan ook een beetje onzin dat crypt het land niet uitmag.
crypt is in de normale functie een hash algorithme, en dus niet
(direct) bruikbaar als encryptie.

hash algoritmes mogen wel gewoon geexporteerd worden.

Boudewijn
-- 
+--------------------------------------------------------------+
|Boudewijn Visser        | E-mail:visser@ph.tn.tudelft.nl      |           
| -finger for PGP-keys.- | http://www.ph.tn.tudelft.nl/~visser |
+-- my own opinions etc ---------------------------------------+
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads