summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-01-07 18:46:07 +0100
committerGünther Deschner <gd@samba.org>2008-01-07 19:38:48 +0100
commit077eaafed5ac61d5091b35c9fc7d7c768fd67ad3 (patch)
tree64fe55a6f5b07a8832454759fc7cb42abaf2a47f /source3
parent528d253cc834235213f29411a058485681260140 (diff)
downloadsamba-077eaafed5ac61d5091b35c9fc7d7c768fd67ad3.tar.gz
samba-077eaafed5ac61d5091b35c9fc7d7c768fd67ad3.tar.bz2
samba-077eaafed5ac61d5091b35c9fc7d7c768fd67ad3.zip
Add error_string to libnetjoin and libnetunjoin structures incl. set functions.
Guenther (This used to be commit 4f9985bb33aa5973e6b685a45039c8e227487db1)
Diffstat (limited to 'source3')
-rw-r--r--source3/libnet/libnet_join.c36
-rw-r--r--source3/libnet/libnet_join.h2
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;
};