The branch, master has been updated
       via  89196c9875c s3:winbind: Delegate normalize_name_unmap to the idmap 
child in winbindd_getgroups
       via  8e6226af249 s3:winbind: Delegate normalize_name_unmap to the idmap 
child in winbindd_getpwnam
       via  a8d1a4cc3af s3:winbind: Delegate normalize_name_unmap to the idmap 
child in winbindd_getgrnam
       via  50e51593ed7 s3:winbind: Remove unused fill_grent()
       via  c35fb868031 s3:winbind: Delegate normalize_name_map to the idmap 
child in winbindd_getgrgid
       via  c6d17333437 s3:winbind: Delegate normalize_name_map to the idmap 
child in winbindd_getgrnam
       via  f7bd589b149 s3:winbind: Delegate normalize_name_map to the idmap 
child in wb_next_grent
       via  9cca389c54a python:tests/nss: Add NSS group enumeration test
       via  05f1edec389 s3:winbind: Fix debug message
      from  9f8d272b0ec vfs_ceph_new: use per-share profile macros

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 89196c9875cc2f62a95ee26b4703ad503cb1ccf7
Author: Samuel Cabrero <[email protected]>
Date:   Tue May 27 13:46:45 2025 +0200

    s3:winbind: Delegate normalize_name_unmap to the idmap child in 
winbindd_getgroups
    
    Delegate name unmapping to the idmap child to avoid blocking the parent 
while
    querying the LDAP server, depending on the idmap configuration.
    
    Signed-off-by: Samuel Cabrero <[email protected]>
    Reviewed-by: Andreas Schneider <[email protected]>
    
    Autobuild-User(master): Andreas Schneider <[email protected]>
    Autobuild-Date(master): Tue Jun 24 08:51:39 UTC 2025 on atb-devel-224

commit 8e6226af24955816287430424328d282b77359dd
Author: Samuel Cabrero <[email protected]>
Date:   Tue May 27 13:31:33 2025 +0200

    s3:winbind: Delegate normalize_name_unmap to the idmap child in 
winbindd_getpwnam
    
    Delegate name unmapping to the idmap child to avoid blocking the parent 
while
    querying the LDAP server, depending on the idmap configuration.
    
    Signed-off-by: Samuel Cabrero <[email protected]>
    Reviewed-by: Andreas Schneider <[email protected]>

commit a8d1a4cc3afad3721b3e17f9fca811e7d44731ac
Author: Samuel Cabrero <[email protected]>
Date:   Mon May 26 15:23:19 2025 +0200

    s3:winbind: Delegate normalize_name_unmap to the idmap child in 
winbindd_getgrnam
    
    Delegate name unmapping to the idmap child to avoid blocking the parent 
while
    querying the LDAP server, depending on the idmap configuration.
    
    Signed-off-by: Samuel Cabrero <[email protected]>
    Reviewed-by: Andreas Schneider <[email protected]>

commit 50e51593ed7f58d77cdf4f0ad91058b121c7daad
Author: Samuel Cabrero <[email protected]>
Date:   Fri May 23 14:26:08 2025 +0200

    s3:winbind: Remove unused fill_grent()
    
    This function is no longer used.
    
    Signed-off-by: Samuel Cabrero <[email protected]>
    Reviewed-by: Andreas Schneider <[email protected]>

commit c35fb868031baa9a2b1bbac5c4bd97e58f85f759
Author: Samuel Cabrero <[email protected]>
Date:   Fri May 23 14:23:57 2025 +0200

    s3:winbind: Delegate normalize_name_map to the idmap child in 
winbindd_getgrgid
    
    Delegate mapping to the idmap child to avoid blocking the parent while 
querying the
    LDAP server, depending on the idmap configuration.
    
    Signed-off-by: Samuel Cabrero <[email protected]>
    Reviewed-by: Andreas Schneider <[email protected]>

commit c6d17333437e6d7342d13e3f0e1bba388c90249f
Author: Samuel Cabrero <[email protected]>
Date:   Fri May 23 13:40:32 2025 +0200

    s3:winbind: Delegate normalize_name_map to the idmap child in 
winbindd_getgrnam
    
    Delegate mapping to the idmap child to avoid blocking the parent while 
querying the
    LDAP server, depending on the idmap configuration.
    
    Signed-off-by: Samuel Cabrero <[email protected]>
    Reviewed-by: Andreas Schneider <[email protected]>

