Skip to content
Snippets Groups Projects
Select Git revision
  • d4847b52087253446ccf9a15d3e6e40e77c5950f
  • master default
  • wip-slh-dsa-sha2-128s
  • master-updates
  • release-3.10-fixes
  • getopt-prototype
  • fix-bcrypt-warning
  • refactor-hmac
  • wip-use-alignas
  • trim-sha3-context
  • fix-gitlab-ci
  • check-fat-emulate
  • delete-digest_func-size
  • slh-dsa-shake-128f-nettle
  • slh-dsa-shake-128s-nettle
  • slh-dsa-shake-128s
  • delete-openpgp
  • ppc64-sha512
  • delete-md5-compat
  • cleanup-hmac-tests
  • ppc64-sha256
  • nettle_3.10.2_release_20250626
  • nettle_3.10.1_release_20241230
  • nettle_3.10_release_20240616
  • nettle_3.10rc2
  • nettle_3.10rc1
  • nettle_3.9.1_release_20230601
  • nettle_3.9_release_20230514
  • nettle_3.8.1_release_20220727
  • nettle_3.8_release_20220602
  • nettle_3.7.3_release_20210606
  • nettle_3.7.2_release_20210321
  • nettle_3.7.1_release_20210217
  • nettle_3.7_release_20210104
  • nettle_3.7rc1
  • nettle_3.6_release_20200429
  • nettle_3.6rc3
  • nettle_3.6rc2
  • nettle_3.6rc1
  • nettle_3.5.1_release_20190627
  • nettle_3.5_release_20190626
41 results

rsa-sha1-verify.c

