mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
ntlm_auth: Parse configfile after parsing it's location, not before.
This commit is contained in:
@ -2322,7 +2322,8 @@ enum {
|
|||||||
{ "use-cached-creds", 0, POPT_ARG_NONE, &use_cached_creds, OPT_USE_CACHED_CREDS, "Use cached credentials if no password is given"},
|
{ "use-cached-creds", 0, POPT_ARG_NONE, &use_cached_creds, OPT_USE_CACHED_CREDS, "Use cached credentials if no password is given"},
|
||||||
{ "diagnostics", 0, POPT_ARG_NONE, &diagnostics, OPT_DIAGNOSTICS, "Perform diagnostics on the authentictaion chain"},
|
{ "diagnostics", 0, POPT_ARG_NONE, &diagnostics, OPT_DIAGNOSTICS, "Perform diagnostics on the authentictaion chain"},
|
||||||
{ "require-membership-of", 0, POPT_ARG_STRING, &require_membership_of, OPT_REQUIRE_MEMBERSHIP, "Require that a user be a member of this group (either name or SID) for authentication to succeed" },
|
{ "require-membership-of", 0, POPT_ARG_STRING, &require_membership_of, OPT_REQUIRE_MEMBERSHIP, "Require that a user be a member of this group (either name or SID) for authentication to succeed" },
|
||||||
POPT_COMMON_SAMBA
|
POPT_COMMON_CONFIGFILE
|
||||||
|
POPT_COMMON_VERSION
|
||||||
POPT_TABLEEND
|
POPT_TABLEEND
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -2330,14 +2331,6 @@ enum {
|
|||||||
load_case_tables();
|
load_case_tables();
|
||||||
|
|
||||||
dbf = x_stderr;
|
dbf = x_stderr;
|
||||||
|
|
||||||
/* Samba client initialisation */
|
|
||||||
|
|
||||||
if (!lp_load(get_dyn_CONFIGFILE(), True, False, False, True)) {
|
|
||||||
d_fprintf(stderr, "ntlm_auth: error opening config file %s. Error was %s\n",
|
|
||||||
get_dyn_CONFIGFILE(), strerror(errno));
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Parse options */
|
/* Parse options */
|
||||||
|
|
||||||
@ -2350,6 +2343,18 @@ enum {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
while((opt = poptGetNextOpt(pc)) != -1) {
|
||||||
|
/* Get generic config options like --configfile */
|
||||||
|
}
|
||||||
|
|
||||||
|
poptFreeContext(pc);
|
||||||
|
|
||||||
|
if (!lp_load(get_dyn_CONFIGFILE(), True, False, False, True)) {
|
||||||
|
d_fprintf(stderr, "ntlm_auth: error opening config file %s. Error was %s\n",
|
||||||
|
get_dyn_CONFIGFILE(), strerror(errno));
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
pc = poptGetContext(NULL, argc, (const char **)argv, long_options,
|
pc = poptGetContext(NULL, argc, (const char **)argv, long_options,
|
||||||
POPT_CONTEXT_KEEP_FIRST);
|
POPT_CONTEXT_KEEP_FIRST);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user