fixes for OSF1 compilation
authorAndrew Tridgell <tridge@samba.org>
Fri, 13 Nov 1998 03:37:01 +0000 (03:37 +0000)
committerAndrew Tridgell <tridge@samba.org>
Fri, 13 Nov 1998 03:37:01 +0000 (03:37 +0000)
(This used to be commit 5be3c37f50eac35cad3eadf0d24e7a4ee04c075e)

source3/client/client.c
source3/include/includes.h
source3/rpc_parse/parse_rpc.c
source3/smbwrapper/smbw.c
source3/ubiqx/debugparse.c
source3/utils/debug2html.c
source3/utils/smbpasswd.c

index 4d6154778b3a6ea972f0c9271075b94177fea86f..fb7e09f24110e58ceab07462bdfedd15c1fc2270 100644 (file)
@@ -188,7 +188,7 @@ static void send_message(void)
                int l=0;
                int c;
 
-               ZERO_STRUCT(msg);
+               ZERO_ARRAY(msg);
 
                for (l=0;l<maxlen && (c=fgetc(stdin))!=EOF;l++) {
                        if (c == '\n')
index 6c7a67afef223a1f5cf6e7d5f943f15613680076..213053b0ec0a030e2d61f125259d2f419c2be195 100644 (file)
@@ -587,6 +587,7 @@ union semun {
 #endif
 
 #if defined (HAVE_NETGROUP) && defined(HAVE_RPCSVC_YPCLNT_H)
+#include "rpcsvc/yp_prot.h"
 #include "rpcsvc/ypclnt.h"
 #endif
 
index 6b5da0ef56cf0f86d7cb552c872eba1f643c8453..3bf017d25e03d495419b4266fece22be975a74a3 100644 (file)
@@ -702,8 +702,8 @@ void make_rpc_auth_ntlmssp_resp(RPC_AUTH_NTLMSSP_RESP *rsp,
 
        rsp->neg_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))
        {
index 42979bcf0047d366cff14b21b3e6c156711c3cb9..7c857652344dec4dba98e23e75cfba5da27ebba4 100644 (file)
@@ -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;
index dff8197a8ada8bec92ac96dee856bc5b89f78cb1..5da5280f19ed5ae8c0b8d509279b1782b9fe1d86 100644 (file)
 /* -------------------------------------------------------------------------- **
  * 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++ )
       {
index 00c6306fcfd1c9926e399afcb05bb389fd151ba7..fa2be4133662bf276a1beec10ace71c11aeafe1a 100644 (file)
@@ -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( "  <TITLE>Samba Debug Output</TITLE>\n</HEAD>\n\n<BODY>\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++ )
       {
index 2adb6d95238201da9f5100c45388df2f7e73c314..a96a1c0f7beac2be6396d593829a260a58545816 100644 (file)
@@ -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);