Commit Graph

104 Commits

Author SHA1 Message Date
Baptiste Daroussin
6b129086dc Convert libraries to use LIBADD
While here reduce a bit overlinking
2014-11-25 11:07:26 +00:00
Dag-Erling Smørgrav
e4978d34f2 Change the hardcoded default back from SHA512 to DES.
PR:		192277
MFC after:	3 days
2014-10-09 16:45:11 +00:00
Enji Cooper
4207570add Add LIBCRYPT to DPADD, remove LDFLAGS from LDADD, and sort the Makefile variables
This fixes "make checkdpadd"

Phabric: D620
Approved by: jmmv (mentor)
PR: 192729
MFC after: 5 days
2014-08-18 17:35:39 +00:00
Baptiste Daroussin
2b7af31cf5 use .Mt to mark up email addresses consistently (part3)
PR:		191174
Submitted by:	Franco Fichtner  <franco at lastsummer.de>
2014-06-23 08:23:05 +00:00
Hajimu UMEMOTO
0cb06892fa Don't break the legacy applications which set
just 2 bytes to salt.

MFC after:	1 week
2014-05-28 16:50:18 +00:00
Warner Losh
c6063d0da8 Use src.opts.mk in preference to bsd.own.mk except where we need stuff
from the latter.
2014-05-06 04:22:01 +00:00
Dag-Erling Smørgrav
5280a31478 r261913 broke DES passwords, because the only way they could work,
since they don't have an easily recognizable signature, was if they
were the default.  This commit rewrites crypt_set_format(3) etc to
address this:

 - Use a pointer instead of an index to identify the default format.
   This pointer is initialized at compile time to point to the first
   first element in the list of supported formats, eliminating the
   need for crypt_setdefault().  Using a pointer also simplifies
   iterating through the list.

 - Associate DES with the magic string "_", which takes care of the
   Extended DES format.

 - Finally, as a special case, if the salt does not match any known
   magic string but matches ^[./0-9A-Za-z]{13}$, it is assumed to be a
   DES password and is passed on to crypt_des().

MFC after:	1 week
2014-04-26 11:50:25 +00:00
John-Mark Gurney
8083f14fc2 replace the kernel's version w/ cperciva's implementation... In all
my tests, it is faster ~20%, even on an old IXP425 533MHz it is ~45%
faster...  This is partly due to loop unrolling, so the code size does
significantly increase...  I do plan on committing a version that
rolls up the loops again for smaller code size for embedded systems
where size is more important than absolute performance (it'll save ~6k
code)...

The kernel implementation is now shared w/ userland's libcrypt and
libmd...

We drop support for sha256 from sha2.c, so now sha2.c only contains
sha384 and sha512...

Reviewed by:	secteam@
2014-03-16 01:43:23 +00:00
Julio Merino
f5fd950e35 Make bsd.test.mk the only public mk fragment for the building of tests.
Change {atf,plain,tap}.test.mk to be internal implementation details of
bsd.test.mk.  Makefiles that build tests should now only include bsd.test.mk
and declaratively specify what they want to build, without worrying about
the internal implementation of the mk files.

The reason for this change is to permit building test programs of different
interfaces from a single directory, which is something I had a need for
while porting tests over from src/tools/regression/.

