#include "includes.h"
#include "utils/net.h"
+#include "ads.h"
+#include "../libgpo/gpo.h"
+#include "libgpo/gpo_proto.h"
+#include "../libds/common/flags.h"
#ifdef HAVE_ADS
uint32 flags = 0;
struct GROUP_POLICY_OBJECT *gpo;
NTSTATUS result;
- struct nt_user_token *token = NULL;
+ struct security_token *token = NULL;
if (argc < 1 || c->display_usage) {
d_printf("%s\n%s\n%s",
{
WERROR werr = gp_reg_state_read(mem_ctx, flags,
- &token->user_sids[0],
+ &token->sids[0],
&read_list);
if (!W_ERROR_IS_OK(werr)) {
d_printf(_("failed: %s\n"), win_errstr(werr));
LDAP_SCOPE_SUBTREE,
"(objectclass=groupPolicyContainer)",
attrs,
- DACL_SECURITY_INFORMATION,
+ SECINFO_DACL,
&res);
if (!ADS_ERR_OK(status)) {
static int net_ads_gpo_list(struct net_context *c, int argc, const char **argv)
{
- ADS_STRUCT *ads;
+ ADS_STRUCT *ads = NULL;
ADS_STATUS status;
LDAPMessage *res = NULL;
TALLOC_CTX *mem_ctx;
uint32 uac = 0;
uint32 flags = 0;
struct GROUP_POLICY_OBJECT *gpo_list;
- struct nt_user_token *token = NULL;
+ struct security_token *token = NULL;
if (argc < 1 || c->display_usage) {
d_printf("%s\n%s\n%s",
return 0;
}
-#if 0
static int net_ads_gpo_apply(struct net_context *c, int argc, const char **argv)
{
TALLOC_CTX *mem_ctx;
struct GROUP_POLICY_OBJECT *gpo_list;
uint32 uac = 0;
uint32 flags = 0;
- struct nt_user_token *token = NULL;
+ struct security_token *token = NULL;
const char *filter = NULL;
if (argc < 1 || c->display_usage) {
}
status = ads_startup(c, false, &ads);
+ /* filter = cse_gpo_name_to_guid_string("Security"); */
+
if (!ADS_ERR_OK(status)) {
d_printf("got: %s\n", ads_errstr(status));
goto out;
talloc_destroy(mem_ctx);
return 0;
}
-#endif
static int net_ads_gpo_link_get(struct net_context *c, int argc, const char **argv)
{
int net_ads_gpo(struct net_context *c, int argc, const char **argv)
{
struct functable func[] = {
-#if 0
{
"apply",
net_ads_gpo_apply,
"net ads gpo apply\n"
" Apply GPO to container"
},
-#endif
{
"getgpo",
net_ads_gpo_get_gpo,