Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
33bdb7ec
Commit
33bdb7ec
authored
Mar 23, 2004
by
Leigh B. Stoller
Browse files
Fix up regex patterns for login ids so that _ to allowed.
parent
af79be8f
Changes
1
Hide whitespace changes
Inline
Side-by-side
tmcd/common/config/rc.accounts
View file @
33bdb7ec
...
...
@@ -129,7 +129,7 @@ sub doboot()
# First just get the current set of groups/accounts from tmcd.
#
foreach
my
$str
(
@tmccresults
)
{
if
(
$str
=~
/^ADDGROUP NAME=([-\
@\w.
]+) GID=([0-9]+)/
)
{
if
(
$str
=~
/^ADDGROUP NAME=([-\
w
]+) GID=([0-9]+)/
)
{
#
# Group info goes in the hash table.
#
...
...
@@ -144,14 +144,14 @@ sub doboot()
}
$newgroups
{"
$gname
"}
=
$
2
}
elsif
(
$str
=~
/^ADDUSER LOGIN=([
0-9A-Za-z
]+)/
)
{
elsif
(
$str
=~
/^ADDUSER LOGIN=([
-\w
]+)/
)
{
#
# Account info goes in the hash table.
#
$newaccounts
{
$
1
}
=
$str
;
next
;
}
elsif
(
$str
=~
/^PUBKEY LOGIN=([
0-9A-Za-z
]+) KEY="(.*)"/
)
{
elsif
(
$str
=~
/^PUBKEY LOGIN=([
-\w
]+) KEY="(.*)"/
)
{
#
# Keys go into hash as a list of keys.
#
...
...
@@ -329,7 +329,7 @@ sub doboot()
delete
(
$PWDDB
{
$login
});
}
my
$pat
=
q(ADDUSER LOGIN=([
0-9A-Za-z
]+) PSWD=([^:]+) UID=(\d+) GID=(.*) )
;
my
$pat
=
q(ADDUSER LOGIN=([
-\w
]+) PSWD=([^:]+) UID=(\d+) GID=(.*) )
;
$pat
.=
q(ROOT=(\d) NAME="(.*)" HOMEDIR=(.*) GLIST="(.*)" )
;
$pat
.=
q(SERIAL=(\d+) EMAIL="([-\w\@\.\+]+)" SHELL=([-\w]*))
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment