mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
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 d23b443225
)
This commit is contained in:
parent
c2e2e691eb
commit
bbd7ca65e7
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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.
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user