summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-10-04 13:56:20 -0700
committerAndrew Tridgell <tridge@samba.org>2008-10-04 13:56:20 -0700
commite44369989c54e908e3481fb76444df6bcf4e228b (patch)
treed03f0f366118977a272f099588d91b3985e0281c /source3/lib
parentba5ef49f831dbbfec1a360cd4644999de822e2bc (diff)
parent80665a0b5abbdd8df735e1ccdab3206399beba0b (diff)
downloadsamba-e44369989c54e908e3481fb76444df6bcf4e228b.tar.gz
samba-e44369989c54e908e3481fb76444df6bcf4e228b.tar.bz2
samba-e44369989c54e908e3481fb76444df6bcf4e228b.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/dummysmbd.c15
-rw-r--r--source3/lib/readline.c13
2 files changed, 27 insertions, 1 deletions
diff --git a/source3/lib/dummysmbd.c b/source3/lib/dummysmbd.c
index dbe886e3d1..5c624bdebf 100644
--- a/source3/lib/dummysmbd.c
+++ b/source3/lib/dummysmbd.c
@@ -51,3 +51,18 @@ NTSTATUS can_delete_directory(struct connection_struct *conn,
{
return NT_STATUS_OK;
}
+
+bool change_to_root_user(void)
+{
+ return false;
+}
+
+struct event_context *smbd_event_context(void)
+{
+ return NULL;
+}
+
+struct messaging_context *smbd_messaging_context(void)
+{
+ return NULL;
+}
diff --git a/source3/lib/readline.c b/source3/lib/readline.c
index 254f55c86a..fd57799b57 100644
--- a/source3/lib/readline.c
+++ b/source3/lib/readline.c
@@ -45,6 +45,16 @@
# define RL_COMPLETION_CAST
#endif /* HAVE_NEW_LIBREADLINE */
+static bool smb_rl_done;
+
+void smb_readline_done(void)
+{
+ smb_rl_done = true;
+#if HAVE_LIBREADLINE
+ rl_done = 1;
+#endif
+}
+
/****************************************************************************
Display the prompt and wait for input. Call callback() regularly
****************************************************************************/
@@ -69,7 +79,7 @@ static char *smb_readline_replacement(const char *prompt, void (*callback)(void)
return NULL;
}
- while (1) {
+ while (!smb_rl_done) {
timeout.tv_sec = 5;
timeout.tv_usec = 0;
@@ -87,6 +97,7 @@ static char *smb_readline_replacement(const char *prompt, void (*callback)(void)
callback();
}
}
+ return NULL;
}
/****************************************************************************