Fix the logic for skipping parameters (with -s) that have "jailsys"
parents (such as host.hostname); these were being skipped all the time. That it went this long without anyone noticing is a sign that this feature isn't actually used by anyone, but it's there so it might as well work. MFC after: 1 week
This commit is contained in:
parent
b300bd470f
commit
b687b02ffc
@ -78,7 +78,7 @@ static void quoted_print(char *str);
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
char *dot, *ep, *jname;
|
||||
char *dot, *ep, *jname, *pname;
|
||||
int c, i, jflags, jid, lastjid, pflags, spc;
|
||||
|
||||
jname = NULL;
|
||||
@ -178,10 +178,11 @@ main(int argc, char **argv)
|
||||
for (i = 0; i < nparams; i++) {
|
||||
if ((params[i].jp_flags & JP_USER) &&
|
||||
(dot = strchr(params[i].jp_name, '.'))) {
|
||||
*dot = 0;
|
||||
param_parent[i] = add_param(params[i].jp_name,
|
||||
pname = alloca((dot - params[i].jp_name) + 1);
|
||||
strlcpy(pname, params[i].jp_name,
|
||||
(dot - params[i].jp_name) + 1);
|
||||
param_parent[i] = add_param(pname,
|
||||
NULL, (size_t)0, NULL, JP_OPT);
|
||||
*dot = '.';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user