diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-06-19 01:23:31 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-06-19 01:23:31 -0500 |
commit | 951f353db8f89fdf6949744ae807c43c336b6ba0 (patch) | |
tree | ea03675528cfdc69e4ac70999c818addf463e0fb /servers/auth_server_lin/src/auth_conn.cpp | |
parent | 0c68d7df3940b19ef5690a6ee26cede4e25adf2d (diff) | |
download | ulab-951f353db8f89fdf6949744ae807c43c336b6ba0.tar.gz ulab-951f353db8f89fdf6949744ae807c43c336b6ba0.zip |
Remove artificial buffer size limitation on Kerberos client socket
Diffstat (limited to 'servers/auth_server_lin/src/auth_conn.cpp')
-rw-r--r-- | servers/auth_server_lin/src/auth_conn.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/servers/auth_server_lin/src/auth_conn.cpp b/servers/auth_server_lin/src/auth_conn.cpp index 517f570..acf8e83 100644 --- a/servers/auth_server_lin/src/auth_conn.cpp +++ b/servers/auth_server_lin/src/auth_conn.cpp @@ -105,7 +105,6 @@ void AuthSocket::send_sasl_data_to_network(const char *buffer, unsigned length, char *buf; unsigned len, alloclen; int result; - char txbuf[NET_SEC_BUF_SIZE]; alloclen = ((length / 3) + 1) * 4 + 1; buf = (char*)malloc(alloclen); @@ -120,8 +119,10 @@ void AuthSocket::send_sasl_data_to_network(const char *buffer, unsigned length, return; } - sprintf(txbuf, "%s\n", buf); - write(netfd, txbuf, strlen(txbuf)); + len = strlen(buf); + buf[len] = '\n'; + buf[len+1] = 0; + write(netfd, buf, len+1); free(buf); } |