clientgen: Added USE_SSL for client shutdown.
authorJeremy Allison <jra@samba.org>
Tue, 16 Jun 1998 18:25:36 +0000 (18:25 +0000)
committerJeremy Allison <jra@samba.org>
Tue, 16 Jun 1998 18:25:36 +0000 (18:25 +0000)
clitar.c: Added 'Samba style' comments before string_create_s().
loadparm.c: Fixed missing comma in SSL code.
util.c: Removed string_create_s(). Currently it's only called from
        clitar.c and having it here as well as a static in clitar
        causes the compile to break (Richard, please decide where
        you want this function).
lib/rpc/parse/parse_net.c: Fix from <anders.blomdell@control.lth.se>
                           to stop coredump on missing parameter.
Jeremy.
(This used to be commit d23b44322570cb9a7aa2b86407bf4f91010a237b)

source3/client/clitar.c
source3/include/proto.h
source3/lib/util.c
source3/libsmb/clientgen.c
source3/param/loadparm.c
source3/rpc_parse/parse_net.c

index 04d435eca7cffa3a2c31a5fc040678da45ecb7d8..bd42c2677affe13ef88ea35e4edef0e007e2a0bd 100644 (file)
@@ -190,7 +190,9 @@ static BOOL sub_dir(char *dir1, char *dir2)
 
 #endif /* Removed to get around gcc 'defined but not used' error. */
 
-/* Create a string of size size+1 (for the null) */
+/*******************************************************************
+Create  a string of size size+1 (for the null)
+*******************************************************************/
 static char * string_create_s(int size)
 {
   char *tmp;
index a5f029870afcfbe1148f5ca37f10a3a1c303ce8d..1758301ef49f5fa9a1f3f6a82d5056dba5a47114 100644 (file)
@@ -2102,7 +2102,6 @@ int struni2(uint16 *p, char *buf);
 char *unistr(char *buf);
 int unistrncpy(char *dst, char *src, int len);
 int unistrcpy(char *dst, char *src);
-char *string_create_s(int size);
 char *safe_strcpy(char *dest, char *src, int maxlength);
 char *safe_strcat(char *dest, char *src, int maxlength);
 char *align4(char *q, char *base);
index 698edac5126465a28ebf52a6e76df7087ebcd342..750ca0f3ab4b91fa174b40ef52c142a60e80b5f8 100644 (file)
@@ -5016,25 +5016,6 @@ int unistrcpy(char *dst, char *src)
        return num_wchars;
 }
 
-/*******************************************************************
-Create  a string of size size+1 (for the null)
-*******************************************************************/
-char *string_create_s(int size)
-{
-  char *tmp;
-
-  tmp = (char *)malloc(size+1);
-
-  if (tmp == NULL) {
-
-    DEBUG(0, ("Out of memory in string_create_s\n"));
-
-  }
-
-  return(tmp);
-
-}
-
 /*******************************************************************
 safe string copy into a known length string. maxlength does not
 include the terminating zero.
index 68bd3696069869ea2f27817fd12f9d352e639942..093b3aedf9f50c1b3fcf9c9a9ad04a09860838a2 100644 (file)
@@ -1718,6 +1718,9 @@ void cli_shutdown(struct cli_state *cli)
 {
        if (cli->outbuf) free(cli->outbuf);
        if (cli->inbuf) free(cli->inbuf);
+#ifdef USE_SSL
+    if (cli->fd != -1) sslutil_disconnect(cli->fd);
+#endif /* USE_SSL */
        if (cli->fd != -1) close(cli->fd);
        memset(cli, 0, sizeof(*cli));
 }
index 21225410002cb374ba89ec09fc07115170d713e5..820479ae6585cb48dc4813d38a5eabe44c037af1 100644 (file)
@@ -449,7 +449,7 @@ static struct enum_list enum_case[] = {{CASE_LOWER, "lower"}, {CASE_UPPER, "uppe
 static struct enum_list enum_lm_announce[] = {{0, "False"}, {1, "True"}, {2, "Auto"}, {-1, NULL}};
 
 #ifdef USE_SSL
-static struct enum_list enum_ssl_version[] = {{SMB_SSL_V2, "ssl2"}, {SMB_SSL_V3, "ssl3"}
+static struct enum_list enum_ssl_version[] = {{SMB_SSL_V2, "ssl2"}, {SMB_SSL_V3, "ssl3"},
   {SMB_SSL_V23, "ssl2or3"}, {SMB_SSL_TLS1, "tls1"}, {-1, NULL}};
 #endif
 
index 9b126681845ab2896bbc8bf1905fbc0bd34440b8..a5dfad9b7f7aaef62294824a0df88a070ddcf92f 100644 (file)
@@ -554,7 +554,7 @@ static int make_dom_sid2s(char *sids_str, DOM_SID2 *sids, int max_sids)
        pstring s2;
        int count;
 
-       DEBUG(4,("make_dom_sid2s: %s\n", sids_str));
+       DEBUG(4,("make_dom_sid2s: %s\n", sids_str ? sids_str:""));
 
        if (sids_str == NULL || *sids_str == 0) return 0;