1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-09 20:23:51 +03:00

r17984: Ensure we never indirect a null opt_username if it wasn't

specified.
Jeremy.
This commit is contained in:
Jeremy Allison
2006-09-01 04:41:03 +00:00
committed by Gerald (Jerry) Carter
parent c097e10739
commit 5d9bb91ab7

View File

@@ -811,6 +811,11 @@ static void manage_client_ntlmssp_request(enum stdio_helper_mode stdio_helper_mo
NTSTATUS nt_status;
BOOL first = False;
if (!opt_username || !*opt_username) {
x_fprintf(x_stderr, "username must be specified!\n\n");
exit(1);
}
if (strlen(buf) < 2) {
DEBUG(1, ("NTLMSSP query [%s] invalid", buf));
x_fprintf(x_stdout, "BH\n");
@@ -1506,6 +1511,11 @@ static void manage_gss_spnego_client_request(enum stdio_helper_mode stdio_helper
SPNEGO_DATA spnego;
ssize_t len;
if (!opt_username || !*opt_username) {
x_fprintf(x_stderr, "username must be specified!\n\n");
exit(1);
}
if (strlen(buf) <= 3) {
DEBUG(1, ("SPNEGO query [%s] too short\n", buf));
x_fprintf(x_stdout, "BH\n");