Browse files

Compile on Mac OS X. Supports DES only.

Seriously. man 3 crypt.
  • Loading branch information...
1 parent b9247fa commit b311d6ebfa45ef7608c159e4a5959f86b582c2fe @msantos committed Jan 14, 2010
Showing with 14 additions and 6 deletions.
  1. +6 −5 Makefile
  2. +8 −1 README
@@ -5,14 +5,15 @@ APP=crypt
#Mac OS X: use "-m64" for a 64-bit erlang
-#FLAGS=$(ARCH) -O3 -fPIC -bundle -flat_namespace -undefined suppress -fno-common -lcrypt
+# By default, use the system crypt(3), which is DES only
+FLAGS=$(ARCH) -O3 -fPIC -bundle -flat_namespace -undefined suppress -fno-common
# Linux
-FLAGS=-fPIC -shared -lcrypt
+#FLAGS=-fPIC -shared -lcrypt
CFLAGS=-g -Wall
@@ -10,16 +10,23 @@ Eshell V5.7.4 (abort with ^G)
+Which algorithms are supported by crypt are dependent on the system
+crypt(3) library. For example, Mac OS X only supports DES (booooooo!!!!).
1. What is the maximum password and salt length?
There doesn't appear to be a limit. DES has an 8 character limit and
-MD5 has a 255 character limit, but for the other types, no idea.
+MD5 has a 256 character limit, but for the other types, no idea.
sysconf(_SC_PASS_MAX) seems to return the limit on Solaris, but isn't
available on Ubuntu.
2. Provide an erlang version of the crypt() interface.
+3. For systems that don't support MD5, maybe use openssl (see in
+openssl dist: apps/passwd.c).

0 comments on commit b311d6e

Please sign in to comment.