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);
Created attachment 144343 [details, diff] Updates timeout in libsmbclient
Created attachment 144344 [details, diff] Updates timeout in clientgen.c
Similar stuff belongs upstream and not to Gentoo; thanks. https://bugzilla.samba.org/