Commit aa7de27f authored by Kristin Wright's avatar Kristin Wright

3 Minor changes:

Noticed that I had a hard-coded test value still in the code ('lkwbox'
instead of $project; fixed that. Took out inclusion of Open2 package. Allow
a dash into the project name verification.
parent ade41e3a
#!/usr/local/bin/perl -wT
### $Id: mkacct-ctrl,v 1.3 2000-11-30 22:17:46 kwright Exp $
### $Id: mkacct-ctrl,v 1.4 2000-12-03 14:16:26 kwright Exp $
use English;
use Mysql;
use IPC::Open2;
my $me; # alphanumeric username of $UID
......@@ -123,7 +122,7 @@ sub dowork() {
$fullname = $db_row[2];
# get group number
$db_query = "select unix_gid from projects where pid='lkwbox'";
$db_query = "select unix_gid from projects where pid='$project'";
$sth = $dbh->query($db_query);
got_tuples($sth) or die "$0: Error selecting group number.\n";
@db_row = $sth->fetchrow_array();
......@@ -204,7 +203,7 @@ sub sanitize() {
}
## sanitize project
if ( $ARGV[0] =~ /^([a-z0-9]+)$/ ) {
if ( $ARGV[0] =~ /^([A-Za-z0-9-]+)$/ ) {
$project = $1;
} else {
die "$0: Project argument $ARGV[0] has invalid characters.\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment