summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-09-10 22:53:44 +0200
committerGünther Deschner <gd@samba.org>2009-09-11 00:36:59 +0200
commit3c70480f3b01befe3fa8e7f0bdf5853949d55449 (patch)
tree642be085284f97720d0db8691c243c8c462a80af /source3/lib
parent8bd730f5ad19d5f4f6cfe65c95db66768b33845f (diff)
downloadsamba-3c70480f3b01befe3fa8e7f0bdf5853949d55449.tar.gz
samba-3c70480f3b01befe3fa8e7f0bdf5853949d55449.tar.bz2
samba-3c70480f3b01befe3fa8e7f0bdf5853949d55449.zip
s3-util: add get/set_cmdline_auth_info_domain to user_auth_info struct.
Guenther
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index ae630826d4..b066a0d346 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -308,6 +308,24 @@ void set_cmdline_auth_info_username(struct user_auth_info *auth_info,
}
}
+const char *get_cmdline_auth_info_domain(const struct user_auth_info *auth_info)
+{
+ if (!auth_info->domain) {
+ return "";
+ }
+ return auth_info->domain;
+}
+
+void set_cmdline_auth_info_domain(struct user_auth_info *auth_info,
+ const char *domain)
+{
+ TALLOC_FREE(auth_info->domain);
+ auth_info->domain = talloc_strdup(auth_info, domain);
+ if (!auth_info->domain) {
+ exit(ENOMEM);
+ }
+}
+
const char *get_cmdline_auth_info_password(const struct user_auth_info *auth_info)
{
if (!auth_info->password) {