From 2db96e3047400be594e7c5ebf7d6fcedb77f6907 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 13 Nov 1998 03:37:01 +0000 Subject: fixes for OSF1 compilation (This used to be commit 5be3c37f50eac35cad3eadf0d24e7a4ee04c075e) --- source3/client/client.c | 2 +- source3/include/includes.h | 1 + source3/rpc_parse/parse_rpc.c | 4 ++-- source3/smbwrapper/smbw.c | 6 ++++++ source3/ubiqx/debugparse.c | 10 +++++----- source3/utils/debug2html.c | 9 ++++++--- source3/utils/smbpasswd.c | 4 ++-- 7 files changed, 23 insertions(+), 13 deletions(-) diff --git a/source3/client/client.c b/source3/client/client.c index 4d6154778b..fb7e09f241 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -188,7 +188,7 @@ static void send_message(void) int l=0; int c; - ZERO_STRUCT(msg); + ZERO_ARRAY(msg); for (l=0;lneg_flags = neg_flags; - memcpy(&rsp->lm_resp, lm_resp, 24); - memcpy(&rsp->nt_resp, nt_resp, 24); + memcpy(rsp->lm_resp, lm_resp, 24); + memcpy(rsp->nt_resp, nt_resp, 24); if (IS_BITS_SET_ALL(neg_flags, NTLMSSP_NEGOTIATE_UNICODE)) { diff --git a/source3/smbwrapper/smbw.c b/source3/smbwrapper/smbw.c index 42979bcf00..7c85765234 100644 --- a/source3/smbwrapper/smbw.c +++ b/source3/smbwrapper/smbw.c @@ -341,6 +341,12 @@ int smbw_path(const char *path) char *cwd; int len; + /* this is needed to prevent recursion with the BSD malloc which + opens /etc/malloc.conf on the first call */ + if (strncmp(path,"/etc/", 5) == 0) { + return 0; + } + smbw_init(); len = strlen(smbw_prefix)-1; diff --git a/source3/ubiqx/debugparse.c b/source3/ubiqx/debugparse.c index dff8197a8a..5da5280f19 100644 --- a/source3/ubiqx/debugparse.c +++ b/source3/ubiqx/debugparse.c @@ -34,12 +34,12 @@ /* -------------------------------------------------------------------------- ** * Constants... * - * BSIZE - This internal constant is used only by dbg_test(). It is the + * DBG_BSIZE - This internal constant is used only by dbg_test(). It is the * size of the read buffer. I've tested the function using a - * BSIZE value of 2. + * DBG_BSIZE value of 2. */ -#define BSIZE 128 +#define DBG_BSIZE 128 /* -------------------------------------------------------------------------- ** * Functions... @@ -258,14 +258,14 @@ void dbg_test( void ) * ------------------------------------------------------------------------ ** */ { - char bufr[BSIZE]; + char bufr[DBG_BSIZE]; int i; int linecount = 1; dbg_Token old = dbg_null, new = dbg_null, state = dbg_null; - while( fgets( bufr, BSIZE, stdin ) ) + while( fgets( bufr, DBG_BSIZE, stdin ) ) { for( i = 0; bufr[i]; i++ ) { diff --git a/source3/utils/debug2html.c b/source3/utils/debug2html.c index 00c6306fcf..fa2be41336 100644 --- a/source3/utils/debug2html.c +++ b/source3/utils/debug2html.c @@ -29,6 +29,9 @@ * -------------------------------------------------------------------------- ** * * $Log: debug2html.c,v $ + * Revision 1.4 1998/11/13 03:37:01 tridge + * fixes for OSF1 compilation + * * Revision 1.3 1998/10/28 20:33:35 crh * I've moved the debugparse module files into the ubiqx directory because I * know that 'make proto' will ignore them there. The debugparse.h header @@ -61,7 +64,7 @@ * The size of the read buffer. */ -#define BSIZE 1024 +#define DBG_BSIZE 1024 /* -------------------------------------------------------------------------- ** * Functions... @@ -219,7 +222,7 @@ int main( int argc, char *argv[] ) { int i; int len; - char bufr[BSIZE]; + char bufr[DBG_BSIZE]; dbg_Token old = dbg_null, new = dbg_null, state = dbg_null, @@ -230,7 +233,7 @@ int main( int argc, char *argv[] ) (void)printf( " Samba Debug Output\n\n\n\n" ); while( (!feof( stdin )) - && ((len = fread( bufr, 1, BSIZE, stdin )) > 0) ) + && ((len = fread( bufr, 1, DBG_BSIZE, stdin )) > 0) ) { for( i = 0; i < len; i++ ) { diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c index 2adb6d9523..a96a1c0f7b 100644 --- a/source3/utils/smbpasswd.c +++ b/source3/utils/smbpasswd.c @@ -153,7 +153,7 @@ static char *stdin_new_passwd(void) static fstring new_passwd; size_t len; - ZERO_STRUCT(new_passwd); + ZERO_ARRAY(new_passwd); /* * if no error is reported from fgets() and string at least contains @@ -194,7 +194,7 @@ static char *prompt_for_new_password(BOOL stdin_get) char *p; fstring new_passwd; - ZERO_STRUCT(new_passwd); + ZERO_ARRAY(new_passwd); p = get_pass("New SMB password:", stdin_get); -- cgit