spew (line
22)
This is a debugging function.
void
spew
($message $message)
-
$message
$message: The message to put into the debug log.
vadmin_auth (line
216)
This function is the authentication core of vadmin. Read the docs/SECURITY for the in-depth explanation on how the security is handled in vadmin.
$VADMIN_AUTHCODE,
vadmin_auth
()
vadmin_crypto (line
446)
This function does the encryption and decryption of sensitive data stored on the HDD. It uses the CRYPTO_HASH_LINE as key.
See docs for more info and/or explanation of the security structure of VADMIN.
the
vadmin_crypto
($input $input, $mode $mode)
-
$input
$input: the contents to encrypt/decrypt.
-
$mode
$mode: a string that can be either "decrypt" or "encrypt" depending on which action needs to be performed.
vadmin_domain_passwd_validate (line
280)
Tries to validate the supplied domain/password pair by connecting to the vmailmgr daemon and getting a listing for the domain in question.
true
vadmin_domain_passwd_validate
($domain $domain, $passwd $passwd)
-
$domain
$domain: vadmin domain.
-
$passwd
$passwd: the password for this domain.
vadmin_getdomain (line
542)
void
vadmin_getdomain
()
vadmin_gethost (line
554)
void
vadmin_gethost
()
vadmin_getvar (line
45)
This function retrieves various php-provided variables in a sane and safe way, offering a path of migration from php 4.0.x to 4.1 and beyond, as well as allowing us to work with register_globals=off.
The
vadmin_getvar
($vartype $vartype, $varname $varname)
-
$vartype
$vartype: The type of the variable to retireve.
-
$varname
$varname: The name of the variable to retrieve.
vadmin_get_storparams (line
534)
void
vadmin_get_storparams
()
vadmin_get_user_number (line
621)
void
vadmin_get_user_number
( $domain)
vadmin_get_user_unamedomain (line
249)
Looks at the user's login name, which should be either user@domain.com or user:domain.com, and separates the userid from the domain name, returning them in an array.
an
vadmin_get_user_unamedomain
($unamedomain $unamedomain)
-
$unamedomain
$unamedomain: A string in the format username{sep}domainname
vadmin_list_virtual_domains (line
579)
void
vadmin_list_virtual_domains
()
vadmin_make_page (line
314)
This is a GUI wrap-around for every generated page, since I'm too lazy to write one for each generated page, nor should I. ;) $scriptsrc is not currently used in vadmin, but I preserved it from SquirrelSpell in case I will add this functionality later.
void.
vadmin_make_page
($title $title, $scriptsrc $scriptsrc, $body $body, $returntomain $returntomain, $logoutlink $logoutlink)
-
$title
$title: the title of the page.
-
$scriptsrc
$scriptsrc: the name of a javascript file to load before loading the page itself.
-
$body
$body: the contents of the page.
-
$returntomain
$returntomain: show "return to main menu" link? true/false
-
$logoutlink
$logoutlink: show logout link? true/false
vadmin_mkform_action (line
512)
void
vadmin_mkform_action
( $tolvl, $tomod, $toact)
vadmin_putvar (line
125)
This function sets certain variables that should be handled safely.
void
vadmin_putvar
($vartype $vartype, $varname $varname, $varvalue $varvalue)
-
$vartype
$vartype: The type of the variable to set.
-
$varname
$varname: The name of the variable.
-
$varvalue
$varvalue: The value of the variable.
vadmin_rc4_crypt (line
395)
This function stolen nearly verbatim from hastymail.
http://hastymail.sf.net/
void
vadmin_rc4_crypt
( $input, $key)
vadmin_redirect (line
522)
void
vadmin_redirect
( $lvl, $mod, $act, $stor_params)
-
$lvl
-
$mod
-
$act
-
$stor_params
vadmin_security_breach (line
155)
This utility function notifies the user that they have attempted an action that was deemed as violating security by the system.
It used to carry an "INTRUDER ALERT ON DECK 5", but I changed it to be more non-geek friendly. ;)
Never
vadmin_security_breach
()
vadmin_smart_limit (line
609)
void
vadmin_smart_limit
( $domain, $level, $def)
vadmin_system_error (line
169)
This function displays an error message if the error was due to system malfunction and not user input.
Never
vadmin_system_error
($message $message)
-
$message
$message: A text message to display to the user.
vadmin_trim_array (line
637)
void
vadmin_trim_array
( &$member)
vadmin_user_error (line
192)
This function displays an error message if the error was due to the user input.
Never
vadmin_user_error
($message $message)
-
$message
$message: A text message to display to the user.