Additionally, this change makes it possible to perform some other requested
changes to bsd.test.mk in an easier manner.  Coming soon.
2014-03-14 08:56:19 +00:00
John-Mark Gurney
41f554961d various formating fixes, use NUL for NUL bytes..
drop out dated perf numbers (can't imagine people are still running
Pentium MMX 166's anymore)...

bump date...

drop max length of salt of 8 since _PASSWORD_LEN is now large, 128..
and state the max length of the salt depends upon the module,
sha-{256,512} have a max salt of 16..

recommend 8 characters of salt instead of just 2...

MFC after:	1 week
2014-03-09 07:45:59 +00:00
Dag-Erling Smørgrav
e401beb723 Switch the hardcoded default hash function from MD5 / DES to SHA512. 2014-02-15 10:53:44 +00:00
Rui Paulo
e2197f8018 Set up the /usr/tests hierarchy.
Populate /usr/tests with the only test programs that currently live
in the tree (those in lib/libcrypt/tests/) and add all the build
machinery to accompany this change.

In particular:

- Add a WITHOUT_TESTS variable that users can define to request that
  no tests be put in /usr/tests.
- Add a top-level Kyuafile for /usr/tests and a way to create similar
  Kyuafiles in top-level subdirectories.
- Add a BSD.tests.dist file to define the directory layout of
  /usr/tests.

Submitted by:	Julio Merino jmmv google.com
Reviewed by:	sjg
MFC after:	2 weeks
2013-10-25 05:25:19 +00:00
Rui Paulo
d4a14c8563 Clearly split the logic to build ATF and plain tests apart.
This change introduces a new plain.test.mk file that provides the build
infrastructure to build test programs that don't use any framework.
Most of the code previously in bsd.test.mk moves to plain.test.mk and
atf.test.mk is extended with the missing pieces.

In doing so, this change pushes all test program building logic to the
various *.test.mk files instead of trying to reuse some tiny bits.
In fact, this attempt to reuse some definitions makes the code harder
to read and harder to extend.

The clear benefit of this is that the interface of bsd.test.mk is now
clearly delimited.

Submitted by:	Julio Merino jmmv google.com
MFC after:	2 weeks
2013-10-19 06:48:49 +00:00
Rui Paulo
ec0e2ac611 Remove most of the ATF tools and the _atf user.
This is necessary because ATF is deprecated and it will be replaced by Kyua.

Submitted by:	jmmv@netbsd.org
Reviewed by:	Garrett Cooper
Approved by:	re
2013-10-12 06:06:53 +00:00
Simon J. Gerraty
62b43b7f0d Simple unit-tests for libcrypt, to show how easy it is.
Approved by:	marcel (mentor)
2012-11-07 22:03:59 +00:00
Dag-Erling Smørgrav
a0ee974f0b Stop using auth_getval() now that it always returns NULL. Instead,
hardcode the default to what it would be if we didn't hardcode it,
i.e. DES if supported and MD5 otherwise.

MFC after:	3 weeks
2012-06-12 17:14:19 +00:00
Joel Dahl
9ee2158b55 mdoc: minor Bl improvements. 2012-06-02 08:47:26 +00:00
Eitan Adler
b54c79e15f Make the item numbers match the crypt magic number
PR:		docs/166497
Submitted by:	Mike Kelly <pioto@pioto.org>
Approved by:	cperciva
MFC after:	1 week
2012-04-11 14:12:28 +00:00
Joel Dahl
41949a1ed5 Remove superfluous paragraph macro. 2012-03-25 12:13:24 +00:00
David E. O'Brien
ad45dd4174 s/shaN_crypt/crypt_shaN/g to be a more consistent with the existing naming.
Reviewed by:	markm
2011-05-05 01:09:42 +00:00
David E. O'Brien
ce8679e47d Protect the reachover built symbols after the SHA256/512 crypt(3) addition. 2011-04-27 21:33:56 +00:00
Mark Murray
a5c28e29e2 Document SHA256/512 modes.
MFC after:	1 month
2011-04-09 14:09:46 +00:00
Mark Murray
3d6f63c046 Add SHA256/512 ($5$ and $6$) to crypt(3). Used in linux-world, doesn't
hurt us.

PR:		misc/124164
Submitted by:	KIMURA Yasuhiro < yasu utahime org >
MFC after:	1 month
2011-04-09 14:02:04 +00:00
Ed Schouten
daaf575910 Build lib/ with WARNS=6 by default.
Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and
lower it when needed.

I'm setting WARNS?=0 for secure/. It seems secure/ includes the
Makefile.inc provided by lib/. I'm not going to touch that directory.
Most of the code there is contributed anyway.
2010-01-02 09:58:07 +00:00
Ken Smith
3ca3047aee Bump the version of all non-symbol-versioned shared libraries in
preparation for 8.0-RELEASE.  Add the previous version of those
libraries to ObsoleteFiles.inc and bump __FreeBSD_Version.

Reviewed by:    kib
Approved by:    re (rwatson)
2009-07-19 17:25:24 +00:00
Daniel Eischen
419ecd5dee Bump library versions in preparation for 7.0.
Ok'd by:	kan
2007-05-21 02:49:08 +00:00
Ceri Davies
adde36d27a cipher(3) is gone.
MFC after:	3 days
2007-04-04 14:04:55 +00:00
Ruslan Ermilov
fcaa466865 Provide alternate default for SHLIBDIR before bsd.own.mk does this.
Reported by:	phk
2006-03-18 11:01:06 +00:00
Ruslan Ermilov
e1fe3dba5c Reimplementation of world/kernel build options. For details, see:
http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html

The src.conf(5) manpage is to follow in a few days.

Brought to you by:	imp, jhb, kris, phk, ru (all bugs are mine)
2006-03-17 18:54:44 +00:00
Ken Smith
a84020c2b9 Bump the shared library version number of all libraries that have not
been bumped since RELENG_5.

Reviewed by:	ru
Approved by:	re (not needed for commit check but in principle...)
2005-07-22 17:19:05 +00:00
Ruslan Ermilov
6b806d21d1 Fixed the misplaced $FreeBSD$. 2005-02-09 18:07:17 +00:00
Ruslan Ermilov
24a0682c64 Sort sections. 2005-01-20 09:17:07 +00:00
Ruslan Ermilov
a216173556 NOCRYPT -> NO_CRYPT 2004-12-21 10:16:04 +00:00
Ruslan Ermilov
a35d88931c For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 15:33:08 +00:00
Ruslan Ermilov
1a0a934547 Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
Gordon Tetlow
41d8423f71 Stage 3 of dynamic root support. Make all the libraries needed to run
binaries in /bin and /sbin installed in /lib. Only the versioned files
reside in /lib, the .so symlink continues to live /usr/lib so the
toolchain doesn't need to be modified.
2003-08-17 08:28:46 +00:00
Philippe Charnier
e4f2c10b4c The .Fn function 2003-06-08 10:20:32 +00:00
Mark Murray
d8e82636a4 Tidy the code up a fraction. Re-release with a 2-clause BSD license
with the kind permission of the author/copyright holder.

Thanks to:	phk
2003-06-02 21:43:14 +00:00
Mark Murray
bf513f6958 Add a new hash type. This "NT-hash" is compatible with the password
hashing scheme used in Microsoft's NT machines. IT IS NOT SECURE!
DON'T USE IT! This is for the use of competent sysadmins only!

Submitted by:	Michael Bretterklieber
2003-06-02 19:29:27 +00:00
Dag-Erling Smørgrav
7691f66abf Retire the useless NOSECURE knob.
Approved by:	re (scottl)
2003-05-19 15:52:01 +00:00
Jens Schweikhardt
57bd0fc6e8 english(4) police. 2002-12-27 12:15:40 +00:00
Tom Rhodes
96f68db50b crypt(3) incorrectly documents md5 salt, fixed.
PR:	36782
No objections from:	ru
MFC after:	3 days
2002-04-09 22:32:59 +00:00
Poul-Henning Kamp
fe681e1955 Fix grammer in comment.
Submitted by:	Engin Gunduz <engin@ripe.net>
2002-03-25 15:55:36 +00:00
Poul-Henning Kamp
adf75add2d Modernize my email-address. 2002-03-25 13:48:53 +00:00
Mark Murray
bbf177c2a9 Darn. There is (now was) a signed/unsigned issue that resulted in a
very long loop.

Reported by:	nnd@mail.nsk.ru (Nickolay Dudorov)
2002-03-07 10:41:11 +00:00
Mark Murray
f2ac424af7 No functional change, but big code cleanup. WARNS, lint(1) and style(9). 2002-03-06 17:18:09 +00:00
Ruslan Ermilov
3ea75eb1a1 s/crypt_format/crypt_default/ to match reality.
PR:		docs/32787
Spotted by:	Pete Carah <pete@altadena.net>
2001-12-13 08:05:32 +00:00
Ruslan Ermilov
32eef9aeb1 mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
Matthew Dillon
e67f5b9fca Implement __FBSDID() 2001-09-16 21:35:07 +00:00
Mark Murray
b30a6aedc2 Remove out-of-date "cannot be exported from USA" notice. 2001-08-15 20:25:16 +00:00