Print this page
first pass


1469         if (access(keytab, R_OK) != 0) {
1470             utils->log(NULL, SASL_LOG_ERR,
1471                        "Could not find keytab file: %s: %m",
1472                        keytab, errno);
1473             return SASL_FAIL;
1474         }
1475         
1476         if(strlen(keytab) > 1024) {
1477             utils->log(NULL, SASL_LOG_ERR,
1478                        "path to keytab is > 1024 characters");
1479             return SASL_BUFOVER;
1480         }
1481         
1482         strncpy(keytab_path, keytab, 1024);
1483         
1484         gsskrb5_register_acceptor_identity(keytab_path);
1485     }
1486 #endif
1487 #endif /* !_SUN_SDK_ */
1488     
1489     /* EXPORT DELETE START */
1490     /* CRYPT DELETE START */
1491 #ifdef _INTEGRATED_SOLARIS_
1492     /*
1493      * Let libsasl know that we are a "Sun" plugin so that privacy
1494      * and integrity will be allowed.
1495      */
1496     REG_PLUG("GSSAPI", gssapi_server_plugins);
1497 #endif /* _INTEGRATED_SOLARIS_ */
1498     /* CRYPT DELETE END */
1499     /* EXPORT DELETE END */
1500 
1501     *out_version = SASL_SERVER_PLUG_VERSION;
1502     *pluglist = gssapi_server_plugins;
1503     *plugcount = 1;  
1504     
1505     return SASL_OK;
1506 }
1507 
1508 /*****************************  Client Section  *****************************/
1509 
1510 static int gssapi_client_mech_new(void *glob_context __attribute__((unused)), 
1511                                   sasl_client_params_t *params,
1512                                   void **conn_context)
1513 {
1514     context_t *text;
1515 #ifdef _SUN_SDK_
1516     const char *use_authid = NULL;
1517 #endif /* _SUN_SDK_ */
1518     
1519     /* holds state are in */


2169 #endif /* _SUN_SDK_ && GSSAPI_PROTECT */
2170         &gssapi_common_mech_dispose,        /* mech_dispose */
2171         NULL,                           /* mech_free */
2172         NULL,                           /* idle */
2173         NULL,                           /* spare */
2174         NULL                            /* spare */
2175     }
2176 };
2177 
2178 int gssapiv2_client_plug_init(const sasl_utils_t *utils __attribute__((unused)), 
2179                               int maxversion,
2180                               int *out_version, 
2181                               sasl_client_plug_t **pluglist,
2182                               int *plugcount)
2183 {
2184     if (maxversion < SASL_CLIENT_PLUG_VERSION) {
2185         SETERROR(utils, "Version mismatch in GSSAPI");
2186         return SASL_BADVERS;
2187     }
2188     
2189     /* EXPORT DELETE START */
2190     /* CRYPT DELETE START */
2191 #ifdef _INTEGRATED_SOLARIS_
2192     /*
2193      * Let libsasl know that we are a "Sun" plugin so that privacy
2194      * and integrity will be allowed.
2195      */
2196     REG_PLUG("GSSAPI", gssapi_client_plugins);
2197 #endif /* _INTEGRATED_SOLARIS_ */
2198     /* CRYPT DELETE END */
2199     /* EXPORT DELETE END */
2200 
2201     *out_version = SASL_CLIENT_PLUG_VERSION;
2202     *pluglist = gssapi_client_plugins;
2203     *plugcount = 1;
2204     
2205     return SASL_OK;
2206 }


1469         if (access(keytab, R_OK) != 0) {
1470             utils->log(NULL, SASL_LOG_ERR,
1471                        "Could not find keytab file: %s: %m",
1472                        keytab, errno);
1473             return SASL_FAIL;
1474         }
1475         
1476         if(strlen(keytab) > 1024) {
1477             utils->log(NULL, SASL_LOG_ERR,
1478                        "path to keytab is > 1024 characters");
1479             return SASL_BUFOVER;
1480         }
1481         
1482         strncpy(keytab_path, keytab, 1024);
1483         
1484         gsskrb5_register_acceptor_identity(keytab_path);
1485     }
1486 #endif
1487 #endif /* !_SUN_SDK_ */
1488     


1489 #ifdef _INTEGRATED_SOLARIS_
1490     /*
1491      * Let libsasl know that we are a "Sun" plugin so that privacy
1492      * and integrity will be allowed.
1493      */
1494     REG_PLUG("GSSAPI", gssapi_server_plugins);
1495 #endif /* _INTEGRATED_SOLARIS_ */


1496 
1497     *out_version = SASL_SERVER_PLUG_VERSION;
1498     *pluglist = gssapi_server_plugins;
1499     *plugcount = 1;  
1500     
1501     return SASL_OK;
1502 }
1503 
1504 /*****************************  Client Section  *****************************/
1505 
1506 static int gssapi_client_mech_new(void *glob_context __attribute__((unused)), 
1507                                   sasl_client_params_t *params,
1508                                   void **conn_context)
1509 {
1510     context_t *text;
1511 #ifdef _SUN_SDK_
1512     const char *use_authid = NULL;
1513 #endif /* _SUN_SDK_ */
1514     
1515     /* holds state are in */


2165 #endif /* _SUN_SDK_ && GSSAPI_PROTECT */
2166         &gssapi_common_mech_dispose,        /* mech_dispose */
2167         NULL,                           /* mech_free */
2168         NULL,                           /* idle */
2169         NULL,                           /* spare */
2170         NULL                            /* spare */
2171     }
2172 };
2173 
2174 int gssapiv2_client_plug_init(const sasl_utils_t *utils __attribute__((unused)), 
2175                               int maxversion,
2176                               int *out_version, 
2177                               sasl_client_plug_t **pluglist,
2178                               int *plugcount)
2179 {
2180     if (maxversion < SASL_CLIENT_PLUG_VERSION) {
2181         SETERROR(utils, "Version mismatch in GSSAPI");
2182         return SASL_BADVERS;
2183     }
2184     


2185 #ifdef _INTEGRATED_SOLARIS_
2186     /*
2187      * Let libsasl know that we are a "Sun" plugin so that privacy
2188      * and integrity will be allowed.
2189      */
2190     REG_PLUG("GSSAPI", gssapi_client_plugins);
2191 #endif /* _INTEGRATED_SOLARIS_ */


2192 
2193     *out_version = SASL_CLIENT_PLUG_VERSION;
2194     *pluglist = gssapi_client_plugins;
2195     *plugcount = 1;
2196     
2197     return SASL_OK;
2198 }