From owner-freebsd-current Thu Sep 25 11:16:36 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id LAA03177 for current-outgoing; Thu, 25 Sep 1997 11:16:36 -0700 (PDT) Received: from roguetrader.com (brandon@cold.org [206.81.134.103]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id LAA03166 for ; Thu, 25 Sep 1997 11:16:30 -0700 (PDT) Received: from localhost (brandon@localhost) by roguetrader.com (8.8.5/8.8.5) with SMTP id MAA11146 for ; Thu, 25 Sep 1997 12:17:08 -0600 (MDT) Date: Thu, 25 Sep 1997 12:17:08 -0600 (MDT) From: Brandon Gillespie To: freebsd-current@freebsd.org Subject: where to place new crypt() files? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Currently, we maintain two seperate copies of the crypt library files, specifically at: Non-DES (i.e. MD5): lib/libcrypt/Makefile lib/libcrypt/crypt.c With-DES: secure/src/lib/libcrypt/Makefile secure/src/lib/libcrypt/README secure/src/lib/libcrypt/README.FreeBSD secure/src/lib/libcrypt/crypt-md5.c secure/src/lib/libcrypt/crypt.3 secure/src/lib/libcrypt/crypt.c secure/src/lib/libcrypt/test/ This is mainly because in the current code, the actual crypt() function varies. My new code wraps this, however, and calls sub-functions based off which crypt modules are available (i.e. crypt_des(), crypt_md5(), etc), so the tree is now: lib/libcrypt/Makefile lib/libcrypt/README lib/libcrypt/arc4random.3 lib/libcrypt/arc4random.c lib/libcrypt/blf.h lib/libcrypt/blowfish.3 lib/libcrypt/blowfish.c lib/libcrypt/crypt-blf.c lib/libcrypt/crypt-md5.c lib/libcrypt/crypt-shs.c lib/libcrypt/crypt.3 lib/libcrypt/crypt.c lib/libcrypt/crypt.h lib/libcrypt/des.3 lib/libcrypt/shs.3 lib/libcrypt/shs.c lib/libcrypt/shs.h lib/libcrypt/test/ And the file: lib/libcrypt/crypt-des.c In addition to the -DDES_CRYPT flag to make is all that is required to include DES crypt in the brew. I really don't think duplicating all of the above files in both lib/libcrypt and secure/src/lib/libcrypt is a good idea... Any suggestions? The cleanest solution (imho) would be to have secure/src/lib/libcrypt/[Makefile|crypt-des.c], and have the Makefile create a softlink from secure/src/lib/libcrypt/crypt-des.c to lib/libcrypt, then move to the lib/libcrypt directory and 'make -DDES_CRYPT' (the makefile in lib/libcrypt includes crypt-des.c and builds libdescrypt if the DES_CRYPT option is specified, otherwise it excludes crypt-des.c and builds libscrypt instead). -Brandon Gillespie (also for note... after I wrap this up I may go back and move the blowfish and shs code outside of the crypt library)