commit f7bd589b149e74c4c4ea4778d04a5f1668dd8247
Author: Samuel Cabrero <[email protected]>
Date:   Mon May 26 07:54:38 2025 +0200

    s3:winbind: Delegate normalize_name_map to the idmap child in wb_next_grent
    
    Delegate mapping to the idmap child to avoid blocking the parent while 
querying the
    LDAP server, depending on the idmap configuration.
    
    Signed-off-by: Samuel Cabrero <[email protected]>
    Reviewed-by: Andreas Schneider <[email protected]>

commit 9cca389c54ae6df58f1391e6c37dd94ed9140bd3
Author: Samuel Cabrero <[email protected]>
Date:   Mon May 26 11:20:13 2025 +0200

    python:tests/nss: Add NSS group enumeration test
    
    Signed-off-by: Samuel Cabrero <[email protected]>
    Reviewed-by: Andreas Schneider <[email protected]>

commit 05f1edec38914247f5b6ddfbb2c9a02e754fab08
Author: Samuel Cabrero <[email protected]>
Date:   Fri May 23 13:23:01 2025 +0200

    s3:winbind: Fix debug message
    
    Signed-off-by: Samuel Cabrero <[email protected]>
    Reviewed-by: Andreas Schneider <[email protected]>

-----------------------------------------------------------------------

Summary of changes:
 python/samba/tests/nss/base.py                     |  87 ++++++++++++
 .../samba-tool => python/samba/tests/nss/group.py  |  38 +++---
 source3/winbindd/wb_getpwsid.c                     |   2 +-
 source3/winbindd/wb_next_grent.c                   |  72 +++++++++-
 source3/winbindd/winbindd_getgrgid.c               |  60 ++++++++-
 source3/winbindd/winbindd_getgrnam.c               | 146 ++++++++++++++++-----
 source3/winbindd/winbindd_getgroups.c              |  62 ++++++---
 source3/winbindd/winbindd_getpwnam.c               |  65 ++++++---
 source3/winbindd/winbindd_group.c                  |  44 -------
 source3/winbindd/winbindd_proto.h                  |   3 -
 source4/selftest/tests.py                          |   2 +
 11 files changed, 444 insertions(+), 137 deletions(-)
 create mode 100644 python/samba/tests/nss/base.py
 copy source4/scripting/bin/samba-tool => python/samba/tests/nss/group.py (55%)
 mode change 100755 => 100644


Changeset truncated at 500 lines:

diff --git a/python/samba/tests/nss/base.py b/python/samba/tests/nss/base.py
new file mode 100644
index 00000000000..3f2d1a46446
--- /dev/null
+++ b/python/samba/tests/nss/base.py
@@ -0,0 +1,87 @@
+# Unix SMB/CIFS implementation.
+#
+# Copyright (C) Samuel Cabrero <[email protected]> 2025
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+"""Winbind nss tests, base class"""
+
+import grp
+import os
+import pwd
+import subprocess
+
+import samba
+from samba.auth import system_session
+from samba.credentials import Credentials
+from samba.samdb import SamDB
+from samba.tests.samba_tool.base import SambaToolCmdTest
+
+
+class NssTestCase(SambaToolCmdTest):
+    def setUp(self):
+        super().setUp()
+
+        self.domain = samba.tests.env_get_var_value("DOMAIN")
+
+        self.bindir = os.path.normpath(os.getenv("BINDIR", "./bin"))
+        self.netcmd = os.path.join(self.bindir, "net")
+
+        self.users = []
+        self.groups = []
+        members = []
+        for i in range(0, 3):
+            username = "nss_test_user_%d" % i
+            groupname = "nss_test_group_%d" % i
+
+            subprocess.Popen(
+                [
+                    self.netcmd,
+                    "cache",
+                    "del",
+                    "NAME2SID/%s\\%s" % (self.domain, username.upper()),
+                ],
+                stdout=subprocess.PIPE,
+            )
+            self.runsubcmd("user", "create", username, self.random_password())
+
+            subprocess.Popen(
+                [
+                    self.netcmd,
+                    "cache",
+                    "del",
+                    "NAME2SID/%s\\%s" % (self.domain, groupname.upper()),
+                ],
+                stdout=subprocess.PIPE,
+            )
+            self.runsubcmd("group", "create", groupname)
+
+            members.append(username)
+            for m in members:
+                self.runsubcmd("group", "addmembers", groupname, m)
+
+            grent = grp.getgrnam(groupname)
+            self.groups.append(grent)
+
+            pwent = pwd.getpwnam(username)
+            self.users.append(pwent)
+
+    def tearDown(self):
+        for test_group in self.groups:
+            self.runsubcmd("group", "delete", test_group.gr_name)
+
+        for test_user in self.users:
+            self.runsubcmd("user", "delete", test_user.pw_name)
+
+        super().tearDown()
diff --git a/source4/scripting/bin/samba-tool b/python/samba/tests/nss/group.py
old mode 100755
new mode 100644
similarity index 55%
copy from source4/scripting/bin/samba-tool
copy to python/samba/tests/nss/group.py
index b02ad4d0ef7..412d89c6884
--- a/source4/scripting/bin/samba-tool
+++ b/python/samba/tests/nss/group.py
@@ -1,9 +1,6 @@
-#!/usr/bin/env python3
-
 # Unix SMB/CIFS implementation.
