Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 211119 - samba-3.0.28 has hard-coded, small timout for smbclient
Summary: samba-3.0.28 has hard-coded, small timout for smbclient
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-22 16:03 UTC by Michael Stowe
Modified: 2023-07-25 00:57 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Updates timeout in libsmbclient (3.0.28-timeout-1.patch,529 bytes, patch)
2008-02-22 16:04 UTC, Michael Stowe
Details | Diff
Updates timeout in clientgen.c (3.0.28-timeout-2.patch,486 bytes, patch)
2008-02-22 16:05 UTC, Michael Stowe
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Stowe 2008-02-22 16:03:21 UTC
smbclient has a hard-coded timeout of 20 seconds, which causes issues with BackupPC, where smbclient must content with large files and antivirus programs delaying communications.  This does not appear to be settable anywhere but the code.

Reproducible: Always

Steps to Reproduce:
1. Use smbclient to retrieve sets of files where the time exceeds 20 seconds to transfer
2.
3.




There are simple patches to just make the timeout larger.  Inelegant, perhaps, but it doesn't appear to have any negative effects:

--- a/source/libsmb/libsmbclient.c      2008-02-11 21:20:43.098639092 +0000
+++ b/source/libsmb/libsmbclient.c      2008-02-11 21:17:25.699305245 +0000
@@ -6247,7 +6247,7 @@

         /* ADD REASONABLE DEFAULTS */
         context->debug            = 0;
-        context->timeout          = 20000; /* 20 seconds */
+        context->timeout          = 220000; /* 220 seconds */

        context->options.browse_max_lmb_count      = 3;    /* # LMBs to query */
        context->options.urlencode_readdir_entries = False;/* backward compat */

=====

--- a/source/libsmb/clientgen.c 2008-02-11 21:20:53.309363205 +0000
+++ b/source/libsmb/clientgen.c 2008-02-11 21:18:21.300357582 +0000
@@ -303,7 +303,7 @@
        cli->mid = 1;
        cli->vuid = UID_FIELD_INVALID;
        cli->protocol = PROTOCOL_NT1;
-       cli->timeout = 20000; /* Timeout is in milliseconds. */
+       cli->timeout = 220000; /* Timeout is in milliseconds. */
        cli->bufsize = CLI_BUFFER_SIZE+4;
        cli->max_xmit = cli->bufsize;
        cli->outbuf = (char *)SMB_MALLOC(cli->bufsize+SAFETY_MARGIN);
Comment 1 Michael Stowe 2008-02-22 16:04:55 UTC
Created attachment 144343 [details, diff]
Updates timeout in libsmbclient
Comment 2 Michael Stowe 2008-02-22 16:05:26 UTC
Created attachment 144344 [details, diff]
Updates timeout in clientgen.c
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2008-02-22 17:09:21 UTC
Similar stuff belongs upstream and not to Gentoo; thanks.

https://bugzilla.samba.org/