Changeset 732 for branches/samba-3.5.x/source3/libnet/libnet_join.c
- Timestamp:
- Nov 12, 2012, 4:35:55 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.5.x/source3/libnet/libnet_join.c
r599 r732 1621 1621 static int libnet_destroy_JoinCtx(struct libnet_JoinCtx *r) 1622 1622 { 1623 const char *krb5_cc_env = NULL;1624 1625 1623 if (r->in.ads) { 1626 1624 ads_destroy(&r->in.ads); 1627 1625 } 1628 1626 1629 krb5_cc_env = getenv(KRB5_ENV_CCNAME);1630 if (krb5_cc_env && StrCaseCmp(krb5_cc_env, "MEMORY:libnetjoin")) {1631 unsetenv(KRB5_ENV_CCNAME);1632 }1633 1634 1627 return 0; 1635 1628 } … … 1640 1633 static int libnet_destroy_UnjoinCtx(struct libnet_UnjoinCtx *r) 1641 1634 { 1642 const char *krb5_cc_env = NULL;1643 1644 1635 if (r->in.ads) { 1645 1636 ads_destroy(&r->in.ads); 1646 1637 } 1647 1638 1648 krb5_cc_env = getenv(KRB5_ENV_CCNAME);1649 if (krb5_cc_env && StrCaseCmp(krb5_cc_env, "MEMORY:libnetjoin")) {1650 unsetenv(KRB5_ENV_CCNAME);1651 }1652 1653 1639 return 0; 1654 1640 } … … 1661 1647 { 1662 1648 struct libnet_JoinCtx *ctx; 1663 const char *krb5_cc_env = NULL;1664 1649 1665 1650 ctx = talloc_zero(mem_ctx, struct libnet_JoinCtx); … … 1673 1658 W_ERROR_HAVE_NO_MEMORY(ctx->in.machine_name); 1674 1659 1675 krb5_cc_env = getenv(KRB5_ENV_CCNAME);1676 if (!krb5_cc_env || (strlen(krb5_cc_env) == 0)) {1677 krb5_cc_env = talloc_strdup(mem_ctx, "MEMORY:libnetjoin");1678 W_ERROR_HAVE_NO_MEMORY(krb5_cc_env);1679 setenv(KRB5_ENV_CCNAME, krb5_cc_env, 1);1680 }1681 1682 1660 ctx->in.secure_channel_type = SEC_CHAN_WKSTA; 1683 1661 … … 1694 1672 { 1695 1673 struct libnet_UnjoinCtx *ctx; 1696 const char *krb5_cc_env = NULL;1697 1674 1698 1675 ctx = talloc_zero(mem_ctx, struct libnet_UnjoinCtx); … … 1705 1682 ctx->in.machine_name = talloc_strdup(mem_ctx, global_myname()); 1706 1683 W_ERROR_HAVE_NO_MEMORY(ctx->in.machine_name); 1707 1708 krb5_cc_env = getenv(KRB5_ENV_CCNAME);1709 if (!krb5_cc_env || (strlen(krb5_cc_env) == 0)) {1710 krb5_cc_env = talloc_strdup(mem_ctx, "MEMORY:libnetjoin");1711 W_ERROR_HAVE_NO_MEMORY(krb5_cc_env);1712 setenv(KRB5_ENV_CCNAME, krb5_cc_env, 1);1713 }1714 1684 1715 1685 *r = ctx;
Note:
See TracChangeset
for help on using the changeset viewer.