-# Copyright (C) Jelmer Vernooij <[email protected]> 2008-2012
-# Copyright (C) Amitay Isaacs <[email protected]> 2011
-# Copyright (C) Giampaolo Lauria <[email protected]> 2011
+#
+# Copyright (C) Samuel Cabrero <[email protected]> 2025
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,20 +14,31 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
+
+"""Winbind nss tests"""
 
 import sys
+import os
+import grp
 
-# Find right direction when running from source tree
 sys.path.insert(0, "bin/python")
+os.environ["PYTHONUNBUFFERED"] = "1"
+
+from samba.tests.nss.base import NssTestCase
+
+
+class NssGroupTests(NssTestCase):
+    def testGroupEnum(self):
+        grlst = grp.getgrall()
+        self.assertIsNotNone(grlst)
+        self.assertGreaterEqual(
+            len(grlst), len(self.groups), "Unexpected groups length"
+        )
+        for test_group in self.groups:
+            self.assertIn(test_group, grlst)
 
-# make sure the script dies immediately when hitting control-C,
-# rather than raising KeyboardInterrupt. As we do all database
-# operations using transactions, this is safe.
-import signal
-signal.signal(signal.SIGINT, signal.SIG_DFL)
 
-from samba.netcmd.main import samba_tool
+if __name__ == "__main__":
+    import unittest
 
