summaryrefslogtreecommitdiff
path: root/server/main.c
Commit message (Collapse)AuthorAge
* Don't send to realms with no serversGravatar Jeffrey Hutzelman2013-03-18
| | | | | | | | | | | | | | | | | | | | | | When we are using c-ares to resolve otherrealm server names asynchronously, there is a period of time during startup during which a realm may have no servers whose names we have successfully resolved. This can also happen when a realm is added, or when servers for a realm are deleted, and even without asynchronous resolution, it can happen if we are having trouble resolving names. We now avoid trying to send notices to realms for which there are no usable servers (that is, servers which are not deleted, not marked nosend, and whose names have been resolved). Currently, when this happens, the notice to be sent is just dropped on the floor. Arguably, we should manage a queue of packets waiting to be sent to such a realm, and resend them if we ever discover a usable server. But that would be complicated. In addition, since we are basically never ready to send realm wakeups when processing the realm.list, they are now deferred until the first server's name has been resolved (and then, until the timer queue is processed). This has the additional effect of causing wakeups to be sent for realms which appear during a realm.list reload.
* server: c-ares supportGravatar Jeffrey Hutzelman2013-03-18
| | | | | | Add the bits we need to be able to use c-ares for DNS operations in the server. This handles initialization and making sure the resolver's sockets and timeouts are considered in the main loop.
* rearrange so that most of the server code can be linked without main.cGravatar Karl Ramm2013-03-16
| | | | | Move global variables and one function out of main.c so that the rest of the server can be linked with a test harness.
* Reload other realms on SIGHUP/resetGravatar Jeffrey Hutzelman2013-02-17
|
* Clean up warningsGravatar Jeffrey Hutzelman2013-02-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminate compiler warnings due to various issues (listed below). This allows Zephyr to build cleanly under GCC versions ranging from 4.1.0 to 4.7.2 with all of the options shown below: -g -O2 -Wall -Werror -Wno-deprecated-declarations -Wmissing-declarations -Wpointer-arith -Wstrict-prototypes -Wshadow -Wextra -Wno-missing-field-initializers -Wno-unused-parameter and, on recent versions, -Wunreachable-code Test builds were done - On Ubuntu 12.10 (Quantal Quetzal) using both MIT Kerberos 1.10.1 and Heimdal 1.6, without krb4 and both with and without C-Ares and Hesiod - On Fedora 14 using Heimdal 0.6, without C-Ares or Hesiod and both with and without krb4 (KTH Kerberos 1.3rc2) - On Fedora Core 3, Fedora Core 5, Fedora 7, and Fedora 10, using Heimdal 0.6 and without C-Ares, Hesiod, or krb4 It also allows clean builds on Solaris 10 under the Sun Studio 12 (9/07) C compiler with the following options: -g -fd -v -errfmt -errhdr=%user -errtags=yes -errwarn=%all -erroff=E_OLD_STYLE_FUNC_DECL,E_ENUM_TYPE_MISMATCH_ARG,E_ARG_INCOMPATIBLE_WITH_ARG ... and under Solaris 9 with the Sun Forte 7 (3/02) C compiler with the above options and -erroff=E_FUNC_HAS_NO_RETURN_STMT. Solaris builds were done with Heimdal 0.6 and without C-Ares, Hesiod, or krb4. The following types of issues are addressed in this change: - Parameters and local variables with the same names as library functions - Parameters and local variables with the same names as globals - Declarations for exported global variables missing from headers - Prototypes for exported functions missing from headers - Missing 'static' on functions that shouldn't be exported - Old-style function declarations - Duplicate declarations - Type mismatches - Unused variables and functions - Uninitialized variables - Forward references to enums - Necessary header files not included - Violations of the aliasing rules, where GCC was able to detect them - Missing braces on if blocks that might be empty - Attempts to do pointer arithmetic on pointers of type void *, which is not permitted in standard C. - An attempt to pass a function pointer via a void * parameter, which is not permitted in standard C. Instead, we now pass a pointer to a structure, which then contains the required function pointer. - Unnecessary inclusion of <krb5_err.h>, which is already included by <krb5.h> when the former exists, and might not be protected against double inclusion, depending on which com_err was used. - Missing include of <com_err.h>, which was masked by the fact that it is included by headers generated by e2fsprogs compile_et - Use of com_err() with a non-constant value in place of the format string, which in every case was a fixed-size buffer in which a message was built using sprintf(!). Both the calls to sprintf and the fixed-size buffers have been removed, in favor of just letting com_err() do the formatting. - Various cases where X library functions expecting a parameter of type wchar_t * were instead passed a parameter of type XChar2b *. The two types look similar, but are not the same and are _not_ interchangeable. - An overly-simplistic configure test which failed to detect existence of <term.h> on Solaris, due to not including <curses.h>. - Using the wrong type for the flags output of krb5_auth_con_getflags() when building against Heimdal. A configure test is added to detect the correct type.
* Drop stale code for long-lost debugging malloc.Gravatar Karl Ramm2010-12-19
|
* remove a stupid cpp trickGravatar Karl Ramm2010-12-19
|
* stop using MAXHOSTNAMELEN in a variety of places. Also ↵Gravatar Karl Ramm2010-08-24
| | | | nuke-trailing-whitespace.
* Fix getting data out of gethostbyname; should fix #69Gravatar Karl Ramm2010-07-28
|
* apple error table initialization for #41Gravatar Karl Ramm2009-04-02
|
* keep zephyrd's ticket files in /var/run, not under /etcGravatar Karl Ramm2009-03-31
|
* don't set a nonexistent handler for SIGEMTGravatar Karl Ramm2009-03-24
|
* of course, it helps if you define itGravatar Karl Ramm2008-12-22
|
* Let krb5-only users also override the realm nameGravatar Karl Ramm2008-12-22
|
* no more SO_BSDCOMPAT in the serverGravatar Karl Ramm2008-12-20
|
* collapse state of a bunch of #if 0 and #if 1 debugging outputGravatar Karl Ramm2008-01-21
|
* passes gcc -Wall with no warnings other than des cryppt C_block sadness and ↵Gravatar Karl Ramm2008-01-21
| | | | getsid problem
* de K&RifyGravatar Karl Ramm2008-01-21
|
* no, -4 does _not_ take an argumentGravatar Karl Ramm2007-12-28
|
* ostensibly accept both sorts of authentication when offering brain dumps, ↵Gravatar Karl Ramm2007-12-28
| | | | and have a command line switch to choose between the sort you use when getting them
* applied athena-update-branch patchGravatar Karl Ramm2007-12-25
|
* debian patch applied and reconciled, version unfinalizedGravatar Karl Ramm2007-07-20
|
* Changes from CMU:Gravatar Garry Zacheiss2001-02-26
| | | | | | * Better interrealm support: Let other realms know we booted, set realm correctly we so can override from the command line, and kill any children that are trying to get tickets.
* Some RCS ID cleanup: delete $Log$ and replace other RCS keywords with $Id$.Gravatar Greg Hudson1999-01-22
|
* Oops, fix sysconfdir back to sysconfdir/zephyr.Gravatar Greg Hudson1998-06-11
|
* Remember to process timers.Gravatar Greg Hudson1998-05-27
|
* ZEPHYR_USES_KERBEROS -> HAVE_KRB4; ZEPHYR_USES_HESIOD -> HAVE_HESIODGravatar Greg Hudson1997-10-25
|
* confdir became sysconfdir.Gravatar Greg Hudson1997-09-23
|
* Pull in sources from zephyr locker. See /mit/zephyr/repository forGravatar Greg Hudson1997-09-14
| | | | detailed change information.
* Not everything defines SIGEMT.Gravatar Greg Hudson1994-11-11
|
* Some unnecessary code eliminated; initialize t_local earlier onGravatar Greg Hudson1994-10-31
| | | | | to avoid some timer problems; dump triplet database along with subscriptions so we can check consistency.
* Include <string.h> instead of <strings.h> (portability)Gravatar Richard Basch1994-08-18
|
* Don't do signal blocking; simply set a semaphore flag indicating it isGravatar Richard Basch1994-08-01
| | | | | in critical code, and let the main loop deal with the flag being set. This saves on context switches into the kernel for this rare condition.
* Declare t_local here, where it is initializedGravatar Richard Basch1994-03-15
|
* After each select() loop, re-initialize t_local for other uses.Gravatar Richard Basch1994-03-15
|
* POSIX signal handlingGravatar Richard Basch1993-11-19
| | | | | For POSIX, use sysconf(_SC_OPEN_MAX) in lieu of getdtablesize() Changed bzero/bcopy to memset/memcpy [ANSI]
* Changed bcopy/bzero to _BCOPY/_BZERO (defined in <zephyr/zephyr_conf.h>)Gravatar Richard Basch1993-09-24
| | | | Added POSIX signal handling
* Changed some of the logging levelsGravatar Richard Basch1993-03-22
|
* Add support for K&R CGravatar Lucien Van Elsen1992-08-26
|
* saber complains about pure assignment statements in ifs-Gravatar Lucien Van Elsen1992-08-14
|
* added support for debugging mallocGravatar Lucien Van Elsen1992-08-10
|
* add stub function for init'ing db from file on startupGravatar Lucien Van Elsen1992-01-17
| | | | | turn off other debugging info (for speed) always increment reference counts when dup'ing zstrings.
* Converted back to ANSI C (with ifdef's for standard C)Gravatar Lucien Van Elsen1991-12-04
|
* Use moncontrol only on some architectures.Gravatar Kenneth G Raeburn1991-03-21
| | | | | Remove SigBlock stuff. Init nacklist statically, not at runtime.
* nacklist is now initialized statically.Gravatar Kenneth G Raeburn1991-03-13
|
* Removed use of SignalBlock.Gravatar Kenneth G Raeburn1991-03-13
|
* Initialize nacklist with pointer to bss, rather than calling malloc.Gravatar Kenneth G Raeburn1991-03-08
|
* Deleted initialization of bdump_sin.Gravatar Kenneth G Raeburn1991-01-28
| | | | | | | Removed explicit uses of normal default initializers. Say "dump done" after dumping strings. Seed random number generator. Don't bother with popular_ZStrings.
* A/UX doesn't have setpriority.Gravatar Kenneth G Raeburn1990-12-21
|
* Always log "ready for action" message.Gravatar Kenneth G Raeburn1990-12-16
|