The branch, master has been updated
via f393edd selftest: Give tmux a bit of time to establish
via 8a2bbba s3:winbind: Fix 'winbind normalize names' in wb_getpwsid()
from d7ccf0d messaging: Fix queueing on FreeBSD
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit f393edd41c483fab750e37755466bb5c8c8df28f
Author: Volker Lendecke <[email protected]>
Date: Thu Jun 15 17:36:58 2017 +0200
selftest: Give tmux a bit of time to establish
I've seen a lot of failures with make testenv telling that stdin returns
EAGAIN. I haven't fully diagnosed it, but this seems to fix it. Now
make testenv is much more reliable.
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Andreas Schneider <[email protected]>
Autobuild-User(master): Volker Lendecke <[email protected]>
Autobuild-Date(master): Wed Jun 21 03:14:17 CEST 2017 on sn-devel-144
commit 8a2bbba5cd0862ac196739c1e52385f7be1e3836
Author: Andreas Schneider <[email protected]>
Date: Tue Jun 20 10:27:07 2017 +0200
s3:winbind: Fix 'winbind normalize names' in wb_getpwsid()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12851
Signed-off-by: Andreas Schneider <[email protected]>
Reviewed-by: Volker Lendecke <[email protected]>
-----------------------------------------------------------------------
Summary of changes:
selftest/in_screen | 4 ++++
source3/winbindd/wb_getpwsid.c | 34 +++++++++++++++++++++++++++++++---
2 files changed, 35 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/selftest/in_screen b/selftest/in_screen
index 36c3da1..5aba08d 100755
--- a/selftest/in_screen
+++ b/selftest/in_screen
@@ -77,6 +77,10 @@ if [[ "$TMUX" ]]; then
fi
$TMUX_CMD new-window -n test:$SERVERNAME "bash $basedir/$SERVERNAME.launch"
+
+ # tmux seems to lag a bit for new sessions. Don't create them too
+ # quickly one after another
+ sleep .1
else
screen -r -X screen -t test:$SERVERNAME bash $basedir/$SERVERNAME.launch
fi
diff --git a/source3/winbindd/wb_getpwsid.c b/source3/winbindd/wb_getpwsid.c
index 56a6a29..e9ffc33 100644
--- a/source3/winbindd/wb_getpwsid.c
+++ b/source3/winbindd/wb_getpwsid.c
@@ -63,7 +63,9 @@ static void wb_getpwsid_queryuser_done(struct tevent_req
*subreq)
req, struct wb_getpwsid_state);
struct winbindd_pw *pw = state->pw;
struct wbint_userinfo *info;
+ struct winbindd_domain *domain = NULL;
fstring acct_name, output_username;
+ char *mapped_name = NULL;
char *tmp;
NTSTATUS status;
@@ -83,8 +85,34 @@ static void wb_getpwsid_queryuser_done(struct tevent_req
*subreq)
return;
}
- fill_domain_username(output_username, info->domain_name,
- acct_name, true);
+ domain = find_domain_from_name_noinit(info->domain_name);
+ if (tevent_req_nomem(domain, req)) {
+ return;
+ }
+
+ /*
+ * TODO:
+ * This function should be called in 'idmap winbind child'. It shouldn't
+ * be a blocking call, but for this we need to add a new function for
+ * winbind.idl. This is a fix which can be backported for now.
+ */
+ status = normalize_name_map(state,
+ domain,
+ acct_name,
+ &mapped_name);
+ if (NT_STATUS_IS_OK(status)) {
+ fill_domain_username(output_username,
+ info->domain_name,
+ mapped_name, true);
+ fstrcpy(acct_name, mapped_name);
+ } else if (NT_STATUS_EQUAL(status, NT_STATUS_FILE_RENAMED)) {
+ fstrcpy(acct_name, mapped_name);
+ } else {
+ fill_domain_username(output_username,
+ info->domain_name,
+ acct_name, true);
+ }
+
strlcpy(pw->pw_name, output_username, sizeof(pw->pw_name));
strlcpy(pw->pw_gecos, info->full_name ? info->full_name : "",
@@ -101,7 +129,7 @@ static void wb_getpwsid_queryuser_done(struct tevent_req
*subreq)
TALLOC_FREE(tmp);
tmp = talloc_sub_specified(
- state, info->shell, info->acct_name,
+ state, info->shell, acct_name,
info->primary_group_name, info->domain_name,
pw->pw_uid, pw->pw_gid);
if (tevent_req_nomem(tmp, req)) {
--
Samba Shared Repository