Imported Upstream version 1.4.16_pre1

This commit is contained in:
Jan Wagner 2013-11-26 23:58:53 +01:00
parent 047baae1ca
commit 212b4b8677
69 changed files with 10803 additions and 2698 deletions

View file

@ -58,7 +58,7 @@ char *ld_host = NULL;
char *ld_base = NULL;
char *ld_passwd = NULL;
char *ld_binddn = NULL;
int ld_port = DEFAULT_PORT;
int ld_port = -1;
#ifdef HAVE_LDAP_SET_OPTION
int ld_protocol = DEFAULT_PROTOCOL;
#endif
@ -247,7 +247,7 @@ process_arguments (int argc, char **argv)
{"help", no_argument, 0, 'h'},
{"version", no_argument, 0, 'V'},
{"timeout", required_argument, 0, 't'},
{"host", required_argument, 0, 'H'},
{"hostname", required_argument, 0, 'H'},
{"base", required_argument, 0, 'b'},
{"attr", required_argument, 0, 'a'},
{"bind", required_argument, 0, 'D'},
@ -341,7 +341,8 @@ process_arguments (int argc, char **argv)
case 'S':
if (! starttls) {
ssl_on_connect = TRUE;
ld_port = LDAPS_PORT;
if (ld_port == -1)
ld_port = LDAPS_PORT;
} else
usage_va(_("%s cannot be combined with %s"), "-S/--ssl", "-T/--starttls");
break;
@ -364,6 +365,9 @@ process_arguments (int argc, char **argv)
if (ld_base == NULL && argv[c])
ld_base = strdup (argv[c++]);
if (ld_port == -1)
ld_port = DEFAULT_PORT;
return validate_arguments ();
}