summaryrefslogtreecommitdiffstats
path: root/src/lib/krb5/os/def_realm.c
Commit message (Collapse)AuthorAgeFilesLines
* Use hostrealm interface for realm mappingGreg Hudson2013-08-151-190/+0
| | | | | | | | | Reimplement krb5_get_host_realm, krb5_get_fallback_host_realm, and krb5_get_default_realm in terms of the hostrealm interface. Three built-in modules (dns, domain, and profile) implement the current behavior. ticket: 7687
* Add trace logging for TXT lookupsGreg Hudson2013-08-121-6/+6
| | | | | | Rename krb5_try_realm_txt_rr (an internal function despite the name) and add a context parameter. Generate trace logs when we successfully look up a record and when a record is not found.
* Move a bunch of stuff out of k5-int.hGreg Hudson2013-03-241-0/+2
| | | | | | | | | Move internal declarations from k5-int.h to more localized headers (like int-proto.h) where appropriate. Rename many symbols whose prototypes were moved to use the k5_ prefix instead of krb5int_. Remove some unused declarations or move them to the single source file they were needed in. Remove krb5_creds_compare since it isn't used any more.
* Adjust most C source files to match the new standards for copyrightGreg Hudson2011-03-091-4/+4
| | | | | | and license comments. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24695 dc483132-0cff-0310-8789-dd5450dbe970
* Move krb5int_get_domain_realm_mapping into kdc_util.c as this function is a ↵Zhanna Tsitkov2009-12-301-59/+0
| | | | | | helper in kdc code git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23546 dc483132-0cff-0310-8789-dd5450dbe970
* make mark-cstyleTom Yu2009-10-311-24/+24
| | | | | | make reindent git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23100 dc483132-0cff-0310-8789-dd5450dbe970
* Use macros for config parametersZhanna Tsitkov2009-02-041-3/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21879 dc483132-0cff-0310-8789-dd5450dbe970
* "Coding practices" related fixesZhanna Tsitkov2009-01-271-60/+48
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21808 dc483132-0cff-0310-8789-dd5450dbe970
* Eliminate the need for the domain_realm mapping table on the client side by ↵Zhanna Tsitkov2009-01-231-1/+71
| | | | | | implementing minimal referral support in the KDC git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21792 dc483132-0cff-0310-8789-dd5450dbe970
* Use strdup in place of malloc/strcpy in many placesGreg Hudson2008-10-201-7/+3
| | | | | | | ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20898 dc483132-0cff-0310-8789-dd5450dbe970
* protoizeKen Raeburn2002-09-031-9/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14816 dc483132-0cff-0310-8789-dd5450dbe970
* Split out code for getting canonical name of local host, change it to useKen Raeburn2002-01-091-18/+2
| | | | | | | getaddrinfo, and make both sites call the new function. Added new error codes to report getaddrinfo failures that don't translate to standard errno codes. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14100 dc483132-0cff-0310-8789-dd5450dbe970
* Danilo also says we can get rid of _MSDOS (Win16) tests, and explicit ↵Ken Raeburn2001-10-061-2/+2
| | | | | | FAR/NEAR specs git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13786 dc483132-0cff-0310-8789-dd5450dbe970
* Danilo says we can get rid of the DLLIMP stuff nowKen Raeburn2001-10-041-3/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13775 dc483132-0cff-0310-8789-dd5450dbe970
* 2001-07-24 Jeffrey Altman <jaltman@columbia.edu>Jeffrey Altman2001-07-241-14/+16
| | | | | | | | * def_realm.c: krb5_get_default_realm() required a profile file even when KRB5_DNS_LOOKUP was defined. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13634 dc483132-0cff-0310-8789-dd5450dbe970
* * def_realm.c: Move prototype for krb5_try_realm_txt_rr() toEzra Peisach2001-03-111-1/+0
| | | | | | | | | | | | | | os-proto.h. * init_os_ctx.c: Include os-proto.h * changepw.c, locate_kdc.c: Do not shadow sin() with local variable name. * os-proto.h: Add prototypes for krb5_try_realm_txt_rr() and the obsolete krb5_secure_config_files(). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13074 dc483132-0cff-0310-8789-dd5450dbe970
* * locate_kdc.c, hst_realm.c, def_realm.c, changepw.c: IncludeEzra Peisach2000-07-181-0/+1
| | | | | | | | | | | os-proto.h for internal prototypes. * os-proto.h: Prototypes for _krb5_use_dns_realm(), _krb5_use_dns_kdc(), _krb5_conf_boolean(). * t_std_conf.c: Include k5-int.h for internal function prototypes. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12556 dc483132-0cff-0310-8789-dd5450dbe970
* * def_realm.c: Add newline at end of fileEzra Peisach2000-06-291-1/+1
| | | | | | | | * gmt_mktime.c: Define days_in_month as type int. * locate_kdc.c (krb5_locate_srv_dns): Cleanup unused variables. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12456 dc483132-0cff-0310-8789-dd5450dbe970
* pullup from 1.2 branchKen Raeburn2000-06-271-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12442 dc483132-0cff-0310-8789-dd5450dbe970
* Added krb5_free_default_realmMiro Jurisic2000-03-201-1/+10
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12133 dc483132-0cff-0310-8789-dd5450dbe970
* * def_realm.c: Include netinet/in.h if availableKen Raeburn2000-03-141-0/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12111 dc483132-0cff-0310-8789-dd5450dbe970
* jaltman dns patchesKen Raeburn1999-09-241-0/+9
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11854 dc483132-0cff-0310-8789-dd5450dbe970
* copyright notice updates from 1.1 branchKen Raeburn1999-09-241-1/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11853 dc483132-0cff-0310-8789-dd5450dbe970
* Make sure we have FQDN in the case where we use gethostnameDanilo Almeida1999-08-091-3/+19
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11634 dc483132-0cff-0310-8789-dd5450dbe970
* * def_realm.c (krb5_get_default_realm): Check that we haveDanilo Almeida1999-08-061-1/+1
| | | | | | | a realm before trying to copy it (since profile_get_string may return no error but not get anything). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11629 dc483132-0cff-0310-8789-dd5450dbe970
* * t_std_conf.c (test_get_krbhst): Use krb5_free_krbhst toDanilo Almeida1999-08-051-17/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | free buffers allocated by krb5_get_krbhst. * locate_kdc.c (_krb5_use_dns): Add _krb_use_dns to abstract away looking up of whether we use DNS or not in the profile. * ktdefname.c (krb5_kt_default_name): Use profile_release_string instead of free to free string allocated by profile_get_string. * get_krbhst.c (krb5_get_krbhst): Copy results from profile_get_values into malloc'ed buffers so we can safely free them later. Also call profile_free_list on the original values. * locate_kdc.c (krb5_locate_kdc): * hst_realm.c (krb5_get_host_realm): * def_realm.c (krb5_get_default_realm): Use _krb5_use_dns to figure out whether to use DNS or not instead of directly reading the profile in this routine. * realm_dom.c (krb5_get_realm_domain): * hst_realm.c (krb5_get_host_realm): * def_realm.c (krb5_get_default_realm): Copy results of profile_get_string into malloc'ed buffer so it can safely be free'd later. * locate_kdc.c (krb5_locate_srv_conf): * def_realm.c (krb5_get_default_realm): * changepw.c (krb5_change_password): * an_to_ln.c (krb5_aname_to_localname): Use profile_free_list to free values allocated by profile_get_values. * init_os_ctx.c (os_init_paths): Wrap use of ctx->profile_in_memory with KRB5_DNS_LOOKUP. Use pointer value to determine whether to free files by checking the files value rather than depending on the return value. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11626 dc483132-0cff-0310-8789-dd5450dbe970
* Add profile support for libdefaults dns_fallbackJeffrey Altman1999-07-231-16/+33
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11586 dc483132-0cff-0310-8789-dd5450dbe970
* DNS lookup implementation, conditionally compiled under KRB5_DNS_LOOKUP (whichKen Raeburn1999-06-211-4/+59
| | | | | | | is not defined). Written by Ken Hornstein and Jeffrey Altman, with some minor changes from me. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11525 dc483132-0cff-0310-8789-dd5450dbe970
* Removed un-user extern declaration of krb5_config_file -Ezra Peisach1997-02-221-3/+0
| | | | | | which does not exist anymore. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9942 dc483132-0cff-0310-8789-dd5450dbe970
* Windows/NT integration (V1_0_WIN32_BRANCH merge)Richard Basch1997-02-061-3/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9788 dc483132-0cff-0310-8789-dd5450dbe970
* If the configuration file does not exist (context->profile == NULL)Theodore Tso1996-02-171-3/+3
| | | | | | | | return KRB5_CONFIG_CANTOPEN; if the default realm is not defined in the configuration file, return an error message saying so. These changes just make the diagnostic error messages more clear. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7486 dc483132-0cff-0310-8789-dd5450dbe970
* fix indentationMark Eichin1996-01-271-2/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7402 dc483132-0cff-0310-8789-dd5450dbe970
* * def_realm.c (krb5_get_default_realm): check for PROF_NO_PROFILEMark Eichin1995-11-131-1/+4
| | | | | | | and return KRB5_CONFIG_CANTOPEN instead of BADFORMAT so that the user in the end knows what is going on. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7097 dc483132-0cff-0310-8789-dd5450dbe970
* def_realm.c (krb5_get_default_realm), get_krbhst.cTheodore Tso1995-06-071-31/+0
| | | | | | | | | | | | | | | (krb5_get_krbhst), hst_realm.c (krb5_get_host_realm), init_os_ctx.c (krb5_os_init_context), osconfig.c, realm_dom.c (krb5_get_realm_domain): Remove old ifdef'ed code which read in krb.conf and krb.realms. read_pwd.c (krb5_read_password): Remove old #ifdef notdef code. Significantly simplified and cleaned up function. Removed BSD 4.3 compatibility code. (If we ever need to make this work on a non-POSIX system, we'll supply POSIX termios emulation functions in src/lib/krb5/posix.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5964 dc483132-0cff-0310-8789-dd5450dbe970
* def_realm.c (krb5_get_default_realm): Use the profile code toTheodore Tso1995-04-221-0/+15
| | | | | | | | | | | | | | | | | | | | | | | get the default realm from [libdefaults]/default_realm. get_krbhst.c (krb5_get_krbhst): Use the profile code to get the list of Kerberos servers for a particualar realm from [realms]/<realm>/kdc realm_dom.c (krb5_get_realm_domain): Use the profile code to get the default domain postfix for a realm (used only to convert V4 -> V5 principals) from [realms]/<realm>/default_domain hst_realm.c (krb5_get_host_realm): Use the profile code to get the default realm given a particular host from [domain_realm]/<host|domain> init_os_ctx.c (krb5_os_init_context): When the OS context is initialized, also initialize the profile file. This loads in the /etc/krb5.conf file. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5438 dc483132-0cff-0310-8789-dd5450dbe970
* Added storing of default realm in context. Global default realmEzra Peisach1995-04-191-19/+37
| | | | | | variable removed. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5378 dc483132-0cff-0310-8789-dd5450dbe970
* Added functionality for windows to read default file locations fromKeith Vetter1995-03-291-0/+1
| | | | | | windows ini files. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5307 dc483132-0cff-0310-8789-dd5450dbe970
* Port of most of the OS directory to the PCKeith Vetter1995-03-071-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5079 dc483132-0cff-0310-8789-dd5450dbe970
* Avoid <krb5/...> includesJohn Gilmore1995-02-281-4/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5014 dc483132-0cff-0310-8789-dd5450dbe970
* Removed all references to DECLARG and OLDDECLARG.Chris Provenzano1995-01-131-2/+3
| | | | | | | | | Added krb5_context to all krb5_routines. Moved init_ctx.c to init_os_ctx.c because a library cannot have more than on file with the same name. See krb5/krb/init_ctx.c git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4811 dc483132-0cff-0310-8789-dd5450dbe970
* stamp out rcs keywordsMark Eichin1994-08-181-6/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4191 dc483132-0cff-0310-8789-dd5450dbe970
* Fix bug which caused get_default_realm to fail the second time it was called.Theodore Tso1994-06-101-1/+1
| | | | | | (typo). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3737 dc483132-0cff-0310-8789-dd5450dbe970
* Allow default realm to be overriden by extern variableTheodore Tso1994-06-101-8/+41
| | | | | | | | | Cache default realm so that we don't have to repeatedly open /etc/krb.conf. (Also prevents possible security problems if /etc/krb.conf is over the network, and an attacker spoofs /etc/krb.conf for some calls to get_default_realm, but not all of them.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3726 dc483132-0cff-0310-8789-dd5450dbe970
* Change export warning notice from "is assumed to require an export license"Theodore Tso1993-09-011-2/+2
| | | | | | to "may require..." git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2638 dc483132-0cff-0310-8789-dd5450dbe970
* Update copyright noticeJohn Kohl1991-06-061-2/+16
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2156 dc483132-0cff-0310-8789-dd5450dbe970
* fix copyrightsJohn Kohl1991-03-051-2/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1857 dc483132-0cff-0310-8789-dd5450dbe970
* Changes to conform with API modifications (to krb5_get_default_realm)Theodore Tso1991-02-211-22/+16
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1751 dc483132-0cff-0310-8789-dd5450dbe970
* fix reference to copyright/distribution provisionsJohn Kohl1990-05-251-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@945 dc483132-0cff-0310-8789-dd5450dbe970
* fix up include filesJohn Kohl1990-05-231-3/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@915 dc483132-0cff-0310-8789-dd5450dbe970
* add const to function signatures as appropriateJohn Kohl1990-04-181-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@495 dc483132-0cff-0310-8789-dd5450dbe970