From 8d6016abb9ca2e9d270d668e9607445921846aaa Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 11 Sep 2001 04:17:47 +0000 Subject: [PATCH] username-noperiod config file --- FS/FS/svc_acct.pm | 7 ++++++- 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
  • textradiusprepend - DEPRECIATED, 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.
  • usernamemin - Minimum username length (default 2);
  • usernamemax - Maximum username length (default is the size of the SQL column, probably specified when fs-setup was run) -
  • username-letter - The existance of this file will turn on the requirement that usernames contain at least one letter. -
  • username-letterfirst - The existance of this file will turn on the requirement that usernames start with a letter. +
  • username-letter - The existance of this file will turn on the requirement that usernames contain at least one letter. +
  • username-letterfirst - The existance of this file will turn on the requirement that usernames start with a letter. +
  • username-noperiod - The existance of this file will disallow periods in usernames.
  • username_policy - 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'
  • vpopmailmachines - Your vpopmail pop toasters, one per line. Each line is of the form "machinename vpopdir vpopuid vpopgid". For example: poptoaster.domain.tld /home/vpopmail 508 508 Note: vpopuid and vpopgid are values taken from the vpopmail machine's /etc/passwd -- 2.11.0