Author: kevans Date: Tue Jan 16 20:14:31 2018 New Revision: 328060 URL: https://svnweb.freebsd.org/changeset/base/328060
Log: service(8): Reset OPTIND properly now that we're parsing args twice r328032 introduced a second round of argument parsing to proxy the request through to a jail as needed, but failed to reset OPTIND before getting to the second round of parsing to allow other flags to be set. Reported by: Oleg Ginzburg <olevole olevole ru> Modified: head/usr.sbin/service/service.sh Modified: head/usr.sbin/service/service.sh ============================================================================== --- head/usr.sbin/service/service.sh Tue Jan 16 20:02:07 2018 (r328059) +++ head/usr.sbin/service/service.sh Tue Jan 16 20:14:31 2018 (r328060) @@ -79,6 +79,7 @@ if [ -n "$JAIL" ]; then exit $? fi +OPTIND=1 while getopts ${accepted_argstr} COMMAND_LINE_ARGUMENT ; do case "${COMMAND_LINE_ARGUMENT}" in e) ENABLED=eopt ;; _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"