The branch, master has been updated
       via  b07eff31de4 net_ads_gpo: remove old '#if 0' blocks
       via  7c01a44f18b libgpo: parse_gp_ext: do not crash upon no ext_strings
      from  a18ffe26b3b smbd: RIP user_struct

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


- Log -----------------------------------------------------------------
commit b07eff31de43adb0cd6eab217ca85cd5ba6f3621
Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz>
Date:   Fri Jan 10 16:06:33 2020 +1300

    net_ads_gpo: remove old '#if 0' blocks
    
    I think the dump_gpo() calls do enough, and this code has done nothing
    for a decade.
    
    Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz>
    Reviewed-by: Gary Lockyer <g...@catalyst.net.nz>
    
    Autobuild-User(master): Gary Lockyer <g...@samba.org>
    Autobuild-Date(master): Mon Jan 13 23:52:26 UTC 2020 on sn-devel-184

commit 7c01a44f18b679709d141b2d05e576ee084039b4
Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz>
Date:   Fri Jan 10 15:45:45 2020 +1300

    libgpo: parse_gp_ext: do not crash upon no ext_strings
    
    Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz>
    Reviewed-by: Gary Lockyer <g...@catalyst.net.nz>

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

Summary of changes:
 libgpo/gpo_ldap.c           |  4 +++-
 source3/utils/net_ads_gpo.c | 45 ---------------------------------------------
 2 files changed, 3 insertions(+), 46 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libgpo/gpo_ldap.c b/libgpo/gpo_ldap.c
index e5a5adb7235..2d95f74276c 100644
--- a/libgpo/gpo_ldap.c
+++ b/libgpo/gpo_ldap.c
@@ -98,7 +98,9 @@ bool ads_parse_gp_ext(TALLOC_CTX *mem_ctx,
                for (k = 0; ext_strings[k] != NULL; k++) {
                        /* no op */
                }
-
+               if (k == 0) {
+                       goto parse_error;
+               }
                q = ext_strings[0];
 
                if (q[0] == '{') {
diff --git a/source3/utils/net_ads_gpo.c b/source3/utils/net_ads_gpo.c
index cd77f93ffd3..4a2d19a4ba5 100644
--- a/source3/utils/net_ads_gpo.c
+++ b/source3/utils/net_ads_gpo.c
@@ -134,29 +134,7 @@ static int net_ads_gpo_refresh(struct net_context *c, int 
argc, const char **arg
                d_printf(_("* dumping GPO list\n"));
 
                for (gpo = gpo_list; gpo; gpo = gpo->next) {
-
                        dump_gpo(gpo, 0);
-#if 0
-               char *server, *share, *nt_path, *unix_path;
-
-               d_printf("--------------------------------------\n");
-               d_printf("Name:\t\t\t%s\n", gpo->display_name);
-               d_printf("LDAP GPO version:\t%d (user: %d, machine: %d)\n",
-                       gpo->version,
-                       GPO_VERSION_USER(gpo->version),
-                       GPO_VERSION_MACHINE(gpo->version));
-
-               result = gpo_explode_filesyspath(mem_ctx, gpo->file_sys_path,
-                                                &server, &share, &nt_path,
-                                                &unix_path);
-               if (!NT_STATUS_IS_OK(result)) {
-                       d_printf("got: %s\n", nt_errstr(result));
-               }
-
-               d_printf("GPO stored on server: %s, share: %s\n", server, 
share);
-               d_printf("\tremote path:\t%s\n", nt_path);
-               d_printf("\tlocal path:\t%s\n", unix_path);
-#endif
                }
        }
 
@@ -179,30 +157,7 @@ static int net_ads_gpo_refresh(struct net_context *c, int 
argc, const char **arg
                d_printf(_("* dumping GPO list from registry\n"));
 
                for (gpo = read_list; gpo; gpo = gpo->next) {
-
                        dump_gpo(gpo, 0);
-
-#if 0
-               char *server, *share, *nt_path, *unix_path;
-
-               d_printf("--------------------------------------\n");
-               d_printf("Name:\t\t\t%s\n", gpo->display_name);
-               d_printf("LDAP GPO version:\t%d (user: %d, machine: %d)\n",
-                       gpo->version,
-                       GPO_VERSION_USER(gpo->version),
-                       GPO_VERSION_MACHINE(gpo->version));
-
-               result = gpo_explode_filesyspath(mem_ctx, gpo->file_sys_path,
-                                                &server, &share, &nt_path,
-                                                &unix_path);
-               if (!NT_STATUS_IS_OK(result)) {
-                       d_printf("got: %s\n", nt_errstr(result));
-               }
-
-               d_printf("GPO stored on server: %s, share: %s\n", server, 
share);
-               d_printf("\tremote path:\t%s\n", nt_path);
-               d_printf("\tlocal path:\t%s\n", unix_path);
-#endif
                }
        }
 


-- 
Samba Shared Repository

Reply via email to