Roxen.git / server / base_server / global_variables.pike

version» Context lines:

Roxen.git/server/base_server/global_variables.pike:1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2001, Roxen IS. - // $Id: global_variables.pike,v 1.86 2002/01/11 11:39:47 grubba Exp $ + // $Id: global_variables.pike,v 1.87 2002/01/11 11:57:23 grubba Exp $      // #pragma strict_types   #define DEFVAR mixed...:object   #define BDEFVAR mixed...:object      #define IN_ROXEN   #include <module.h>   inherit "read_config";   inherit "basic_defvar";   #include <version.h>
Roxen.git/server/base_server/global_variables.pike:42:   // performance reasons. This file is dumped to a .o file, roxen.pike   // is not.   void set_up_hilfe_variables( Protocol o )   {    function(DEFVAR) defvar = o->defvar;       defvar( "require_auth", 1,    LOCALE(309,"Require user with the 'hilfe' permission"), TYPE_FLAG,    LOCALE(310,"If yes, require a user with the hilfe permission "    "set, otherwise, any configuration interface user will " -  "work, even one with only the view settings permission" ) ); +  "be allowed, even one with only the view settings permission." ) );   }         void set_up_ftp_variables( Protocol o )   {    function(DEFVAR) defvar = o->defvar;          defvar( "FTPWelcome",    " +------------------------------------------------\n"    " +-- Welcome to the Roxen FTP server ---\n"    " +------------------------------------------------\n",    LOCALE(60, "Welcome text"), TYPE_TEXT, -  LOCALE(61, "The text shown to the user on connect") ); +  LOCALE(61, "The text shown to the user on connect.") );       defvar( "ftp_user_session_limit", 0, LOCALE(62, "User session limit"),    TYPE_INT,    LOCALE(63, "The maximum number of times a user can connect at once."    " 0 means unlimited.") );       defvar( "named_ftp", 1, LOCALE(64, "Allow named ftp"), TYPE_FLAG, -  LOCALE(65, "If yes, non-anonymous users can connect") ); +  LOCALE(65, "If yes, non-anonymous users can connect.") );       defvar( "guest_ftp", 1,    LOCALE(66, "Allow login with incorrect password/user"),    TYPE_FLAG,    LOCALE(67, "If yes, users can connect with the wrong password "    "and/or username. This is useful since things like .htaccess "    "files can later on authenticate the user."));       defvar( "anonymous_ftp", 1, LOCALE(68, "Allow anonymous ftp"),    TYPE_FLAG, -  LOCALE(69, "If yes, anonymous users is allowed to connect.") ); +  LOCALE(69, "If yes, anonymous users are allowed to connect.") );       defvar( "shells", "", LOCALE(70, "Shell database"),    TYPE_FILE,    LOCALE(71, "If this string is set to anything but the empty string, "    "it should specify a file containing a list of valid shells. "    "Users with shells that are not in this list will not "    "be allowed to log in.") );       defvar( "passive_port_min", 0, LOCALE(257, "Passive port minimum"),    TYPE_INT,
Roxen.git/server/base_server/global_variables.pike:142:   }      void set_up_ssl_variables( Protocol o )   {    function(DEFVAR) defvar = o->defvar;       defvar( "ssl_cert_file", "demo_certificate.pem",    LOCALE(86, "SSL certificate file"),    TYPE_STRING,    sprintf(LOCALE(87, "The SSL certificate file to use. The path " -  "is relative to %s")+"\n", getcwd() )); +  "is relative to %s.")+"\n", getcwd() ));          defvar( "ssl_key_file", "", LOCALE(88, "SSL key file"),    TYPE_STRING,    sprintf(LOCALE(89, "The SSL key file to use. The path is "    "relative to %s, you do not have to specify a key "    "file, leave this field empty to use the certificate " -  "file only")+"\n", getcwd() )); +  "file only.")+"\n", getcwd() ));   }         // Get the current domain. This is not as easy as one could think.   string get_domain(int|void l)   {    array f;    string t, s;       // FIXME: NT support.
Roxen.git/server/base_server/global_variables.pike:233:    LOCALE(90, "Logging: Log entire file length in restored connections"),    TYPE_FLAG,    LOCALE(91, "If this toggle is enabled log entries for restored connections "    "will log the amount of sent data plus the restoration location. "    "Ie if a user has downloaded 100 bytes of a file already, and makes "    "a Range request fetching the remaining 900 bytes, the log entry "    "will log it as if the entire 1000 bytes were downloaded. "    "<p>This is useful if you want to know if downloads were successful "    "(the user has the complete file downloaded). The drawback is that "    "bandwidth statistics on the log file will be incorrect. The " -  "statistics in Roxen will still be correct.")); +  "statistics in Roxen will still be correct.</p>"));       defvar("default_font", "roxen builtin", LOCALE(92, "Default font"),    TYPE_FONT,    LOCALE(93, "The default font to use when modules request a font."));       defvar("font_dirs", ({"../local/fonts/", "nfonts/" })+   #ifdef __NT__    ({combine_path(replace(getenv("SystemRoot"),"\\","/"),"fonts/")})   #else    ((getenv("RX_FONTPATH")||"")/","-({""}))
Roxen.git/server/base_server/global_variables.pike:291:    defvar("cache_size", 25, LOCALE(104, "Cache: Proxy Disk Cache Size"),    TYPE_INT,    LOCALE(105, "How many MB may the cache grow to before a garbage "    "collect is done?"),    0, cache_disabled_p);       defvar("cache_max_num_files", 0,    LOCALE(106, "Cache: Proxy Disk Cache Maximum number of files"),    TYPE_INT,    LOCALE(107, "How many cache files (inodes) may be on disk before " -  "a garbage collect is done ? May be left zero to disable " +  "a garbage collect is done? May be left at zero to disable "    "this check."),    0, cache_disabled_p);       defvar("bytes_per_second", 50,    LOCALE(108, "Cache: Proxy Disk Cache bytes per second"),    TYPE_INT,    LOCALE(109, "How file size should be treated during garbage collect. " -  "Each X bytes counts as a second, so that larger files will " +  "Each X bytes count as a second, so that larger files will "    "be removed first."),    0, cache_disabled_p);       defvar("cachedir", "/tmp/roxen_cache/",    LOCALE(110, "Cache: Proxy Disk Cache Base Cache Dir"),    TYPE_DIR,    LOCALE(111, "This is the base directory where cached files will "    "reside. To avoid mishaps, 'roxen_cache/' is always " -  "prepended to this variable."), +  "appended to this variable."),    0, cache_disabled_p);       defvar("hash_num_dirs", 500,    LOCALE(112, "Cache: Proxy Disk Cache Number of hash directories"),    TYPE_INT|VAR_MORE,    LOCALE(113, "This is the number of directories to hash the contents " -  "of the disk cache into. Changing this value currently " +  "of the disk cache into. Changing this value currently "    "invalidates the whole cache, since the cache cannot find " -  "the old files. In the future, the cache will be " +  "the old files. In the future, the cache will be "    "recalculated when this value is changed."),    0, cache_disabled_p);       defvar("cache_keep_without_content_length", 1,    LOCALE(114, "Cache: Proxy Disk Cache Keep without Content-Length"),    TYPE_FLAG,    LOCALE(115, "Keep files without Content-Length header information "    "in the cache?"),    0, cache_disabled_p);   
Roxen.git/server/base_server/global_variables.pike:388:    defvar("User", "", LOCALE(128, "Change uid and gid to"),    TYPE_STRING,    LOCALE(129, #"\   When Roxen is run as root, to be able to open port 80 for listening,   change to this user-id and group-id when the port has been opened. If   you specify a symbolic username, the default group of that user will   be used. The syntax is user[:group].      <p>A server restart is necessary for a change of this variable to take   effect. Note that it also can lead to file permission errors if the - Roxen process no longer can read files it previously has written, - although the start script fixes this for the standard file locations.")); + Roxen process no longer can read files it previously has written. + The start script attempts to fix this for the standard file locations.</p>"));       defvar("permanent_uid", 0, LOCALE(130, "Change uid and gid permanently"),    TYPE_FLAG,    LOCALE(131, "If this variable is set, Roxen will set it's uid and gid "    "permanently. This disables the 'exec script as user' features "    "for CGI, and also 'access files as user' in the filesystems, but "    "it gives better security."));       defvar("ModuleDirs", ({ "../local/modules/", "modules/" }),    LOCALE(132, "Module directories"),
Roxen.git/server/base_server/global_variables.pike:529:       string secret=Crypto.md5()->update(""+time(1)+random(100000))->digest();    secret = MIME.encode_base64(secret,1);    defvar("server_salt", secret[..sizeof(secret)-3], LOCALE(8, "Server secret"),    TYPE_STRING|VAR_MORE|VAR_NO_DEFAULT,    LOCALE(9, "The server secret is a string used in some "    "cryptographic functions, such as calculating "    "unique, non-guessable session id's. Change this "    "value into something that is hard to guess, unless "    "you are satisfied with what your computers random " -  "generator has produced") ); +  "generator has produced.") );       secret = Crypto.md5()->update(""+time(1)+random(100000)+"x"+gethrtime())    ->digest();       definvisvar("argcache_secret","",TYPE_STRING|VAR_NO_DEFAULT);    set( "argcache_secret", secret );    // force save.          defvar("suicide_engage", 0,    LOCALE(160, "Auto Restart: Enable Automatic Restart"),    TYPE_FLAG|VAR_MORE,    LOCALE(161, "If set, Roxen will automatically restart after a "    "configurable number of days. Since Roxen uses a monolith, "    "non-forking server model the process tends to grow in size " -  "over time. This is mainly due to heap fragmentation but also " -  "because of memory leaks.") +  "over time. This is mainly due to heap fragmentation but " +  "may also sometimes be because of memory leaks.")    );       definvisvar( "last_suicide", 0, TYPE_INT );       defvar("suicide_schedule",    Variable.Schedule( ({ 2, 1, 1, 0, 4 }), 0,    LOCALE(387,"Auto Restart: Schedule"),    LOCALE(388, "Automatically restart the "    "server according to this schedule.") ) )    ->set_invisibility_check_callback (
Roxen.git/server/base_server/global_variables.pike:579:    // Note that the upper limit is arbitrary.       defvar("replicate", 0,    LOCALE(163, "Enable replication system" ),    TYPE_FLAG,    LOCALE(337,"If enabled, Roxen will enable various replication systems "    "needed to set up multiple frontend systems. You will need "    "a database named 'replicate' that recides in a shared mysql "    "server for this to work. Also, all servers has to have this "    "flag set. Roxen must be restarted before changes to this " -  "variable takes effect " ) ); +  "variable takes effect." ) );       defvar("config_file_comments", 0,    LOCALE(172, "Commented config files"),    TYPE_FLAG,    LOCALE(173, "Save the variable documentation strings as comments "    "in the configuration files. Only useful if you read or "    "edit the config files directly."));            #ifdef SNMP_AGENT    // SNMP stuffs    defvar("snmp_agent", 0, LOCALE(999, "SNMP: Enable SNMP agent"),    TYPE_FLAG|VAR_MORE, -  "If set, the Roxen SNMP agent will be anabled. " +  "If set, the Roxen SNMP agent will be anabled."    );    defvar("snmp_community", ({"public:ro"}), "SNMP: Community string",    TYPE_STRING_LIST,    "One community name per line. Default permissions are 'read-only'. " -  "'Read-write' permissions can be specified by append :rw to the community " -  "name (for example mypub:rw).", +  "'Read-write' permissions can be specified by appending :rw to the " +  "community name (for example mypub:rw).",    0, snmp_disabled);   /*    defvar("snmp_mode", "smart", "SNMP: Agent mode",    TYPE_STRING_LIST,    "Standard SNMP server mode, muxed SNMP mode, "    "proxy, agentx or automatic (smart) mode.",    ({"smart", "agent", "agentx", "smux", "proxy" }));   */    defvar("snmp_hostport", snmp_get_cif_domain(), "SNMP: IP address and port",    TYPE_STRING, -  "Agent listenning IP adress and port. Format: [[host]:port] " -  "If host isn't set then will be use IP address of config interface", +  "Agent listening IP adress and port. Format: [[host]:port] " +  "If host isn't set then the IP address of the config interface " +  "will be used.",    0, snmp_disabled);       defvar("snmp_global_traphosts", ({}),"SNMP: Trap destinations",    TYPE_STRING_LIST,    "The SNMP traphost URL for sending common traps (like coldstart).",    0, snmp_disabled);       defvar("snmp_syscontact","","SNMP: System MIB - Contact",    TYPE_STRING,    "The textual identification of the contact person for this managed "