Bug 220163 - Allowed characters in UFS volume labels using /sbin/newfs
Summary: Allowed characters in UFS volume labels using /sbin/newfs
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 11.0-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-fs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-20 17:53 UTC by Keve Nagy
Modified: 2017-06-26 17:55 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Keve Nagy 2017-06-20 17:53:08 UTC
The official FreeBSD memstick image contains an UFS volume labelled "FreeBSD_Install", and such a volume shows up under /dev/ufs/FreeBSD_Install nicely.

Try to create such an UFS volume using "newfs -L 'FreeBSD_Install' /dev/da0s1" and it will fail, claiming that the underscore is not allowed in the label.

If underscores are valid characters for use in an UFS label then newfs needs to be fixed to accept them.
If underscores are NOT valid characters for use in an UFS label then official FreeBSD install media SHOULD NOT be distributed using such labels, because it is a bad example.

Affects 11.0-RELEASE + 10.3-RELEASE, probably more.
This is a low priority issue, but it should be clarified sooner or later because at its current state this is inconsistent and confusing. Although, very likely NOT many people lose sleep over this. :)

Regards,
Keve Nagy * Debrecen * Hungary
Comment 1 commit-hook freebsd_committer freebsd_triage 2017-06-20 21:26:54 UTC
A commit references this bug:

Author: mckusick
Date: Tue Jun 20 21:26:42 UTC 2017
New revision: 320176
URL: https://svnweb.freebsd.org/changeset/base/320176

Log:
  Allow '_' in labels when specifying -L to newfs.

  Reported by: Keve Nagy
  Reviewed by: kib
  PR: 220163
  MFC after: 5 days

Changes:
  head/sbin/newfs/newfs.c
Comment 2 Kirk McKusick freebsd_committer freebsd_triage 2017-06-20 21:30:45 UTC
Change made to allow '_' in labels when specifying -L to newfs.

Will be MFC'ed to 10 in five days and to 11 when allowed by re@.
Comment 3 Keve Nagy 2017-06-20 23:44:47 UTC
Looks like the issue I reported has already been identified and fixed.
We are just waiting for the patch to make its way to 10.x and 11.x releases.

It seems like I can change the status to closed. I just don't know if I am allowed to do so. I'd better let somebody else do it, as there may be more administration to be performed.
Comment 4 Conrad Meyer freebsd_committer freebsd_triage 2017-06-20 23:49:25 UTC
I think Kirk will close the PR after he MFCs it to 10 and 11.  Thanks for the report, Keve.
Comment 5 Kirk McKusick freebsd_committer freebsd_triage 2017-06-21 07:42:04 UTC
Indeed, I will close it once the MFCs have happened.
Comment 6 commit-hook freebsd_committer freebsd_triage 2017-06-26 17:29:48 UTC
A commit references this bug:

Author: mckusick
Date: Mon Jun 26 17:29:32 UTC 2017
New revision: 320365
URL: https://svnweb.freebsd.org/changeset/base/320365

Log:
  MFC of 320176:

  Allow '_' in labels when specifying -L to newfs.

  PR: 220163
  Reported by: Keve Nagy
  Reviewed by: kib
  Approved by: re@ (Xin Li)

Changes:
_U  stable/11/
  stable/11/sbin/newfs/newfs.c
Comment 7 commit-hook freebsd_committer freebsd_triage 2017-06-26 17:33:54 UTC
A commit references this bug:

Author: mckusick
Date: Mon Jun 26 17:33:33 UTC 2017
New revision: 320366
URL: https://svnweb.freebsd.org/changeset/base/320366

Log:
  MFC of 320176:

  Allow '_' in labels when specifying -L to newfs.

  PR: 220163
  Reported by: Keve Nagy
  Reviewed by: kib

Changes:
_U  stable/10/
  stable/10/sbin/newfs/newfs.c
Comment 8 Kirk McKusick freebsd_committer freebsd_triage 2017-06-26 17:55:02 UTC
This fix has now been MFC'ed to 10 and 11 and should appear in 11.1.