From c92d9634bd499b03fc7bdc496255c906535fcd11 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Wed, 7 Jan 2009 02:10:10 +0000 Subject: [PATCH] More POD conversion --- web-lib-funcs.pl | 141 ++++++++++++++++++++++++++++++----------------- web-lib.pl | 3 + 2 files changed, 92 insertions(+), 52 deletions(-) diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index 4cdfe1bcc..20935a662 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -5788,10 +5788,10 @@ else { return $rv; } -=head2 read_http_connection(handle, [amount]) +=head2 read_http_connection(&handle, [bytes]) -Reads either one line or up to the specified amount of data from the handle. -XXX +Reads either one line or up to the specified number of bytes from the handle, +originally supplied by make_http_connection. =cut sub read_http_connection @@ -5837,9 +5837,9 @@ $rv = undef if ($rv eq ""); return $rv; } -=head2 write_http_connection(handle, [data+]) +=head2 write_http_connection(&handle, [data+]) -Writes the given data to the handle +Writes the given data to the given HTTP connection handle. =cut sub write_http_connection @@ -5856,9 +5856,9 @@ else { } } -=head2 close_http_connection(handle) +=head2 close_http_connection(&handle) -MISSING DOCUMENTATION +Closes a connection to an HTTP server, identified by the given handle. =cut sub close_http_connection @@ -5869,7 +5869,9 @@ close($h->{'fh'}); =head2 clean_environment Deletes any environment variables inherited from miniserv so that they -won't be passed to programs started by webmin. +won't be passed to programs started by webmin. This is useful when calling +programs that check for CGI-related environment variables and modify their +behaviour, and to avoid passing sensitive variables to un-trusted programs. =cut sub clean_environment @@ -5895,7 +5897,7 @@ foreach $e ('WEBMIN_CONFIG', 'SERVER_NAME', 'CONTENT_TYPE', 'REQUEST_URI', =head2 reset_environment -Puts the environment back how it was before &clean_environment +Puts the environment back how it was before clean_environment was callled. =cut sub reset_environment @@ -5908,11 +5910,10 @@ if (defined(%UNCLEAN_ENV)) { } } -$webmin_feedback_address = "feedback\@webmin.com"; - =head2 progress_callback -Never called directly, but useful for passing to &http_download +Never called directly, but useful for passing to &http_download to print +out progress of an HTTP request. =cut sub progress_callback @@ -5977,6 +5978,8 @@ elsif ($_[0] == 6) { Changes the user and group of the current process to that of the unix user with the same name as the current webmin login, or fails if there is none. +This should be called by Usermin module scripts that only need to run with +limited permissions. =cut sub switch_to_remote_user @@ -5999,7 +6002,8 @@ if ($< == 0) { Creates per-user config directories and sets $user_config_directory and $user_module_config_directory to them. Also reads per-user module configs -into %userconfig +into %userconfig. This should be called by Usermin module scripts that need +to store per-user preferences or other settings. =cut sub create_user_config_dirs @@ -6036,7 +6040,8 @@ if ($module_name) { =head2 create_missing_homedir(&uinfo) -If auto homedir creation is enabled, create one for this user if needed +If auto homedir creation is enabled, create one for this user if needed. +For internal use only. =cut sub create_missing_homedir @@ -6054,7 +6059,8 @@ if (!-e $uinfo->[7] && $gconfig{'create_homedir'}) { =head2 filter_javascript(text) -Disables all javascript