As the password option is gone, code needs to be able to read password
from user parameter when user%password syntax is used.
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
case POPT_ARG_STRING:
stringdata = (char **)long_options[i].arg;
*stringdata = SMB_STRDUP(val);
+ if (long_options[i].shortName == 'U') {
+ char *p;
+ opt.username_specified = true;
+ p = strchr(*stringdata, '%');
+ if (p != NULL) {
+ *p = '\0';
+ opt.password = p + 1;
+ opt.password_specified = true;
+ }
+ }
break;
default:
fprintf(stderr, "Invalid variable %s at "