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)
#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;
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);
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.
{
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));
}
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
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;