summaryrefslogtreecommitdiff
path: root/source/utils
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1997-09-14 16:37:18 +0000
committerAndrew Tridgell <tridge@samba.org>1997-09-14 16:37:18 +0000
commitdb917c62c14315afe6f0745a8097c1bca25cbf07 (patch)
tree6628a1429b830fabe83671c0f811cb0fb5318a17 /source/utils
parentc2bc073a878179dd56db97c66dc957d42fe0b81b (diff)
downloadsamba-db917c62c14315afe6f0745a8097c1bca25cbf07.tar.gz
This commit does 3 main things:
1) put the encryption code in by default, with no #ifdef. It is still disabled by default so you need to add "encrypt passwords = yes" in smb.conf but at least all binaries will have it. 2) cleanup the kanji code so it compiles with no warnings 3) get rid of lots of uses of ugly non-portable C code. The main offender being things like "register" but also remove uses of the "const" keyword as there are compilers out there that don't support it and even those that do often complain about its usage. Users don't like warnings :-( There is still some work to do. We need to replace the md4 code with our own implementation. The current code (from rfc1186) is PD but is not very portable. The new RFC (rfc1320) is more portable but adds copyright restrictions. I'll do a from-scratch MD4 soon. We also need to test that what I've implemented is portable. It should be, but I'm too tired right now to test it on anything other than intel linux.
Diffstat (limited to 'source/utils')
-rw-r--r--source/utils/make_smbcodepage.c6
-rw-r--r--source/utils/smbpasswd.c14
2 files changed, 3 insertions, 17 deletions
diff --git a/source/utils/make_smbcodepage.c b/source/utils/make_smbcodepage.c
index c8b4fea8bc1..b4cb1523349 100644
--- a/source/utils/make_smbcodepage.c
+++ b/source/utils/make_smbcodepage.c
@@ -28,7 +28,7 @@ static char *prog_name = NULL;
* Print program usage and die.
*/
-void codepage_usage(const char *progname)
+void codepage_usage(char *progname)
{
fprintf(stderr, "Usage is : %s [c|d] <codepage> <inputfile> <outputfile>\n",
progname);
@@ -162,7 +162,7 @@ void parse_error(char *buf, char *msg)
* Create a compiled codepage file from a codepage definition file.
*/
-int do_compile(int codepage, const char *input_file, const char *output_file)
+int do_compile(int codepage, char *input_file, char *output_file)
{
FILE *fp = NULL;
uint32 size = 0;
@@ -307,7 +307,7 @@ definition file. File %s has %d.\n", prog_name, input_file, num_lines);
* Placeholder for now.
*/
-int do_decompile( int codepage, const char *input_file, const char *output_file)
+int do_decompile( int codepage, char *input_file, char *output_file)
{
uint32 size = 0;
struct stat st;
diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c
index 92abce8d8fc..bbcefa6b180 100644
--- a/source/utils/smbpasswd.c
+++ b/source/utils/smbpasswd.c
@@ -1,5 +1,3 @@
-#ifdef SMB_PASSWD
-
/*
* Unix SMB/Netbios implementation. Version 1.9. smbpasswd module. Copyright
* (C) Jeremy Allison 1995-1997.
@@ -20,7 +18,6 @@
*/
#include "includes.h"
-#include "des.h"
/* Static buffers we will return. */
static struct smb_passwd pw_buf;
@@ -569,14 +566,3 @@ Error was %d. Password file may be corrupt ! Please examine by hand !\n",
return 0;
}
-#else
-
-#include "includes.h"
-
-int
-main(int argc, char **argv)
-{
- printf("smb password encryption not selected in Makefile\n");
- return 0;
-}
-#endif