diff options
-rw-r--r-- | FS/FS/svc_acct.pm | 7 | ||||
-rw-r--r-- | httemplate/docs/config.html | 5 |
2 files changed, 9 insertions, 3 deletions
diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm index 926a9d344..f7d2fd7db 100644 --- 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 + $username_noperiod $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_noperiod = $conf->exists('username-noperiod'); $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"; } + if ( $username_noperiod ) { + $recref->{username} =~ /\./ and return "Illegal username"; + } $recref->{popnum} =~ /^(\d*)$/ or return "Illegal popnum: ".$recref->{popnum}; $recref->{popnum} = $1; @@ -758,7 +763,7 @@ sub email { =head1 VERSION -$Id: svc_acct.pm,v 1.34 2001-09-11 03:15:58 ivan Exp $ +$Id: svc_acct.pm,v 1.35 2001-09-11 04:17:47 ivan Exp $ =head1 BUGS diff --git a/httemplate/docs/config.html b/httemplate/docs/config.html index ac7752e07..84e9538f7 100644 --- a/httemplate/docs/config.html +++ b/httemplate/docs/config.html @@ -100,8 +100,9 @@ All further configuration files and directories are located in <li><a name="textradiusprepend">textradiusprepend</a> - <b>DEPRECIATED</b>, use RADIUS check attributes instead. This option will be removed soon. The contents of this file will be prepended to the first line of a user's RADIUS entry in text exports. <li><a name="usernamemin">usernamemin</a> - Minimum username length (default 2); <li><a name="usernamemax">usernamemax</a> - Maximum username length (default is the size of the SQL column, probably specified when fs-setup was run) - <li><a name="usernamemax">username-letter</a> - The existance of this file will turn on the requirement that usernames contain at least one letter. - <li><a name="usernamemax">username-letterfirst</a> - The existance of this file will turn on the requirement that usernames start with a letter. + <li><a name="username-letter">username-letter</a> - The existance of this file will turn on the requirement that usernames contain at least one letter. + <li><a name="username-letterfirst">username-letterfirst</a> - The existance of this file will turn on the requirement that usernames start with a letter. + <li><a name="username-noperiod">username-noperiod</a> - The existance of this file will disallow periods in usernames. <li><a name="username_policy">username_policy</a> - This file controls the mechanism for preventing duplicate usernames in passwd/radius files exported from svc_accts. This should be one of 'prepend domsvc' 'append domsvc' or 'append domain' <li><a name="vpopmailmachines">vpopmailmachines</a> - Your vpopmail pop toasters, one per line. Each line is of the form "machinename vpopdir vpopuid vpopgid". For example: <code>poptoaster.domain.tld /home/vpopmail 508 508</code> Note: vpopuid and vpopgid are values taken from the vpopmail machine's /etc/passwd |