diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-10-18 17:49:41 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-10-18 17:49:41 +0200 |
commit | 33032d591f8e39edae0ce4b35ca1b6e25f04a04b (patch) | |
tree | c2a6bad2e09f49f8d6df4aeed9c1b77bad19b89f | |
parent | 4f9b6fdce4340a1022f659daaa035d0336ff6b53 (diff) | |
download | samba-33032d591f8e39edae0ce4b35ca1b6e25f04a04b.tar.gz samba-33032d591f8e39edae0ce4b35ca1b6e25f04a04b.tar.bz2 samba-33032d591f8e39edae0ce4b35ca1b6e25f04a04b.zip |
Move ufc to libreplace.
-rw-r--r-- | lib/replace/crypt.c (renamed from source3/lib/ufc.c) | 2 | ||||
-rw-r--r-- | lib/replace/crypt.m4 | 6 | ||||
-rw-r--r-- | lib/replace/libreplace.m4 | 1 | ||||
-rw-r--r-- | lib/replace/replace.h | 7 | ||||
-rw-r--r-- | source3/Makefile.in | 2 | ||||
-rw-r--r-- | source3/configure.in | 6 | ||||
-rw-r--r-- | source3/include/proto.h | 4 |
7 files changed, 16 insertions, 12 deletions
diff --git a/source3/lib/ufc.c b/lib/replace/crypt.c index 89329808c9..22341ce511 100644 --- a/source3/lib/ufc.c +++ b/lib/replace/crypt.c @@ -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 index 0000000000..5a9fe88aaf --- /dev/null +++ b/lib/replace/crypt.m4 @@ -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" ]) diff --git a/lib/replace/libreplace.m4 b/lib/replace/libreplace.m4 index e563acfd79..05e73fb569 100644 --- a/lib/replace/libreplace.m4 +++ b/lib/replace/libreplace.m4 @@ -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])]) diff --git a/lib/replace/replace.h b/lib/replace/replace.h index 4ac77e7270..57ebeb5d2f 100644 --- a/lib/replace/replace.h +++ b/lib/replace/replace.h @@ -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 */ diff --git a/source3/Makefile.in b/source3/Makefile.in index c880f79eb5..1a607c463d 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -334,7 +334,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 \ diff --git a/source3/configure.in b/source3/configure.in index 9388ebabc0..ce1c422bd1 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -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 diff --git a/source3/include/proto.h b/source3/include/proto.h index ba84574653..c4c89b0448 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1190,10 +1190,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); |