mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 09:10:28 +00:00
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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=279083
|
@ -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…
Reference in a new issue