summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-06-16 18:25:36 +0000
committerJeremy Allison <jra@samba.org>1998-06-16 18:25:36 +0000
commitbbd7ca65e706457f5dbc046e83b4bd8cdde5be8f (patch)
tree49c88c02e70e23012ee37b34bc4f47e6a963cee8
parentc2e2e691ebece45f0dc3226ce1e5a61d1bb9fbce (diff)
downloadsamba-bbd7ca65e706457f5dbc046e83b4bd8cdde5be8f.tar.gz
samba-bbd7ca65e706457f5dbc046e83b4bd8cdde5be8f.tar.bz2
samba-bbd7ca65e706457f5dbc046e83b4bd8cdde5be8f.zip
clientgen: Added USE_SSL for client shutdown.
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)
-rw-r--r--source3/client/clitar.c4
-rw-r--r--source3/include/proto.h1
-rw-r--r--source3/lib/util.c19
-rw-r--r--source3/libsmb/clientgen.c3
-rw-r--r--source3/param/loadparm.c2
-rw-r--r--source3/rpc_parse/parse_net.c2
6 files changed, 8 insertions, 23 deletions
diff --git a/source3/client/clitar.c b/source3/client/clitar.c
index 04d435eca7..bd42c2677a 100644
--- a/source3/client/clitar.c
+++ b/source3/client/clitar.c
@@ -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;
diff --git a/source3/include/proto.h b/source3/include/proto.h
index a5f029870a..1758301ef4 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -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);
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 698edac512..750ca0f3ab 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -5017,25 +5017,6 @@ int unistrcpy(char *dst, char *src)
}
/*******************************************************************
-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.
********************************************************************/
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 68bd369606..093b3aedf9 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -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));
}
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 2122541000..820479ae65 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -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
diff --git a/source3/rpc_parse/parse_net.c b/source3/rpc_parse/parse_net.c
index 9b12668184..a5dfad9b7f 100644
--- a/source3/rpc_parse/parse_net.c
+++ b/source3/rpc_parse/parse_net.c
@@ -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;