-retval = samba_tool(*sys.argv[1:])
-sys.exit(retval)
+    unittest.main()
diff --git a/source3/winbindd/wb_getpwsid.c b/source3/winbindd/wb_getpwsid.c
index 8000ad8bd4c..d323be7a556 100644
--- a/source3/winbindd/wb_getpwsid.c
+++ b/source3/winbindd/wb_getpwsid.c
@@ -117,7 +117,7 @@ static void wb_getpwsid_normalize_done(struct tevent_req 
*subreq)
        status = dcerpc_wbint_NormalizeNameMap_recv(subreq, state, &result);
        TALLOC_FREE(subreq);
        if (tevent_req_nterror(req, status)) {
-               DBG_ERR("wbint_NormalizeAndMapToAlias(%s, %s) call failed: 
%s\n",
+               DBG_ERR("wbint_NormalizeNameMap(%s, %s) call failed: %s\n",
                        state->userinfo->domain_name,
                        state->userinfo->acct_name,
                        nt_errstr(status));
diff --git a/source3/winbindd/wb_next_grent.c b/source3/winbindd/wb_next_grent.c
index 99586ac2641..49a21e6d0ae 100644
--- a/source3/winbindd/wb_next_grent.c
+++ b/source3/winbindd/wb_next_grent.c
@@ -27,6 +27,10 @@ struct wb_next_grent_state {
        int max_nesting;
        struct getgrent_state *gstate;
        struct winbindd_gr *gr;
+       const char *domname;
+       const char *name;
+       const char *mapped_name;
+       gid_t gid;
        struct db_context *members;
 };
 
@@ -147,17 +151,21 @@ static void wb_next_grent_fetch_done(struct tevent_req 
*subreq)
        wb_next_grent_send_do(req, state);
 }
 
+static void wb_next_grent_normalize_done(struct tevent_req *subreq);
 static void wb_next_grent_getgrsid_done(struct tevent_req *subreq)
 {
        struct tevent_req *req = tevent_req_callback_data(
                subreq, struct tevent_req);
        struct wb_next_grent_state *state = tevent_req_data(
                req, struct wb_next_grent_state);
-       const char *domname, *name;
        NTSTATUS status;
 
-       status = wb_getgrsid_recv(subreq, talloc_tos(), &domname, &name,
-                                 &state->gr->gr_gid, &state->members);
+       status = wb_getgrsid_recv(subreq,
+                                 state,
+                                 &state->domname,
+                                 &state->name,
+                                 &state->gid,
+                                 &state->members);
        TALLOC_FREE(subreq);
 
        if (NT_STATUS_EQUAL(status, NT_STATUS_NONE_MAPPED)) {
@@ -170,12 +178,62 @@ static void wb_next_grent_getgrsid_done(struct tevent_req 
*subreq)
                return;
        }
 
-       if (!fill_grent(talloc_tos(), state->gr, domname, name,
-                       state->gr->gr_gid)) {
-               D_WARNING("fill_grent failed\n");
-               tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
+       subreq = dcerpc_wbint_NormalizeNameMap_send(state,
+                                                   state->ev,
+                                                   idmap_child_handle(),
+                                                   state->domname,
+                                                   state->name,
+                                                   &state->mapped_name);
+       if (tevent_req_nomem(subreq, req)) {
+               return;
+       }
+       tevent_req_set_callback(subreq, wb_next_grent_normalize_done, req);
+}
+
+static void wb_next_grent_normalize_done(struct tevent_req *subreq)
+{
+       struct tevent_req *req = tevent_req_callback_data(
+               subreq, struct tevent_req);
+       struct wb_next_grent_state *state = tevent_req_data(
+               req, struct wb_next_grent_state);
+       struct winbindd_gr *gr = state->gr;
+       const char *full_group_name = NULL;
+       NTSTATUS status;
+       NTSTATUS result;
+
+       status = dcerpc_wbint_NormalizeNameMap_recv(subreq, state, &result);
+       TALLOC_FREE(subreq);
+       if (tevent_req_nterror(req, status)) {
+               DBG_ERR("wbint_NormalizeNameMap(%s, %s) call failed: %s\n",
+                       state->domname,
+                       state->name,
+                       nt_errstr(status));
+               return;
+       } else if (NT_STATUS_IS_OK(result)) {
+               full_group_name = fill_domain_username_talloc(
+                       state, state->domname, state->mapped_name, true);
+
+       } else if (NT_STATUS_EQUAL(result, NT_STATUS_FILE_RENAMED)) {
+               full_group_name = state->mapped_name;
+       } else {
+               full_group_name = fill_domain_username_talloc(state,
+                                                             state->domname,
+                                                             state->name,
+                                                             True);
+       }
+
+       if (tevent_req_nomem(full_group_name, req)) {
+               D_WARNING("Failed to fill full group name.\n");
                return;
        }
+
+       gr->gr_gid = state->gid;
+
+       strlcpy(gr->gr_name, full_group_name, sizeof(gr->gr_name));
+       strlcpy(gr->gr_passwd, "x", sizeof(gr->gr_passwd));
+
+       D_DEBUG("Full group name is '%s'.\n", gr->gr_name);
+
        state->gstate->next_group += 1;
        tevent_req_done(req);
 }
diff --git a/source3/winbindd/winbindd_getgrgid.c 
b/source3/winbindd/winbindd_getgrgid.c
index 4edd81b004c..26585148006 100644
--- a/source3/winbindd/winbindd_getgrgid.c
+++ b/source3/winbindd/winbindd_getgrgid.c
@@ -20,6 +20,7 @@
 #include "includes.h"
 #include "winbindd.h"
 #include "libcli/security/dom_sid.h"
+#include "librpc/gen_ndr/ndr_winbind_c.h"
 
 struct winbindd_getgrgid_state {
        struct tevent_context *ev;
@@ -27,6 +28,8 @@ struct winbindd_getgrgid_state {
        struct dom_sid *sid;
        const char *domname;
        const char *name;
+       const char *mapped_name;
+       const char *full_group_name;
        gid_t gid;
        struct db_context *members;
 };
@@ -93,6 +96,7 @@ static void winbindd_getgrgid_gid2sid_done(struct tevent_req 
*subreq)
        tevent_req_set_callback(subreq, winbindd_getgrgid_done, req);
 }
 
+static void winbindd_getgrgid_normalize_done(struct tevent_req *subreq);
 static void winbindd_getgrgid_done(struct tevent_req *subreq)
 {
        struct tevent_req *req = tevent_req_callback_data(
@@ -107,6 +111,50 @@ static void winbindd_getgrgid_done(struct tevent_req 
*subreq)
        if (tevent_req_nterror(req, status)) {
                return;
        }
+
+       subreq = dcerpc_wbint_NormalizeNameMap_send(state,
+                                                   state->ev,
+                                                   idmap_child_handle(),
+                                                   state->domname,
+                                                   state->name,
+                                                   &state->mapped_name);
+       if (tevent_req_nomem(subreq, req)) {
+               return;
+       }
+       tevent_req_set_callback(subreq, winbindd_getgrgid_normalize_done, req);
+}
+
+static void winbindd_getgrgid_normalize_done(struct tevent_req *subreq)
+{
+       struct tevent_req *req = tevent_req_callback_data(
+               subreq, struct tevent_req);
+       struct winbindd_getgrgid_state *state = tevent_req_data(
+               req, struct winbindd_getgrgid_state);
+       NTSTATUS status;
+       NTSTATUS result;
+
+       status = dcerpc_wbint_NormalizeNameMap_recv(subreq, state, &result);
+       TALLOC_FREE(subreq);
+       if (tevent_req_nterror(req, status)) {
+               DBG_ERR("wbint_NormalizeNameMap(%s, %s) call failed: %s\n",
+                       state->domname,
+                       state->name,
+                       nt_errstr(status));
+               return;
+       } else if (NT_STATUS_IS_OK(result)) {
+               state->full_group_name = fill_domain_username_talloc(
+                       state, state->domname, state->mapped_name, true);
+       } else if (NT_STATUS_EQUAL(result, NT_STATUS_FILE_RENAMED)) {
+               state->full_group_name = state->mapped_name;
+       } else {
+               state->full_group_name = fill_domain_username_talloc(
+                       state, state->domname, state->name, true);
+       }
+
+       if (tevent_req_nomem(state->full_group_name, req)) {
+               D_WARNING("Failed to fill full group name.\n");
+               return;
+       }
        tevent_req_done(req);
 }
 
@@ -115,6 +163,7 @@ NTSTATUS winbindd_getgrgid_recv(struct tevent_req *req,
 {
        struct winbindd_getgrgid_state *state = tevent_req_data(
                req, struct winbindd_getgrgid_state);
+       struct winbindd_gr *gr = &response->data.gr;
        NTSTATUS status;
        int num_members;
        char *buf;
@@ -127,11 +176,12 @@ NTSTATUS winbindd_getgrgid_recv(struct tevent_req *req,
                return status;
        }
 
-       if (!fill_grent(talloc_tos(), &response->data.gr, state->domname,
-                       state->name, state->gid)) {
-               D_WARNING("fill_grent failed\n");
-               return NT_STATUS_NO_MEMORY;
-       }
+       gr->gr_gid = state->gid;
+
+       strlcpy(gr->gr_name, state->full_group_name, sizeof(gr->gr_name));
+       strlcpy(gr->gr_passwd, "x", sizeof(gr->gr_passwd));
+
+       D_DEBUG("Full group name is '%s'.\n", gr->gr_name);
 
        status = winbindd_print_groupmembers(state->members, response,
                                             &num_members, &buf);
diff --git a/source3/winbindd/winbindd_getgrnam.c 
b/source3/winbindd/winbindd_getgrnam.c
index 24fef6c2c20..be19287c15b 100644
--- a/source3/winbindd/winbindd_getgrnam.c
+++ b/source3/winbindd/winbindd_getgrnam.c
@@ -21,22 +21,25 @@
 #include "winbindd.h"
 #include "libcli/security/dom_sid.h"
 #include "lib/util/string_wrappers.h"
+#include "librpc/gen_ndr/ndr_winbind_c.h"
 
 struct winbindd_getgrnam_state {
        struct tevent_context *ev;
+       const char *request_name;
+       const char *unmapped_name;
        char *name_namespace;
        char *name_domain;
        char *name_group;
        struct dom_sid sid;
        const char *domname;
        const char *name;
+       const char *mapped_name;
+       const char *full_group_name;
        gid_t gid;
        struct db_context *members;
 };
 
-static void winbindd_getgrnam_lookupname_done(struct tevent_req *subreq);
-static void winbindd_getgrnam_done(struct tevent_req *subreq);
-
+static void winbindd_getgrnam_unmap_done(struct tevent_req *subreq);
 struct tevent_req *winbindd_getgrnam_send(TALLOC_CTX *mem_ctx,
                                          struct tevent_context *ev,
                                          struct winbindd_cli_state *cli,
@@ -44,9 +47,6 @@ struct tevent_req *winbindd_getgrnam_send(TALLOC_CTX *mem_ctx,
 {
        struct tevent_req *req, *subreq;
        struct winbindd_getgrnam_state *state;
-       char *tmp;
-       NTSTATUS nt_status;
-       bool ok;
 
        req = tevent_req_create(mem_ctx, &state,
                                struct winbindd_getgrnam_state);
@@ -64,25 +64,59 @@ struct tevent_req *winbindd_getgrnam_send(TALLOC_CTX 
*mem_ctx,
                   (unsigned int)cli->pid,
                   request->data.groupname);
 
-       nt_status = normalize_name_unmap(state, request->data.groupname, &tmp);
-       /* If we didn't map anything in the above call, just reset the
-          tmp pointer to the original string */
-       if (!NT_STATUS_IS_OK(nt_status) &&
-           !NT_STATUS_EQUAL(nt_status, NT_STATUS_FILE_RENAMED))
+       state->request_name = talloc_strdup(state, request->data.groupname);
+       if (tevent_req_nomem(state->request_name, req)) {
+               return tevent_req_post(req, ev);
+       }
+
+       subreq = dcerpc_wbint_NormalizeNameUnmap_send(state,
+                                                     state->ev,
+                                                     idmap_child_handle(),
+                                                     state->request_name,
+                                                     &state->unmapped_name);
+       if (tevent_req_nomem(subreq, req)) {
+               return tevent_req_post(req, ev);
+       }
+       tevent_req_set_callback(subreq, winbindd_getgrnam_unmap_done, req);
+       return req;
+}
+
+static void winbindd_getgrnam_lookupname_done(struct tevent_req *subreq);
+static void winbindd_getgrnam_unmap_done(struct tevent_req *subreq)
+{
+       struct tevent_req *req = tevent_req_callback_data(subreq,
+                                                         struct tevent_req);
+       struct winbindd_getgrnam_state *state = tevent_req_data(
+               req, struct winbindd_getgrnam_state);
+       NTSTATUS status;
+       NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+       bool ok;
+
+       status = dcerpc_wbint_NormalizeNameUnmap_recv(subreq, state, &result);
+       TALLOC_FREE(subreq);
+       if (tevent_req_nterror(req, status)) {
+               return;
+       }
+
+       /* If we didn't map anything in the above call, use the original string 
*/
+       if (!NT_STATUS_IS_OK(result) &&
+           !NT_STATUS_EQUAL(result, NT_STATUS_FILE_RENAMED))
        {
-               tmp = request->data.groupname;
+               state->unmapped_name = state->request_name;
        }
 
        /* Parse domain and groupname */
 
-       ok = parse_domain_user(state, tmp,
+       ok = parse_domain_user(state,
+                              state->unmapped_name,
                               &state->name_namespace,
                               &state->name_domain,
                               &state->name_group);
        if (!ok) {
-               DBG_INFO("Could not parse domain user: %s\n", tmp);
+               DBG_INFO("Could not parse domain user: %s\n",
+                        state->unmapped_name);
                tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
-               return tevent_req_post(req, ev);
+               return;
        }
 
        /* if no domain or our local domain and no local tdb group, default to
@@ -94,23 +128,23 @@ struct tevent_req *winbindd_getgrnam_send(TALLOC_CTX 
*mem_ctx,
                state->name_domain = talloc_strdup(state,
                                                get_global_sam_name());
                if (tevent_req_nomem(state->name_domain, req)) {
-                       return tevent_req_post(req, ev);
+                       return;


-- 
Samba Shared Repository

Reply via email to