curl-library
Re: SBUF_SIZE in ftp.c too small
Date: Fri, 30 Jan 2009 21:04:05 -0000
"Daniel Stenberg" <daniel_at_haxx.se> wrote in message
news:alpine.DEB.1.10.0901210946340.11163_at_yvahk2.pbagnpgbe.fr...
> On Tue, 20 Jan 2009, Markus Moeller wrote:
>
>> I wanted to use the GSSAPI auth option of ftp and noticed it doesn't work
>> with Active Directory as Kerberos key distribution centre because the
>> ticket is much bigger than 1024 bytes after base64 encoding. Can it be
>> set to CURL_MAX_WRITE_SIZE.
>>
>> /* may still not be big enough for some krb5 tokens */
>> #define SBUF_SIZE 1024
>
> I think a 16K buffer is a tad bit much to use on the stack, so I would
> then prefer some kind of allocated buffer for such a thing. The fact that
> everything else works fine with 1K today hints that larger buffers are
> rarely needed.
If you use Kerberos with AD a normal bas 64 ticket is > 1600 bytes and if
the user is a member of 100s of groups which is not anusual it gets still
much bigger.
ADAT
YIIEsQYJKoZIhvcSAQICAQBuggSgMIIEnKADAgEFoQMCAQ6iBwMFACAAAACjggPCYYIDvjCCA7qgAwIBBaEOGwxTT0xBUklTLkhPTUWiKjAooAMCAQOhITAfGwNmdHAbGG9wZW5zb2xhcmlzLnNvbGFyaXMuaG9tZaOCA3UwggNxoAMCARehAwIBBKKCA2MEggNfaTVpI7r4eBZcq41o7b9jk1NHrj2OCTf2aU8lszwvF1G3UQCMg9AMNJJAJZb+peb4ENR0x1ifJbevnL+HiMGxGATKqPLOId3imKYIlHqBbGzX7755dObpy1mPgSezeslMahJx9F8cMhLivremOlBA9RW0XxayIbXqb3myQMtJ+z6ZDOIZUq3FRR765AqsNsEUov+Ftfw7TD9mABdSjxBOvjQvRMvrzTTRzim2VPTZx4J+nKWFQNtv/LXhur4agP7/vcbk1EVavdE0ZXLvHMdSBAkcurWFoOXjTSx5FJAj0EU6Mo1EqRk9+08A57UWkLRCyt0UbcgLZlSTBKFOOeGUtlFqqFrPOzXMWSVP/0H80nkwFkBIN1jXc4VO033R0HKsn3VjxVUOPxXF6EgdxNsZUeY/KFB0EWdJxEGCliuQzGaxdEkw/yqEl3fuKRUtUxMBDDBaly8Ycj2VZeEril2fqQNpWPKS2pOeoSS6OznFiN/2dHGYvPdqGc596DsLkl5ZkqXblvKwuUNk9/ql1vXYr1J/qAYzPVs55iaTZYu+ZAZ2nHy/ooHpmh9w6FiPthTBdqDagrvBMXzzlCGDPgJvX8jOv+jjx2ISXwvmOrzMoLxXuijRvpuwmIGsk5YSbbdDfIamtxD7P+51nY8NQetPEg+Z+dQfC0t5iC+n8f5UR03CFXAGXCIwYtr979G2zziNZ6QzHOpzUapuwd1kt2HChsRQiHBk9lk13Wb1cKhsZO7/fE8jmAHbjvkL+dssyah164CYltgvbZTsC50F8rgv89acN!
jzePKLB1pJaycViZ4sRfWLgeW3KRFFpxDr2hKTTfD41nSEh9uvhEKBfFrJgkzpAgOn95CRFeniWH4e3MLCKBmIP3rygfXTUZTCOZATcAUvdp6hCUmYpO/gdotbvZ/m7Mfxe9XDfjRrYiee+HIUmuNdwrtOlCxqN6ngYqmPbHWJ0rn8Vv//WixHsG80Y14tPJd+slnfRNZOK9BjGRrjZznSGflYAJSPNi6AG7PLr85D6ydriH+Y0/1EinAI1WpkjEO9V88YgyddNAWbiDlJKVpZG70iUzi6q5qqdsT3Fi0Kp61udGMB4fctWgeXaBofNA36plqPZCIVwglnnkzTmnCA9SDa+mbxG+ohrUmKkgcAwgb2gAwIBF6KBtQSBslw+fnW5CH0y9KCckNsB2Gu+qojA9ApiyEtaovQ/FTcidyRlTD5jhRXZvWIZseaZpWxWbeWjrdClFumosOUxadi0JxEyEQTF+bPFy56xdNWYy/rHCgDZ39GO+3NG46jXO7Okl1ahxfOsXzEuIia0xvVnXPglY5vAlOD9I/7vsAWec+b55NXJ6slybGjKb5A3YaIyvDDX0k1had6bu+xW8CNB9rVFo2bgtuHdPDRA8jb07y8=
So maybe only for the ADAT command you allocate the required buffer.
>
> I wonder if perhaps the ->uploadbuffer struct member couldn't be re-used
> for this purpose...
>
> --
>
> / daniel.haxx.se
>
Markus
Received on 2009-01-30