From owner-freebsd-stable Sat Jun 10 19:46:44 2000 Delivered-To: freebsd-stable@freebsd.org Received: from maildrop.velocet.net (maildrop.velocet.net [216.126.74.5]) by hub.freebsd.org (Postfix) with ESMTP id C8D3137BE8F for ; Sat, 10 Jun 2000 19:46:35 -0700 (PDT) (envelope-from willwong@anime.ca) Received: from magus (H45.C55.tor.velocet.net [204.138.55.45]) by maildrop.velocet.net (Postfix) with SMTP id C801678208; Sat, 10 Jun 2000 22:46:23 -0400 (EDT) Message-ID: <001501bfd34f$3beb0b80$0300a8c0@anime.ca> From: "William Wong" To: "Matt Heckaman" Cc: References: Subject: Re: rmuser bug Date: Sat, 10 Jun 2000 22:46:23 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I did a quick check, and it looks like it does: Enter username [a-z0-9_-]: That was a clip of output from the adduser script (invoked interactively) - Will ----- Original Message ----- From: "Matt Heckaman" To: "William Wong" Cc: Sent: Saturday, June 10, 2000 9:29 PM Subject: Re: rmuser bug > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > If I'm not mistaken, the default adduser doesn't allow you to add a > username with '-' character (not to mention qmail doesn't like it) I > don't use either default adduser|rmuser but I think my memory serves. > > Regards, > Matt > > On Sat, 10 Jun 2000, William Wong wrote: > > : Date: Sat, 10 Jun 2000 20:52:41 -0400 > : From: William Wong > : To: freebsd-stable@freebsd.org > : Subject: rmuser bug > : > : Hi there, > : > : I noticed a small bug in the rmuser script version: > : (# $FreeBSD: src/usr.sbin/adduser/rmuser.perl,v 1.8.2.1 2000/03/20 13:00:36 > : peter Exp $) > : ... which prevents you from deleting usernames which contain the dash ('-') > : character. > : > : There was a similar check done later on in the code, so I just modified it a > : bit to match (since I don't know much about perl and expressions :) I'm not > : sure if it's been fixed though in the most current/stable version though. > : > : - Will > : > : There's a line of code that reads: > : > : if ($#ARGV == 0) > : > : # Username was given as a parameter > : $login_name = pop(@ARGV); > : die "Sorry, login name must contain alphanumeric characters only.\n" > : if ($login_name !~ /^[a-zA-Z0-9_]\w*$/); > : } > : > : ... when it should read: > : > : if ($#ARGV == 0) > : > : # Username was given as a parameter > : $login_name = pop(@ARGV); > : die "Sorry, login name must contain alphanumeric characters only.\n" > : if ($login_name !~ /^[a-z0-9_][a-z0-9_\-]*$/); > : } > : > : > : > : To Unsubscribe: send mail to majordomo@FreeBSD.org > : with "unsubscribe freebsd-stable" in the body of the message > : > > Matt Heckaman > matt@arpa.mail.net > http://www.lucida.qc.ca > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.1 (FreeBSD) > Comment: http://www.lucida.qc.ca/pgp > > iD8DBQE5QutpdMMtMcA1U5ARApX9AKChihgPVAtjqtHZJ7yGlFtA/QMjAgCg5S0q > NgJoYik2VU0dRaNWJQl2ZAo= > =UUv2 > -----END PGP SIGNATURE----- > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-stable" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message