Commit Graph

36 Commits

Author SHA1 Message Date
Todd C. Miller
840acbd3ac Update copyright years. 2008-11-09 14:13:13 +00:00
Todd C. Miller
13e2ccea68 Newer heimdal has 2-argument krb5_get_init_creds_opt_free() like MIT krb5.
Really old heimdal has no krb5_get_init_creds_opt_alloc() at all.  Add
configure tests to handle all the cases.
2008-10-23 16:06:23 +00:00
Todd C. Miller
dd2c345be9 Avoid Heimdal'isms introduced in the rev 1.32 rewrite of verify_krb_v5_tgt() 2008-02-13 22:17:14 +00:00
Todd C. Miller
0851d77f10 Delay krb5_cc_initialize() until we actually need to use the cred cache,
which is what krb5_verify_user() does.
Better cleanup on failure.
2008-01-13 14:49:43 +00:00
Todd C. Miller
584ab252d7 Rewrite verify_krb_v5_tgt() based on what heimdal's krb5_verify_user() does. 2008-01-12 17:40:43 +00:00
Todd C. Miller
c572e31ff5 Remove call to krb5_cc_register() as it is not needed for modern kerb5. 2007-09-05 22:39:55 +00:00
Todd C. Miller
19fa259480 Remove support for compilers that don't support void * 2007-08-31 23:30:07 +00:00
Todd C. Miller
fc38e7c21e o use krb5_verify_user() if available instead of doing it by hand
o use krb5_init_secure_context() if we have it
 o pass an encryption type of 0 to krb5_kt_read_service_key() instead of
   ENCTYPE_DES_CBC_MD5 to let kerberos choose.
2007-06-09 11:24:49 +00:00
Todd C. Miller
8d97321150 If we cannot get a valid service key using the default keytab it
is a fatal error.  Fixes a bug where sudo could be tricked into
allowing access when it should not by a fake KDC.
From Thor Lancelot Simon.
2007-06-07 11:22:22 +00:00
Todd C. Miller
d857334e61 The component in krb5_principal_get_comp_string() should be 1, not 0
for Heimdal.  From Alex Plotnick.
2005-03-30 04:38:25 +00:00
Todd C. Miller
778d587063 Update copyright years. 2005-02-12 22:56:07 +00:00
Todd C. Miller
3b8b88407f Add __unused to rcsids 2005-01-27 15:42:30 +00:00
Todd C. Miller
2c2daa8eca Use: #include <config.h>
Not: #include "config.h"
That way we get the correct config.h when build dir != src dir
2004-11-19 18:39:14 +00:00
Todd C. Miller
8268535ccc update (c) year 2004-06-07 00:02:56 +00:00
Todd C. Miller
77791e7ab3 Remove trailing spaces, no actual code changes. 2004-06-06 23:58:15 +00:00
Todd C. Miller
631cbc2857 krb5_mcc_ops should be const; Johnny C. Lam 2004-03-22 18:35:09 +00:00
Todd C. Miller
56b5cbc899 More to a less restrictive, ISC-style license. 2004-02-13 21:36:47 +00:00
Todd C. Miller
c03ffb1972 remove errant semicolon that prevented compilation under heimdal 2003-04-21 18:47:05 +00:00
Todd C. Miller
8b45d6459c add DARPA credit on affected files 2003-04-16 00:42:10 +00:00
Todd C. Miller
4a2da4c965 Use krb5_princ_component() instead of krb5_princ_realm() for MIT Kerberos
like we did before I messed things up ;-)

Use krb5_principal_get_comp_string() to do the same thing w/ Heimdal.
I'm not sure if the component should be 0 or 1 in this case.

#define ENCTYPE_DES_CBC_MD5 ETYPE_DES_CBC_MD5 for Heimdal since
older versions lack ENCTYPE_DES_CBC_MD5.  This is gross and there
should be a configure check for this I guess.
2003-04-14 20:49:27 +00:00
Todd C. Miller
cfeec138e1 Make this compile on Heimdal and MIT Kerberos 5 2003-04-04 17:46:57 +00:00
Todd C. Miller
d220757146 Replace ETYPE_DES_CBC_MD5 with ENCTYPE_DES_CBC_MD5. The former
is no longer defined by MIT kerb5 (though it used to be and indeed
remains so in Heimdal).
2003-04-04 03:04:09 +00:00
Todd C. Miller
58887b76b0 Correct number of args to krb5_principal_get_realm() and fix an unclosed
comment that hid the bug.
2003-04-02 18:57:34 +00:00
Todd C. Miller
d6a9e16d95 update copyright year 2003-03-15 20:37:44 +00:00
Todd C. Miller
80013dd915 Make this compile w/ Heimdal and fix some gcc warnings. 2003-03-15 19:10:38 +00:00
Todd C. Miller
65fad4df35 o Reorder some headers and use STDC_HEADERS define properly
o Update copyright year
2001-12-14 19:52:54 +00:00
Todd C. Miller
3acdd5b02f New krb5 code from Frank Cusack <fcusack@iconnet.net>. 1999-10-13 02:34:55 +00:00
Todd C. Miller
13bf42675d Add support for "Defaults" line in sudoers to make configuration variables
changable at runtime (and on a global, per-host and per-user basis).
Both the names and the internal representation are still subject to change.
It was necessary to make sudo_user.runas but a char ** instead of a
char * since this value can be changed by a Defaults line.  There is a
similar (but more complicated) issue with sudo_user.prompt but it
is handled differently at the moment.

Add a "-L" flag to list the name of options with their descriptions.  This
may only be temporary.

Move some prototypes to parse.h

Be much less restrictive on what is allowed for a username.
1999-09-08 08:06:28 +00:00
Todd C. Miller
17f02dfb12 Minor changes, mostly cosmetic. verify_krb_v5_tgt() changed to return a value more like a system function 1999-08-26 09:20:32 +00:00
Todd C. Miller
d40947c0b0 In struct sudo_auth, turn need_root and configured into flags and
add a flag to specify an auth method is running alone (the only
one).  Pass auth methods their sudo_auth pointer, not the data
pointer.  This allows us to get at the flags and tell if we are the
only auth method.  That, in turn, allows the method to be able to
decide what should/should not be a fatal error.  Currently only
rfc1938 uses it this way, which allows us to kill the OTP_ONLY
define and te hackery that went with it.  With access to the
sudo_auth struct, methods can also get at a string holding their
cannonical name (useful in error messages).
1999-08-14 15:36:47 +00:00
Todd C. Miller
0d732401f4 add 4th term to license similar to term 5 in the apache license 1999-07-31 16:19:50 +00:00
Todd C. Miller
a1e0a8180a auth API change. There is now an init method that gets run before
the main loop.  This allows auth routines to differentiate between
initialization that happens once vs. setup that needs to run each time
through the loop.
1999-07-22 19:48:27 +00:00
Todd C. Miller
8d72a57eb9 use easprintf() and evasprintf() 1999-07-22 16:23:13 +00:00
Todd C. Miller
43499ea5ea o BSD-style copyright
o Use new log functiongs
o Use asprintf() and snprintf() where sensible.
1999-07-22 12:24:42 +00:00
Todd C. Miller
baadc4ede3 more or less complete now--still untested 1999-07-11 19:19:18 +00:00
Todd C. Miller
169d85ac9e New authentication API and methods 1999-07-11 00:32:11 +00:00