summaryrefslogtreecommitdiff
path: root/source4/lib/cmdline
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/cmdline')
-rw-r--r--source4/lib/cmdline/popt_common.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/source4/lib/cmdline/popt_common.c b/source4/lib/cmdline/popt_common.c
index 20b9aac201..7acdb34bba 100644
--- a/source4/lib/cmdline/popt_common.c
+++ b/source4/lib/cmdline/popt_common.c
@@ -397,11 +397,21 @@ struct poptOption popt_common_credentials[] = {
POPT_TABLEEND
};
+void cmdline_set_username(const char *name)
+{
+ pstrcpy(cmdline_auth_info.username, name);
+}
+
const char *cmdline_get_username(void)
{
return cmdline_auth_info.username;
}
+void cmdline_set_userdomain(const char *domain)
+{
+ pstrcpy(cmdline_auth_info.domain, domain);
+}
+
const char *cmdline_get_userdomain(void)
{
if (cmdline_auth_info.domain[0]) {
@@ -431,3 +441,19 @@ const char *cmdline_get_userpassword(void)
return getpass(prompt);
}
+
+void cmdline_set_userpassword(const char *pass)
+{
+ cmdline_auth_info.got_pass = True;
+ pstrcpy(cmdline_auth_info.password, pass);
+}
+
+void cmdline_set_use_kerberos(BOOL use_kerberos)
+{
+ cmdline_auth_info.use_kerberos = use_kerberos;
+}
+
+BOOL cmdline_get_use_kerberos(void)
+{
+ return cmdline_auth_info.use_kerberos;
+}