diff options
author | Stefan Metzmacher <metze@samba.org> | 2019-11-11 15:56:32 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2020-05-26 11:22:07 +0000 |
commit | c40e354fe1fde2adcb16f5df7539d8ba41bb902b (patch) | |
tree | 93360fa0eaa52116309cd49f973b27ab63e3db07 /libgpo/gpo_util.c | |
parent | b2e418369b41dd1238d66a759545b0d8bc88bf74 (diff) | |
download | samba-c40e354fe1fde2adcb16f5df7539d8ba41bb902b.tar.gz |
libgpo: Remove unused code
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue May 26 11:22:07 UTC 2020 on sn-devel-184
Diffstat (limited to 'libgpo/gpo_util.c')
-rw-r--r-- | libgpo/gpo_util.c | 121 |
1 files changed, 0 insertions, 121 deletions
diff --git a/libgpo/gpo_util.c b/libgpo/gpo_util.c index 6ad5c3b7f2f..c6d35841335 100644 --- a/libgpo/gpo_util.c +++ b/libgpo/gpo_util.c @@ -467,127 +467,6 @@ NTSTATUS gpo_process_gpo_list(TALLOC_CTX *mem_ctx, return status; } - -/**************************************************************** - check whether the version number in a GROUP_POLICY_OBJECT match those of the - locally stored version. If not, fetch the required policy via CIFS -****************************************************************/ - -NTSTATUS check_refresh_gpo(ADS_STRUCT *ads, - TALLOC_CTX *mem_ctx, - const char *cache_dir, - uint32_t flags, - const struct GROUP_POLICY_OBJECT *gpo) -{ - NTSTATUS result; - char *server = NULL; - char *share = NULL; - char *nt_path = NULL; - char *unix_path = NULL; - uint32_t sysvol_gpt_version = 0; - char *display_name = NULL; - - result = gpo_explode_filesyspath(mem_ctx, cache_dir, gpo->file_sys_path, - &server, &share, &nt_path, &unix_path); - - if (!NT_STATUS_IS_OK(result)) { - goto out; - } - - result = gpo_get_sysvol_gpt_version(mem_ctx, - unix_path, - &sysvol_gpt_version, - &display_name); - if (!NT_STATUS_IS_OK(result) && - !NT_STATUS_EQUAL(result, NT_STATUS_NO_SUCH_FILE)) { - DEBUG(10,("check_refresh_gpo: " - "failed to get local gpt version: %s\n", - nt_errstr(result))); - goto out; - } - - DEBUG(10,("check_refresh_gpo: versions gpo %d sysvol %d\n", - gpo->version, sysvol_gpt_version)); - - /* FIXME: handle GPO_INFO_FLAG_FORCED_REFRESH from flags */ - - while (gpo->version > sysvol_gpt_version) { - - DEBUG(1,("check_refresh_gpo: need to refresh GPO\n")); - - result = gpo_fetch_files(mem_ctx, ads, cache_dir, gpo); - if (!NT_STATUS_IS_OK(result)) { - goto out; - } - - result = gpo_get_sysvol_gpt_version(mem_ctx, - unix_path, - &sysvol_gpt_version, - &display_name); - if (!NT_STATUS_IS_OK(result)) { - DEBUG(10,("check_refresh_gpo: " - "failed to get local gpt version: %s\n", - nt_errstr(result))); - goto out; - } - - if (gpo->version == sysvol_gpt_version) { - break; - } - } - - DEBUG(10,("Name:\t\t\t%s (%s)\n", gpo->display_name, gpo->name)); - DEBUGADD(10,("sysvol GPT version:\t%d (user: %d, machine: %d)\n", - sysvol_gpt_version, - GPO_VERSION_USER(sysvol_gpt_version), - GPO_VERSION_MACHINE(sysvol_gpt_version))); - DEBUGADD(10,("LDAP GPO version:\t%d (user: %d, machine: %d)\n", - gpo->version, - GPO_VERSION_USER(gpo->version), - GPO_VERSION_MACHINE(gpo->version))); - DEBUGADD(10,("LDAP GPO link:\t\t%s\n", gpo->link)); - - result = NT_STATUS_OK; - - out: - return result; - -} - -/**************************************************************** - check whether the version numbers in the gpo_list match the locally stored, if - not, go and get each required GPO via CIFS - ****************************************************************/ - -NTSTATUS check_refresh_gpo_list(ADS_STRUCT *ads, - TALLOC_CTX *mem_ctx, - const char *cache_dir, - uint32_t flags, - const struct GROUP_POLICY_OBJECT *gpo_list) -{ - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - const struct GROUP_POLICY_OBJECT *gpo; - - if (!gpo_list) { - return NT_STATUS_INVALID_PARAMETER; - } - - for (gpo = gpo_list; gpo; gpo = gpo->next) { - - result = check_refresh_gpo(ads, mem_ctx, cache_dir, flags, gpo); - if (!NT_STATUS_IS_OK(result)) { - goto out; - } - } - - result = NT_STATUS_OK; - - out: - /* FIXME close cli connection */ - - return result; -} - /**************************************************************** ****************************************************************/ |