Bug 200895 - ctld does not allow '@' in path
Summary: ctld does not allow '@' in path
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.1-STABLE
Hardware: Any Any
: --- Affects Many People
Assignee: Edward Tomasz Napierala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-16 04:37 UTC by harrison
Modified: 2015-08-03 07:30 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description harrison 2015-06-16 04:37:30 UTC
I am trying to use ctld for iscsi targets and I have zfs volumes on the backend.   These zfs volumes create deviced under /dev/zvol/<path> with an '@' to denote the snapshot name.   ctl.conf does not appear to support the '@' which appear to be a bug.

With '@' within a target path
root@pinta:/etc # service ctld onestart
Starting ctld.
ctld: /etc/ctl.conf is world-readable
ctld: error in configuration file at line 22 near '@': syntax error
ctld: configuration error; exiting
/etc/rc.d/ctld: WARNING: failed to start ctld

With '@' using '\@' within a target path
Starting ctld.
ctld: /etc/ctl.conf is world-readable
ctld: error in configuration file at line 22 near '\134': syntax error
ctld: configuration error; exiting
/etc/rc.d/ctld: WARNING: failed to start ctld
root@pinta:/etc #
Comment 1 commit-hook freebsd_committer 2015-06-18 10:18:45 UTC
A commit references this bug:

Author: trasz
Date: Thu Jun 18 10:17:48 UTC 2015
New revision: 284542
URL: https://svnweb.freebsd.org/changeset/base/284542

Log:
  Allow '@' in unquoted strings, such as with the "path" statement.  Note
  that one can use any character they like by using double quotes.

  PR:		200895
  MFC after:	2 weeks
  Sponsored by:	The FreeBSD Foundation

Changes:
  head/usr.sbin/ctld/token.l
Comment 2 commit-hook freebsd_committer 2015-08-03 07:28:44 UTC
A commit references this bug:

Author: trasz
Date: Mon Aug  3 07:28:24 UTC 2015
New revision: 286220
URL: https://svnweb.freebsd.org/changeset/base/286220

Log:
  MFC r284542:

  Allow '@' in unquoted strings, such as with the "path" statement.  Note
  that one can use any character they like by using double quotes.

  PR:		200895
  Sponsored by:	The FreeBDS Foundation

Changes:
_U  stable/10/
  stable/10/usr.sbin/ctld/token.l