Bug 152084 - [patch] pw(8) does not allow @ or ! in gecos
Summary: [patch] pw(8) does not allow @ or ! in gecos
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 1.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: David Bright
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-09 18:30 UTC by jschauma
Modified: 2018-05-26 02:51 UTC (History)
1 user (show)

See Also:
dab: mfc-stable11+
dab: mfc-stable10+


Attachments
file.diff (421 bytes, patch)
2010-11-09 18:30 UTC, jschauma
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jschauma 2010-11-09 18:30:11 UTC
pw(8) does not allow you to add a user with a ! or a @ in the gecos field.  I have not been able to find any standard mentioning these as invalid characters, nor do various other unix flavors implement this restriction.

How-To-Repeat: pw user add -n name -u uid -g gid -d dir -s shell -c"Something with an @ in it"
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:03 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 2 David Bright freebsd_committer freebsd_triage 2018-02-21 15:32:58 UTC
This isn't strictly a duplicate, but is closely related to bug #210187.
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-03-01 17:48:00 UTC
A commit references this bug:

Author: dab
Date: Thu Mar  1 17:47:29 UTC 2018
New revision: 330245
URL: https://svnweb.freebsd.org/changeset/base/330245

Log:
  Allow the "@" and "!" characters in passwd file GECOS fields.

  Two PRs (152084 & 210187) request allowing the "@" and/or "!"
  characters in the passwd file GECOS field. The man page for pw does
  not mention that those characters are disallowed, Linux supports those
  characters in this field, and the "@" character in particular would be
  useful for storing email addresses in that field.

  PR:		152084, 210187
  Submitted by:	jschauma@netmeister.org, Dave Cottlehuber <dch@freebsd.org>
  Reported by:	jschauma@netmeister.org, Dave Cottlehuber <dch@freebsd.org>
  Reviewed by:	delphij (secteam), vangyzen
  MFC after:	1 week
  Sponsored by:	Dell EMC
  Differential Revision:	https://reviews.freebsd.org/D14519

Changes:
  head/usr.sbin/pw/pw_user.c
  head/usr.sbin/pw/tests/pw_useradd_test.sh
Comment 4 commit-hook freebsd_committer freebsd_triage 2018-03-09 14:46:11 UTC
A commit references this bug:

Author: dab
Date: Fri Mar  9 14:45:17 UTC 2018
New revision: 330694
URL: https://svnweb.freebsd.org/changeset/base/330694

Log:
  MFC r330245:

  Allow the "@" and "!" characters in passwd file GECOS fields.

  Two PRs (152084 & 210187) request allowing the "@" and/or "!"
  characters in the passwd file GECOS field. The man page for pw does
  not mention that those characters are disallowed, Linux supports those
  characters in this field, and the "@" character in particular would be
  useful for storing email addresses in that field.

  PR:		152084, 210187
  Submitted by:	jschauma@netmeister.org, Dave Cottlehuber <dch@freebsd.org>
  Reported by:	jschauma@netmeister.org, Dave Cottlehuber <dch@freebsd.org>
  Sponsored by:	Dell EMC

Changes:
_U  stable/11/
  stable/11/usr.sbin/pw/pw_user.c
  stable/11/usr.sbin/pw/tests/pw_useradd_test.sh
Comment 5 commit-hook freebsd_committer freebsd_triage 2018-03-09 14:46:13 UTC
A commit references this bug:

Author: dab
Date: Fri Mar  9 14:45:47 UTC 2018
New revision: 330695
URL: https://svnweb.freebsd.org/changeset/base/330695

Log:
  MFC r330245:

  Allow the "@" and "!" characters in passwd file GECOS fields.

  Two PRs (152084 & 210187) request allowing the "@" and/or "!"
  characters in the passwd file GECOS field. The man page for pw does
  not mention that those characters are disallowed, Linux supports those
  characters in this field, and the "@" character in particular would be
  useful for storing email addresses in that field.

  PR:             152084, 210187
  Submitted by:   jschauma@netmeister.org, Dave Cottlehuber <dch@freebsd.org>
  Reported by:    jschauma@netmeister.org, Dave Cottlehuber <dch@freebsd.org>
  Sponsored by:   Dell EMC

Changes:
_U  stable/10/
  stable/10/usr.sbin/pw/pw_user.c
  stable/10/usr.sbin/pw/tests/pw_useradd_test.sh