]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:winbind: Remove unused fill_grent()
authorSamuel Cabrero <scabrero@samba.org>
Fri, 23 May 2025 12:26:08 +0000 (14:26 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 24 Jun 2025 07:53:41 +0000 (07:53 +0000)
This function is no longer used.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/winbindd/winbindd_group.c
source3/winbindd/winbindd_proto.h

index b233c8eee4206aec7ddc6051ebd378b29202efdc..7e7c86c9656eabece06fd45d7143ba9529513aea 100644 (file)
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_WINBIND
 
-/* Fill a grent structure from various other information */
-
-bool fill_grent(TALLOC_CTX *mem_ctx, struct winbindd_gr *gr,
-               const char *dom_name, const char *gr_name, gid_t unix_gid)
-{
-       const char *full_group_name;
-       char *mapped_name = NULL;
-       NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
-
-       nt_status = normalize_name_map(mem_ctx, dom_name, gr_name,
-                                      &mapped_name);
-
-       D_DEBUG("Filling domain '%s' and group '%s'.\n", dom_name, gr_name);
-       /* Basic whitespace replacement */
-       if (NT_STATUS_IS_OK(nt_status)) {
-               full_group_name = fill_domain_username_talloc(mem_ctx, dom_name,
-                                    mapped_name, true);
-       }
-       /* Mapped to an alias */
-       else if (NT_STATUS_EQUAL(nt_status, NT_STATUS_FILE_RENAMED)) {
-               full_group_name = mapped_name;
-       }
-       /* no change */
-       else {
-               full_group_name = fill_domain_username_talloc(mem_ctx, dom_name,
-                                     gr_name, True );
-       }
-
-       if (full_group_name == NULL) {
-               D_DEBUG("Returning false, since there is no full group name.\n");
-               return false;
-       }
-
-       gr->gr_gid = unix_gid;
-
-       /* Group name and password */
-
-       strlcpy(gr->gr_name, full_group_name, sizeof(gr->gr_name));
-       strlcpy(gr->gr_passwd, "x", sizeof(gr->gr_passwd));
-
-       D_DEBUG("Returning true. Full group name is '%s'.\n", gr_name);
-       return True;
-}
-
 struct getgr_countmem {
        int num;
        size_t len;
index 6330b9cafccdc180b691e448840082d2545af728..6d11a41d81563b4876f973d4a2b3a8af4999e992 100644 (file)
@@ -375,9 +375,6 @@ struct winbindd_domain *wb_child_domain(void);
 bool update_trusted_domains_dc(void);
 
 /* The following definitions come from winbindd/winbindd_group.c  */
-bool fill_grent(TALLOC_CTX *mem_ctx, struct winbindd_gr *gr,
-               const char *dom_name, const char *gr_name, gid_t unix_gid);
-
 struct db_context;
 NTSTATUS winbindd_print_groupmembers(struct db_context *members,
                                     TALLOC_CTX *mem_ctx,