Print this page
first pass

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libsasl/lib/server.c
          +++ new/usr/src/lib/libsasl/lib/server.c
↓ open down ↓ 378 lines elided ↑ open up ↑
 379  379  int _sasl_server_add_plugin(void *ctx,
 380  380                              const char *plugname,
 381  381                              sasl_server_plug_init_t *p)
 382  382  {
 383  383      int nplug = 0;
 384  384      int i;
 385  385      mechanism_t *m;
 386  386      _sasl_global_context_t *gctx = ctx == NULL ? _sasl_gbl_ctx() : ctx;
 387  387      mech_list_t *mechlist = gctx->mechlist;
 388  388  
 389      -    /* EXPORT DELETE START */
 390      -    /* CRYPT DELETE START */
 391  389  #ifdef _INTEGRATED_SOLARIS_
 392  390      int sun_reg;
 393  391  #endif /* _INTEGRATED_SOLARIS_ */
 394      -    /* CRYPT DELETE END */
 395      -    /* EXPORT DELETE END */
 396  392  #else
 397  393  {
 398  394  #endif /* _SUN_SDK_ */
 399  395      int plugcount;
 400  396      sasl_server_plug_t *pluglist;
 401  397      mechanism_t *mech;
 402  398      sasl_server_plug_init_t *entry_point;
 403  399      int result;
 404  400      int version;
 405  401      int lupe;
↓ open down ↓ 16 lines elided ↑ open up ↑
 422  418          return result;
 423  419  
 424  420  #endif /* _SUN_SDK_ */
 425  421      entry_point = (sasl_server_plug_init_t *)p;
 426  422  
 427  423      /* call into the shared library asking for information about it */
 428  424      /* version is filled in with the version of the plugin */
 429  425      result = entry_point(mechlist->utils, SASL_SERVER_PLUG_VERSION, &version,
 430  426                           &pluglist, &plugcount);
 431  427  
 432      -    /* EXPORT DELETE START */
 433      -    /* CRYPT DELETE START */
 434  428  #ifdef _INTEGRATED_SOLARIS_
 435  429      sun_reg = _is_sun_reg(pluglist);
 436  430  #endif /* _INTEGRATED_SOLARIS_ */
 437      -    /* CRYPT DELETE END */
 438      -    /* EXPORT DELETE END */
 439  431  
 440  432  #ifdef _SUN_SDK_
 441  433      if (result != SASL_OK) {
 442  434          UNLOCK_MUTEX(&server_plug_mutex);
 443  435          __sasl_log(gctx, gctx->server_global_callbacks.callbacks,
 444  436                     SASL_LOG_DEBUG,
 445  437                     "server add_plugin entry_point error %z", result);
 446  438  #else
 447  439      if ((result != SASL_OK) && (result != SASL_NOUSER)) {
 448  440          _sasl_log(NULL, SASL_LOG_DEBUG,
↓ open down ↓ 57 lines elided ↑ open up ↑
 506  498          mech->plug=pluglist++;
 507  499          if(_sasl_strdup(plugname, &mech->plugname, NULL) != SASL_OK) {
 508  500  #ifdef _SUN_SDK_
 509  501              UNLOCK_MUTEX(&server_plug_mutex);
 510  502  #endif /* _SUN_SDK_ */
 511  503              sasl_FREE(mech);
 512  504              return SASL_NOMEM;
 513  505          }
 514  506          mech->version = version;
 515  507  #ifdef _SUN_SDK_
 516      -        /* EXPORT DELETE START */
 517      -        /* CRYPT DELETE START */
 518  508  #ifdef _INTEGRATED_SOLARIS_
 519  509          mech->sun_reg = sun_reg;
 520  510  #endif /* _INTEGRATED_SOLARIS_ */
 521      -        /* CRYPT DELETE END */
 522      -        /* EXPORT DELETE END */
 523  511  
 524  512          /* whether this mech actually has any users in it's db */
 525  513          mech->condition = SASL_OK;
 526  514  #else
 527  515          /* whether this mech actually has any users in it's db */
 528  516          mech->condition = result; /* SASL_OK or SASL_NOUSER */
 529  517  #endif /* _SUN_SDK_ */
 530  518  
 531  519          mech->next = mechlist->mech_list;
 532  520          mechlist->mech_list = mech;
↓ open down ↓ 951 lines elided ↑ open up ↑
1484 1472  
1485 1473      /* Check if we have banished this one already */
1486 1474      for(cur = s_conn->mech_contexts; cur; cur=cur->next) {
1487 1475          if(cur->mech == mech) {
1488 1476              /* If it's not mech_avail'd, then stop now */
1489 1477              if(!cur->context) return 0;
1490 1478              break;
1491 1479          }
1492 1480      }
1493 1481      
1494      -    /* EXPORT DELETE START */
1495      -    /* CRYPT DELETE START */
1496 1482  #ifdef _INTEGRATED_SOLARIS_
1497 1483      if (!mech->sun_reg) {
1498 1484          s_conn->sparams->props.min_ssf = 0;
1499 1485          s_conn->sparams->props.max_ssf = 0;
1500 1486      }
1501 1487      s_conn->base.sun_reg = mech->sun_reg;
1502 1488  #endif /* _INTEGRATED_SOLARIS_ */
1503      -    /* CRYPT DELETE END */
1504      -    /* EXPORT DELETE END */
1505 1489      if (conn->props.min_ssf < conn->external.ssf) {
1506 1490          minssf = 0;
1507 1491      } else {
1508 1492          minssf = conn->props.min_ssf - conn->external.ssf;
1509 1493      }
1510 1494      
1511 1495      /* Generic mechanism */
1512      -    /* EXPORT DELETE START */
1513      -    /* CRYPT DELETE START */
1514 1496  #ifdef _INTEGRATED_SOLARIS_
1515 1497      /* If not SUN supplied mech, it has no strength */
1516 1498      if (plug->max_ssf < minssf || (minssf > 0 && !mech->sun_reg)) {
1517 1499  #else
1518      -    /* CRYPT DELETE END */
1519      -    /* EXPORT DELETE END */
1520 1500      if (plug->max_ssf < minssf) {
1521      -    /* EXPORT DELETE START */
1522      -    /* CRYPT DELETE START */
1523 1501  #endif /* _INTEGRATED_SOLARIS_ */
1524      -    /* CRYPT DELETE END */
1525      -    /* EXPORT DELETE END */
1526 1502  #ifdef _INTEGRATED_SOLARIS_
1527 1503          sasl_seterror(conn, SASL_NOLOG,
1528 1504                        gettext("mech %s is too weak"), plug->mech_name);
1529 1505  #else
1530 1506          sasl_seterror(conn, SASL_NOLOG,
1531 1507                        "mech %s is too weak", plug->mech_name);
1532 1508  #endif /* _INTEGRATED_SOLARIS_ */
1533 1509          return 0; /* too weak */
1534 1510      }
1535 1511  
↓ open down ↓ 33 lines elided ↑ open up ↑
1569 1545  #endif /* _SUN_SDK_ */
1570 1546              return 0;
1571 1547          }
1572 1548          cur->context = context;
1573 1549          cur->mech = mech;
1574 1550          cur->next = s_conn->mech_contexts;
1575 1551          s_conn->mech_contexts = cur;
1576 1552      }
1577 1553      
1578 1554      /* Generic mechanism */
1579      -    /* EXPORT DELETE START */
1580      -    /* CRYPT DELETE START */
1581 1555  #ifdef _INTEGRATED_SOLARIS_
1582 1556      /* If not SUN supplied mech, it has no strength */
1583 1557      if (plug->max_ssf < minssf || (minssf > 0 && !mech->sun_reg)) {
1584 1558  #else
1585      -    /* CRYPT DELETE END */
1586      -    /* EXPORT DELETE END */
1587 1559      if (plug->max_ssf < minssf) {
1588      -    /* EXPORT DELETE START */
1589      -    /* CRYPT DELETE START */
1590 1560  #endif /* _INTEGRATED_SOLARIS_ */
1591      -    /* CRYPT DELETE END */
1592      -    /* EXPORT DELETE END */
1593 1561  #ifdef _INTEGRATED_SOLARIS_
1594 1562          sasl_seterror(conn, SASL_NOLOG, gettext("too weak"));
1595 1563  #else
1596 1564          sasl_seterror(conn, SASL_NOLOG, "too weak");
1597 1565  #endif /* _INTEGRATED_SOLARIS_ */
1598 1566          return 0; /* too weak */
1599 1567      }
1600 1568  
1601 1569  #ifndef _SUN_SDK_
1602 1570      /* if there are no users in the secrets database we can't use this 
↓ open down ↓ 975 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX