Bug 15347 - duplicate popt 'value' in smbclient
Summary: duplicate popt 'value' in smbclient
Status: RESOLVED INVALID
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Tools (show other bugs)
Version: 4.18.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Andreas Schneider
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-30 20:32 UTC by Andrew Bartlett
Modified: 2023-04-03 10:02 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Bartlett 2023-03-30 20:32:46 UTC
.longName   = "send-buffer",
			.shortName  = 'b',
			.argInfo    = POPT_ARG_INT,
			.arg        = &io_bufsize,
			.val        = 'b',
			.descrip    = "Changes the transmit/send buffer",
			.argDescrip = "BYTES",
		},
		{
			.longName   = "timeout",
			.shortName  = 't',
			.argInfo    = POPT_ARG_INT,
			.arg        = &io_timeout,
			.val        = 'b',
			.descrip    = "Changes the per-operation timeout",
			.argDescrip = "SECONDS",

b is used for both.
Comment 1 Andreas Schneider 2023-04-01 22:15:23 UTC
I don't know what's the issue. argInfo is set to POPT_ARG_INT so val should just be not 0. You can set it to 1 if you want.
Comment 2 Andrew Bartlett 2023-04-02 09:00:55 UTC
OK, I knew they had to be unique for the callbacks, so assumed this might matter. 

(I was debugging a different issue, only seen so far on the 4.15.13 SLES 15.4, where -c was ignored (!), and noticed this).
Comment 3 Andreas Schneider 2023-04-03 10:02:25 UTC
We have sanity checks in place for developer builds, see:

https://gitlab.com/samba-team/samba/-/blob/master/lib/cmdline/cmdline.c#L294