Merge branch 'master' of ssh://git.samba.org/data/git/samba into crypt
authorJelmer Vernooij <jelmer@samba.org>
Sun, 19 Oct 2008 12:27:08 +0000 (14:27 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 19 Oct 2008 12:27:08 +0000 (14:27 +0200)
lib/replace/crypt.c [moved from source3/lib/ufc.c with 99% similarity]
lib/replace/crypt.m4 [new file with mode: 0644]
lib/replace/libreplace.m4
lib/replace/replace.h
source3/Makefile.in
source3/configure.in
source3/include/proto.h

similarity index 99%
rename from source3/lib/ufc.c
rename to lib/replace/crypt.c
index 89329808c98730f60943bca3f3bb963af3f83c43..22341ce511d53a668aa72484140482c434566e15 100644 (file)
@@ -16,7 +16,7 @@
 
 */
 
-#include "includes.h"
+#include "replace.h"
 
 #ifndef HAVE_CRYPT
 
diff --git a/lib/replace/crypt.m4 b/lib/replace/crypt.m4
new file mode 100644 (file)
index 0000000..5a9fe88
--- /dev/null
@@ -0,0 +1,6 @@
+###############################################
+# test for where we get crypt() from
+AC_SEARCH_LIBS(crypt, [crypt],
+  [test "$ac_cv_search_crypt" = "none required" || CRYPT_LIBS="-lcrypt"
+  AC_DEFINE(HAVE_CRYPT,1,[Whether the system has the crypt() function])],
+  [ LIBREPLACEOBJ="${LIBREPLACEOBJ} crypt.o" ])
index e563acfd794c2aee249a41ee1beb3a3d79f916ff..05e73fb5697d82bca4651eab4526a7ba77ab6146 100644 (file)
@@ -276,6 +276,7 @@ m4_include(strptime.m4)
 m4_include(win32.m4)
 m4_include(timegm.m4)
 m4_include(repdir.m4)
+m4_include(crypt.m4)
 
 AC_CHECK_FUNCS([syslog printf memset memcpy],,[AC_MSG_ERROR([Required function not found])])
 
index 4ac77e72702542024f19b7ab088b94ec673845ee..57ebeb5d2f09dfa02b43a1259dbdd2cae789c3d3 100644 (file)
@@ -628,4 +628,11 @@ typedef int bool;
 #define MAX_DNS_NAME_LENGTH 256 /* Actually 255 but +1 for terminating null. */
 #endif
 
+#ifndef HAVE_CRYPT
+char *ufc_crypt(const char *key, const char *salt);
+#define crypt ufc_crypt
+#else
+#include <crypt.h>
+#endif
+
 #endif /* _LIBREPLACE_REPLACE_H */
index 1b86c95c137c9891fb271ad613b9116f1d1b4172..12d37ce6b03e58e3e1c3f66942f9f9178bacfa6b 100644 (file)
@@ -336,7 +336,7 @@ LIB_OBJ = $(LIBSAMBAUTIL_OBJ) $(UTIL_OBJ) $(CRYPTO_OBJ) \
          $(VERSION_OBJ) lib/charcnv.o lib/debug.o lib/fault.o \
          lib/interface.o lib/pidfile.o \
          lib/system.o lib/sendfile.o lib/recvfile.o lib/time.o \
-         lib/ufc.o lib/genrand.o lib/username.o \
+         lib/genrand.o lib/username.o \
          lib/util_pw.o lib/access.o lib/smbrun.o \
          lib/bitmap.o lib/dprintf.o $(UTIL_REG_OBJ) \
          lib/wins_srv.o \
index 9388ebabc01081d9c77447eab621d4e456686686..ce1c422bd1e15191a5985dac8482ea98f3a711c8 100644 (file)
@@ -4318,12 +4318,6 @@ AC_ARG_WITH(pam_smbpass,
 )
 
 
-###############################################
-# test for where we get crypt() from
-AC_SEARCH_LIBS(crypt, [crypt],
-  [test "$ac_cv_search_crypt" = "none required" || AUTH_LIBS="-lcrypt $AUTH_LIBS"
-  AC_DEFINE(HAVE_CRYPT,1,[Whether the system has the crypt() function])])
-
 ##
 ## moved after the check for -lcrypt in order to
 ## ensure that the necessary libraries are included
index 156e66d4dced03bcf3e8b25b8151739a04f2fa11..18bbd11ab93bff5bacc70ad5988d4c69bdbd8f5b 100644 (file)
@@ -1184,10 +1184,6 @@ const char *time_to_asc(const time_t t);
 const char *display_time(NTTIME nttime);
 bool nt_time_is_set(const NTTIME *nt);
 
-/* The following definitions come from lib/ufc.c  */
-
-char *ufc_crypt(const char *key,const char *salt);
-
 /* The following definitions come from lib/username.c  */
 
 char *get_user_home_dir(TALLOC_CTX *mem_ctx, const char *user);