The branch, master has been updated via 3c70480f3b01befe3fa8e7f0bdf5853949d55449 (commit) from 8bd730f5ad19d5f4f6cfe65c95db66768b33845f (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 3c70480f3b01befe3fa8e7f0bdf5853949d55449 Author: Günther Deschner <g...@samba.org> Date: Thu Sep 10 22:53:44 2009 +0200 s3-util: add get/set_cmdline_auth_info_domain to user_auth_info struct. Guenther ----------------------------------------------------------------------- Summary of changes: source3/include/popt_common.h | 1 + source3/include/proto.h | 3 +++ source3/lib/util.c | 18 ++++++++++++++++++ 3 files changed, 22 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/include/popt_common.h b/source3/include/popt_common.h index ae8378f..7237ca6 100644 --- a/source3/include/popt_common.h +++ b/source3/include/popt_common.h @@ -47,6 +47,7 @@ extern const struct poptOption popt_common_dynconfig[]; struct user_auth_info { char *username; + char *domain; char *password; bool got_pass; bool use_kerberos; diff --git a/source3/include/proto.h b/source3/include/proto.h index be5cfe1..5c58468 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1090,6 +1090,9 @@ struct user_auth_info *user_auth_info_init(TALLOC_CTX *mem_ctx); const char *get_cmdline_auth_info_username(const struct user_auth_info *auth_info); void set_cmdline_auth_info_username(struct user_auth_info *auth_info, const char *username); +const char *get_cmdline_auth_info_domain(const struct user_auth_info *auth_info); +void set_cmdline_auth_info_domain(struct user_auth_info *auth_info, + const char *domain); void set_cmdline_auth_info_password(struct user_auth_info *auth_info, const char *password); const char *get_cmdline_auth_info_password(const struct user_auth_info *auth_info); diff --git a/source3/lib/util.c b/source3/lib/util.c index ae63082..b066a0d 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) { -- Samba Shared Repository