diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/kim/lib/mac/KerberosLogin.c | 27 | ||||
| -rw-r--r-- | src/kim/lib/mac/KerberosLogin.h | 48 |
2 files changed, 39 insertions, 36 deletions
diff --git a/src/kim/lib/mac/KerberosLogin.c b/src/kim/lib/mac/KerberosLogin.c index 17a7a8072..e8d7b577e 100644 --- a/src/kim/lib/mac/KerberosLogin.c +++ b/src/kim/lib/mac/KerberosLogin.c @@ -26,8 +26,6 @@ #ifdef KIM_TO_KLL_SHIM -#define KERBEROSLOGIN_DEPRECATED - #include "CredentialsCache.h" #include "KerberosLogin.h" #include "KerberosLoginPrivate.h" @@ -36,6 +34,19 @@ #include "k5-thread.h" #include <time.h> +/* + * Deprecated Error codes + */ +enum { + /* Carbon Dialog errors */ + klDialogDoesNotExistErr = 19676, + klDialogAlreadyExistsErr, + klNotInForegroundErr, + klNoAppearanceErr, + klFatalDialogErr, + klCarbonUnavailableErr +}; + krb5_get_init_creds_opt *__KLLoginOptionsGetKerberos5Options (KLLoginOptions ioOptions); KLTime __KLLoginOptionsGetStartTime (KLLoginOptions ioOptions); char *__KLLoginOptionsGetServiceName (KLLoginOptions ioOptions); @@ -161,7 +172,7 @@ KLStatus KLAcquireNewTicketsWithPassword (KLPrincipal inPrincipal, /* ------------------------------------------------------------------------ */ -KLStatus KLSetApplicationOptions (const KLApplicationOptions *inAppOptions) +KLStatus KLSetApplicationOptions (const void *inAppOptions) { /* Deprecated */ return kl_check_error (klNoErr); @@ -169,10 +180,14 @@ KLStatus KLSetApplicationOptions (const KLApplicationOptions *inAppOptions) /* ------------------------------------------------------------------------ */ -KLStatus KLGetApplicationOptions (KLApplicationOptions *outAppOptions) +KLStatus KLGetApplicationOptions (void *outAppOptions) { - /* Deprecated */ - return kl_check_error (klNoErr); + /* Deprecated -- this function took a struct declared on the caller's + * stack. It used to fill in the struct with information about the + * Mac OS 9 dialog used for automatic prompting. Since there is no + * way for us provide valid values, just leave the struct untouched + * and return a reasonable error. */ + return kl_check_error (klDialogDoesNotExistErr); } /* ------------------------------------------------------------------------ */ diff --git a/src/kim/lib/mac/KerberosLogin.h b/src/kim/lib/mac/KerberosLogin.h index b9c8262fb..8dc49e18d 100644 --- a/src/kim/lib/mac/KerberosLogin.h +++ b/src/kim/lib/mac/KerberosLogin.h @@ -34,6 +34,12 @@ # endif #endif +#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 30203 +# define KERBEROSLOGIN_DEPRECATED __attribute__((deprecated)) +#else +# define KERBEROSLOGIN_DEPRECATED +#endif + #include <sys/types.h> #include <krb5.h> @@ -152,16 +158,6 @@ enum { klInsecurePasswordErr, klPasswordChangeFailedErr, -#ifdef KERBEROSLOGIN_DEPRECATED - /* Dialog errors -- deprecated */ - klDialogDoesNotExistErr = 19676, - klDialogAlreadyExistsErr, - klNotInForegroundErr, - klNoAppearanceErr, - klFatalDialogErr, - klCarbonUnavailableErr, -#endif - /* Login IPC errors */ klCantContactServerErr = 19776, klCantDisplayUIErr, @@ -191,18 +187,6 @@ typedef int16_t KLSInt16; /* used for Darwin-compat for KLApplic typedef void (*KLIdleCallback) (KLRefCon appData); #define CallKLIdleCallback(userRoutine, appData) ((userRoutine) (appData)) -#ifdef KERBEROSLOGIN_DEPRECATED - -/* Application options */ -typedef struct { - void * deprecatedEventFilter; - KLRefCon deprecatedEventFilterAppData; - KLSInt16 deprecatedRealmsPopupMenuID; - KLSInt16 deprecatedLoginModeMenuID; -} KLApplicationOptions; - -#endif - /* Principal information */ typedef kim_identity KLPrincipal; @@ -216,31 +200,35 @@ typedef kim_options KLLoginOptions; */ /* Deprecated functions -- provided for compatibility with KfM 4.0 */ -#ifdef KERBEROSLOGIN_DEPRECATED KLStatus KLAcquireTickets (KLPrincipal inPrincipal, KLPrincipal *outPrincipal, - char **outCredCacheName); + char **outCredCacheName) + KERBEROSLOGIN_DEPRECATED; KLStatus KLAcquireNewTickets (KLPrincipal inPrincipal, KLPrincipal *outPrincipal, - char **outCredCacheName); + char **outCredCacheName) + KERBEROSLOGIN_DEPRECATED; KLStatus KLAcquireTicketsWithPassword (KLPrincipal inPrincipal, KLLoginOptions inLoginOptions, const char *inPassword, - char **outCredCacheName); + char **outCredCacheName) + KERBEROSLOGIN_DEPRECATED; KLStatus KLAcquireNewTicketsWithPassword (KLPrincipal inPrincipal, KLLoginOptions inLoginOptions, const char *inPassword, - char **outCredCacheName); + char **outCredCacheName) + KERBEROSLOGIN_DEPRECATED; -KLStatus KLSetApplicationOptions (const KLApplicationOptions *inAppOptions); +KLStatus KLSetApplicationOptions (const void *inAppOptions) + KERBEROSLOGIN_DEPRECATED; -KLStatus KLGetApplicationOptions (KLApplicationOptions *outAppOptions); +KLStatus KLGetApplicationOptions (void *outAppOptions) + KERBEROSLOGIN_DEPRECATED; -#endif /* Kerberos Login high-level API */ KLStatus KLAcquireInitialTickets (KLPrincipal inPrincipal, |
