diff options
author | Jeremy Allison <jra@samba.org> | 1998-06-16 18:25:36 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-06-16 18:25:36 +0000 |
commit | d23b44322570cb9a7aa2b86407bf4f91010a237b (patch) | |
tree | aaeb33c027c17d90ddd48986eb00cd80cba8f88c | |
parent | c63e679337221bbf15beca57249ff3306ebb0369 (diff) | |
download | samba-d23b44322570cb9a7aa2b86407bf4f91010a237b.tar.gz samba-d23b44322570cb9a7aa2b86407bf4f91010a237b.tar.xz samba-d23b44322570cb9a7aa2b86407bf4f91010a237b.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.
-rw-r--r-- | source/client/clitar.c | 4 | ||||
-rw-r--r-- | source/include/proto.h | 1 | ||||
-rw-r--r-- | source/lib/util.c | 19 | ||||
-rw-r--r-- | source/libsmb/clientgen.c | 3 | ||||
-rw-r--r-- | source/param/loadparm.c | 2 | ||||
-rw-r--r-- | source/rpc_parse/parse_net.c | 2 |
6 files changed, 8 insertions, 23 deletions
diff --git a/source/client/clitar.c b/source/client/clitar.c index 04d435eca7c..bd42c2677af 100644 --- a/source/client/clitar.c +++ b/source/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/source/include/proto.h b/source/include/proto.h index a5f029870af..1758301ef49 100644 --- a/source/include/proto.h +++ b/source/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/source/lib/util.c b/source/lib/util.c index 698edac5126..750ca0f3ab4 100644 --- a/source/lib/util.c +++ b/source/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/source/libsmb/clientgen.c b/source/libsmb/clientgen.c index 68bd3696069..093b3aedf9f 100644 --- a/source/libsmb/clientgen.c +++ b/source/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/source/param/loadparm.c b/source/param/loadparm.c index 21225410002..820479ae658 100644 --- a/source/param/loadparm.c +++ b/source/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/source/rpc_parse/parse_net.c b/source/rpc_parse/parse_net.c index 9b126681845..a5dfad9b7f7 100644 --- a/source/rpc_parse/parse_net.c +++ b/source/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; |