Strip EOL whitespace in usr.sbin/{jail,jexec}

This commit is contained in:
Ed Maste 2017-11-10 14:53:16 +00:00
parent 4b109912f1
commit 72130735d8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=325664
4 changed files with 8 additions and 8 deletions

View File

@ -432,7 +432,7 @@ run_command(struct cfjail *j)
argv[argc] = down ? "-alias" : "alias"; argv[argc] = down ? "-alias" : "alias";
argv[argc + 1] = NULL; argv[argc + 1] = NULL;
break; break;
#endif #endif
case IP_VNET_INTERFACE: case IP_VNET_INTERFACE:
@ -603,13 +603,13 @@ run_command(struct cfjail *j)
bg = 1; bg = 1;
} }
comcs = alloca(comstring->len + 1); comcs = alloca(comstring->len + 1);
strcpy(comcs, comstring->s); strcpy(comcs, comstring->s);
argc = 0; argc = 0;
for (cs = strtok(comcs, " \t\f\v\r\n"); cs; for (cs = strtok(comcs, " \t\f\v\r\n"); cs;
cs = strtok(NULL, " \t\f\v\r\n")) cs = strtok(NULL, " \t\f\v\r\n"))
argc++; argc++;
argv = alloca((argc + 1) * sizeof(char *)); argv = alloca((argc + 1) * sizeof(char *));
strcpy(comcs, comstring->s); strcpy(comcs, comstring->s);
argc = 0; argc = 0;
for (cs = strtok(comcs, " \t\f\v\r\n"); cs; for (cs = strtok(comcs, " \t\f\v\r\n"); cs;
cs = strtok(NULL, " \t\f\v\r\n")) cs = strtok(NULL, " \t\f\v\r\n"))

View File

@ -483,7 +483,7 @@ and uname -K.
Some restrictions of the jail environment may be set on a per-jail Some restrictions of the jail environment may be set on a per-jail
basis. basis.
With the exception of With the exception of
.Va allow.set_hostname .Va allow.set_hostname
and and
.Va allow.reserved_ports , .Va allow.reserved_ports ,
these boolean parameters are off by default. these boolean parameters are off by default.
@ -614,7 +614,7 @@ Sockets within a jail are normally restricted to IPv4, IPv6, local
(UNIX), and route. This allows access to other protocol stacks that (UNIX), and route. This allows access to other protocol stacks that
have not had jail functionality added to them. have not had jail functionality added to them.
.It Va allow.reserved_ports .It Va allow.reserved_ports
The jail root may bind to ports lower than 1024. The jail root may bind to ports lower than 1024.
.El .El
.El .El
.Pp .Pp

View File

@ -94,7 +94,7 @@ static const enum intparam startcommands[] = {
IP_MOUNT_DEVFS, IP_MOUNT_DEVFS,
IP_MOUNT_FDESCFS, IP_MOUNT_FDESCFS,
IP_MOUNT_PROCFS, IP_MOUNT_PROCFS,
IP_EXEC_PRESTART, IP_EXEC_PRESTART,
IP__OP, IP__OP,
IP_VNET_INTERFACE, IP_VNET_INTERFACE,
IP_EXEC_START, IP_EXEC_START,
@ -269,7 +269,7 @@ main(int argc, char **argv)
&sysval, &sysvallen, NULL, 0) == 0) &sysval, &sysvallen, NULL, 0) == 0)
add_param(NULL, NULL, add_param(NULL, NULL,
perm_sysctl[pi].ipnum, perm_sysctl[pi].ipnum,
(sysval ? 1 : 0) ^ (sysval ? 1 : 0) ^
perm_sysctl[pi].rev perm_sysctl[pi].rev
? NULL : "false"); ? NULL : "false");
} }

View File

@ -187,5 +187,5 @@ usage(void)
fprintf(stderr, "%s\n", fprintf(stderr, "%s\n",
"usage: jexec [-l] [-u username | -U username] jail [command ...]"); "usage: jexec [-l] [-u username | -U username] jail [command ...]");
exit(1); exit(1);
} }