Subject: Re: useradd: spaces and $ in usernames
To: Alan Barrett <apb@cequrux.com>
From: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
List: tech-userlevel
Date: 11/17/2001 12:42:24
On Fri, 16 Nov 2001, Alan Barrett wrote:
> > - (void) asystem("%s -rf %s > /dev/null 2>&1 || true", RM, dir);
> > + (void) asystem("%s -rf '%s' > /dev/null 2>&1 || true", RM, dir);
> > (void) seteuid(0);
>
> This fails if dir contains a single-quote (') character. NetBSD's libc
> contains a shquote() function that can be used to solve this problem.
Please note that I explicitly check for "'" in my second patch.
- Hubert
--
Want to get a clue on IPv6 but don't know where to start? Try this:
* Basics -> http://www.onlamp.com/pub/a/onlamp/2001/05/24/ipv6_tutorial.html
* Setup -> http://www.onlamp.com/pub/a/onlamp/2001/06/01/ipv6_tutorial.html
Of course with your #1 IPv6 ready operating system -> http://www.NetBSD.org/