username db def

Ivan Kohler ivan at sisd.com
Sun Mar 22 04:38:40 PST 1998


-----BEGIN PGP SIGNED MESSAGE-----

Changing that to a longer field should not be difficult:  You would need
to change site_perl/dbdef.pm:

      'username char(a_larger_number) NOT NULL'

site_perl/svc_acct.pm:

  $recref->{username} =~ /^([a-z0-9_\-]{2,a_larger_number})$/ or return "Illegal username";

htdocs/edit/svc_acct.cgi:

<INPUT TYPE="text" NAME="username" VALUE="$username" SIZE=xx MAXLENGTH=yy>

I've added to the TODO: Make username length configurable in a single
place (goes with dbdef.pm cleanup)

I agree that the data types in dbdef.pm could use some optimization.  I
don't suppose I can convice you to help out?

On Sat, 21 Mar 1998, James H. Thompson wrote:

> I noticed that the UNIX username field in the DB
> is defined as 8 char -- some Unix systems (like Redhat 5) allow
> much longer login names.
> 
> There are lots of fields defined in the DB as char(255)
> I didn't quite understand the reasoning for this choice.
> The DB would takes lots less space on disk if it were varchar(255)
> and how out you print out an address line if someone actually
> managed to put 255 characters in it?
> 
> Jim
> jht at aloha.net
> 
> 

- -- 
Ivan Kohler <ivan at sisd.com> - finger for PGP key
Silicon Interactive Software Design - http://www.sisd.com/
"I want to go on a mountain-top / with a radio and good batteries
 play a joyous tune / and free the whole human race from suffering" -Bjork

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBNRUGTr7OPBeQJv09AQFiGwP/bQ/tDcXIYFsGXBRrPAOor/pZWBbRIHP+
A5DCYaU+6NGKgm+U2EKx12YJ7LeXIiq1kmHyws4hmJHBoAQ1y0ebK9x1OvLFUpRb
pOKbwBbbkkpD7Vf7o2rkTVQgW+KboEgtUxqzPy7NQYGZDtIncUC1CWhy7KRqPFjv
gf7AdadiJDs=
=r6Gq
-----END PGP SIGNATURE-----




More information about the freeside-users mailing list