Blame
  • server-config.c 5.68 KiB
    /*
     * $Id: server-config.c,v 0.15 1992/02/21 00:50:32 ceder Exp $
     * Copyright (C) 1991  Lysator Academic Computer Association.
     *
     * This file is part of the LysKOM server.
     * 
     * LysKOM is free software; you can redistribute it and/or modify it
     * under the terms of the GNU General Public License as published by 
     * the Free Software Foundation; either version 1, or (at your option) 
     * any later version.
     * 
     * LysKOM is distributed in the hope that it will be useful, but WITHOUT
     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
     * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
     * for more details.
     * 
     * You should have received a copy of the GNU General Public License
     * along with LysKOM; see the file COPYING.  If not, write to
     * Lysator, c/o ISY, Linkoping University, S-581 83 Linkoping, SWEDEN,
     * or the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, 
     * MA 02139, USA.
     *
     * Please mail bug reports to bug-lyskom@lysator.liu.se. 
     */
    /*
     *  config.c
     *
     *  This is in a .c file to make it possible to change a value without having
     *  to recompile the entire server.
     */
    
    #include <config.h>
    #include <m-config.h>
    
    static char *rcsid = "$Id: server-config.c,v 0.15 1992/02/21 00:50:32 ceder Exp $";
    
    
    
    /* Where to save things. These are used by lyskomd and dbck. */
    
    /*
     * DEFAULT_DBASE_DIR can be overriden by giving -Ddir to lyskomd or dbck.
     */
    
    const char * DEFAULT_DBASE_DIR = "/usr/lyskom";
    
    const char *DATAFILE_NAME   = "db/lyskomd-data";
    const char *BACKUPFILE_NAME = "db/lyskomd-backup";
    const char *TEXTFILE_NAME   = "db/lyskomd-texts";
    const char *STATISTIC_NAME  = "etc/lyskomd-log";
    const char *PID_NAME   = "etc/pid";
    const char *MEMUSE_NAME = "etc/memory-usage";
    
    /* Communications */
    
    const char * DEFAULT_CLIENT_SERVICE = "lyskom";  /* Can be number! */
    const char * DEFAULT_MUX_SERVICE    = "lyskom-mux";     /* Can be number! */
    
    /*
     * The following should always be true:
     * 0 <= SYNCTIMEOUT <= GARBTIMEOUT <= TIMEOUT
     * Times in milliseconds.
     *
     * GARBTIMEOUT and SYNCTIMEOUT are only used in diskomd.
     */
    const int TIMEOUT = 100;	/* Timeout to select() when totally idle.
    				 * Should be much larger. Is this small
    				 to work around the famous select bug
    				 in isc. */
    const int GARBTIMEOUT = 100;	/* Timeout to select() when garbing texts
    				   but not syncing. */
    const int SYNCTIMEOUT = 0;	/* Timeout to select() when syncing. */
    
    /* Times in minutes. */
    const int GARB_INTERVAL = 60*24;    /* Minutes between deletion of
    				       expired texts. */
    const int SYNC_INTERVAL = 30;  	    /* Minutes between sync. */
    const int SYNC_RETRY_INTERVAL = 5;  /* 5 = Wait 5 minutes and retry after
    				       an error while writing to disk. */
    
    /* String limits */
    
    const int CONF_NAME_LEN = 60;	/* Conference (and Person) name */
    const int PWD_LEN	= 128;	/* Password. It is not guaranteed that all
    				   chars are significant. */
    const int WHAT_DO_LEN	=  60;	/* what_am_i_doing */
    const int USERNAME_LEN	= 128;	/* Max login-id from clients */
    const int TEXT_LEN      =131072;/* Max len of a text. */
    const int BROADCAST_LEN = 1024;	/* Max len of a broadcast message */
    
    /* Text_stat limits */
    
    const int MAX_MARKS_PERSON = 2048; /* Max marks per person */
    const int MAX_MARKS_TEXT   = 1024; /* Max marks per text */
    const int MAX_RECIPIENTS   =  256; /* Max recipients/cc_recipients per text */
    const int MAX_COMM	   =  128; /* Max number of comments to a text */
    const int MAX_FOOT	   =   32; /* Max number of footnotes to a text */
    const int MAX_CREA_MISC    =  512; /* Sum of recipients, cc_recipients, comm_to
    				   * and footn_to must not exceed MAX_CREA_MISC
    				    * when the text is created. */
    
    /*
     * Size of the cache. This tells us how many clean objects of each
     * type to hold. Since all dirty items are also held in core, the
     * actual size of the cache is bigger.
     */
    
    const int CACHE_CONFERENCES = 10;
    const int CACHE_PERSONS     = 10;
    const int CACHE_TEXT_STATS  = 10;
    
    /*
     * Some other limits
     */
    
    /*
     * MAX_NO_OF_CONNECTIONS must be small enough. Each connection takes one
     * file descriptor, and it is important that there are a few descriptors
     * left so that it is possible to save the data base. lyskomd might crash
     * if this number is too big and that many connectionattempts are made
     * simultaneously.
     *
     * The following descriptors are open by LysKOM:
     *   stdin, stdout, stderr   (stdin and stdout could probably be closed.
     *			      The log() function prints to stderr.)
     *   TEXTFILE_NAME	     (always open)
     *   DATAFILE_NAME	     (often open)
     *   STATISTIC_NAME	     (open after a SIGUSR1)
     * Thus, the max number of connections is the number of available file
     * descriptors minus six. This has not been fully tested for a long
     * while, so we subtract eight just to be on the safe side. That still
     * gives 56 simultaneous users on a sun4, and that is enough for the
     * time beeing. (If you need more connections you can ran a mux. Send
     * mail to kom@lysator.liu.se for more info.)
     */
    
    #ifdef HAVE_GETDTABLESIZE
    int MAX_NO_OF_CONNECTIONS = 0;	/* Initialized by main(). */
    #else
    const int MAX_NO_OF_CONNECTIONS = (MAX_OPEN_FD - PROTECTED_FDS);
    #endif
    
    
    const int MARK_AS_READ_CHUNK    = 128;	/* You can't mark more than this many
    					 * texts as read in one call. */
    
    /*
     * Max number of nested super_confs a message will be forwarded before
     * the server gives up.
     */
    const int MAX_SUPER_CONF_LOOP = 17;
    
    
    const int DEFAULT_NICE = 77;	/* Number of days a text normally lives. */
    
    
    
    /* Max entries in the per-client transmit queue */
    const int MAXQUEUEDSIZE = 300;
    
    /* Max entries in the per-client transmit queue to send at any one time */
    const int MAXDEQUEUELEN = 10;
    
    /* What is whitespace? */
    const unsigned char *WHITESPACE = (const unsigned char *)" \t\f\n\r";