diff options
Diffstat (limited to 'source3/libnet')
-rw-r--r-- | source3/libnet/libnet_join.c | 36 | ||||
-rw-r--r-- | source3/libnet/libnet_join.h | 2 |
2 files changed, 38 insertions, 0 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c index 36d5c0a889..95088606a2 100644 --- a/source3/libnet/libnet_join.c +++ b/source3/libnet/libnet_join.c @@ -22,6 +22,42 @@ #include "libnet/libnet_join.h" #include "libnet/libnet_proto.h" +/**************************************************************** +****************************************************************/ + +static void libnet_join_set_error_string(TALLOC_CTX *mem_ctx, + struct libnet_JoinCtx *r, + const char *format, ...) +{ + va_list args; + char *tmp = NULL; + + va_start(args, format); + tmp = talloc_vasprintf(mem_ctx, format, args); + va_end(args); + + TALLOC_FREE(r->out.error_string); + r->out.error_string = tmp; +} + +/**************************************************************** +****************************************************************/ + +static void libnet_unjoin_set_error_string(TALLOC_CTX *mem_ctx, + struct libnet_UnjoinCtx *r, + const char *format, ...) +{ + va_list args; + char *tmp = NULL; + + va_start(args, format); + tmp = talloc_vasprintf(mem_ctx, format, args); + va_end(args); + + TALLOC_FREE(r->out.error_string); + r->out.error_string = tmp; +} + static bool libnet_join_joindomain_store_secrets(TALLOC_CTX *mem_ctx, struct libnet_JoinCtx *r) { diff --git a/source3/libnet/libnet_join.h b/source3/libnet/libnet_join.h index 9e7b8a9813..ac1fe6efcb 100644 --- a/source3/libnet/libnet_join.h +++ b/source3/libnet/libnet_join.h @@ -44,6 +44,7 @@ struct libnet_JoinCtx { struct dom_sid *domain_sid; bool modified_config; WERROR result; + char *error_string; } out; }; @@ -61,6 +62,7 @@ struct libnet_UnjoinCtx { struct { bool modified_config; WERROR result; + char *error_string; } out; }; |