if (!DEBUGLEVEL) {
DEBUGLEVEL = 0;
}
+
+ /* prevent setup_logging() from closing x_stderr... */
+ dbf = 0;
setup_logging("libnetapi", true);
dbf = x_stderr;
NET_API_STATUS libnetapi_free(struct libnetapi_ctx *ctx)
{
+ if (!ctx) {
+ return NET_API_STATUS_SUCCESS;
+ }
+
libnetapi_shutdown_cm(ctx);
if (ctx->krb5_cc_env) {
/****************************************************************
****************************************************************/
+NET_API_STATUS libnetapi_set_use_kerberos(struct libnetapi_ctx *ctx)
+{
+ ctx->use_kerberos = true;
+ return NET_API_STATUS_SUCCESS;
+}
+
+/****************************************************************
+****************************************************************/
+
const char *libnetapi_errstr(NET_API_STATUS status)
{
if (status & 0xc0000000) {
****************************************************************/
const char *libnetapi_get_error_string(struct libnetapi_ctx *ctx,
- NET_API_STATUS status)
+ NET_API_STATUS status_in)
{
+ NET_API_STATUS status;
struct libnetapi_ctx *tmp_ctx = ctx;
if (!tmp_ctx) {
return tmp_ctx->error_string;
}
- return libnetapi_errstr(status);
+ return libnetapi_errstr(status_in);
}
/****************************************************************