projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
username-noperiod config file
[freeside.git]
/
FS
/
FS
/
svc_acct.pm
diff --git
a/FS/FS/svc_acct.pm
b/FS/FS/svc_acct.pm
index
926a9d3
..
f7d2fd7
100644
(file)
--- a/
FS/FS/svc_acct.pm
+++ b/
FS/FS/svc_acct.pm
@@
-3,6
+3,7
@@
package FS::svc_acct;
use strict;
use vars qw( @ISA $nossh_hack $conf $dir_prefix @shells $usernamemin
$usernamemax $passwordmin $username_letter $username_letterfirst
use strict;
use vars qw( @ISA $nossh_hack $conf $dir_prefix @shells $usernamemin
$usernamemax $passwordmin $username_letter $username_letterfirst
+ $username_noperiod
$shellmachine $useradd $usermod $userdel $mydomain
$cyrus_server $cyrus_admin_user $cyrus_admin_pass
@saltset @pw_set);
$shellmachine $useradd $usermod $userdel $mydomain
$cyrus_server $cyrus_admin_user $cyrus_admin_pass
@saltset @pw_set);
@@
-53,6
+54,7
@@
$FS::UID::callback{'FS::svc_acct'} = sub {
}
$username_letter = $conf->exists('username-letter');
$username_letterfirst = $conf->exists('username-letterfirst');
}
$username_letter = $conf->exists('username-letter');
$username_letterfirst = $conf->exists('username-letterfirst');
+ $username_noperiod = $conf->exists('username-noperiod');
$mydomain = $conf->config('domain');
if ( $conf->exists('cyrus') ) {
($cyrus_server, $cyrus_admin_user, $cyrus_admin_pass) =
$mydomain = $conf->config('domain');
if ( $conf->exists('cyrus') ) {
($cyrus_server, $cyrus_admin_user, $cyrus_admin_pass) =
@@
-574,6
+576,9
@@
sub check {
} elsif ( $username_letter ) {
$recref->{username} =~ /[a-z]/ or return "Illegal username";
}
} elsif ( $username_letter ) {
$recref->{username} =~ /[a-z]/ or return "Illegal username";
}
+ if ( $username_noperiod ) {
+ $recref->{username} =~ /\./ and return "Illegal username";
+ }
$recref->{popnum} =~ /^(\d*)$/ or return "Illegal popnum: ".$recref->{popnum};
$recref->{popnum} = $1;
$recref->{popnum} =~ /^(\d*)$/ or return "Illegal popnum: ".$recref->{popnum};
$recref->{popnum} = $1;
@@
-758,7
+763,7
@@
sub email {
=head1 VERSION
=head1 VERSION
-$Id: svc_acct.pm,v 1.3
4 2001-09-11 03:15:58
ivan Exp $
+$Id: svc_acct.pm,v 1.3
5 2001-09-11 04:17:47
ivan Exp $
=head1 BUGS
=head1 BUGS