summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/rpc_samr.h4
-rw-r--r--source3/rpc_parse/parse_samr.c8
-rw-r--r--source3/rpc_server/srv_samr_nt.c2
-rw-r--r--source3/rpcclient/cmd_samr.c15
4 files changed, 21 insertions, 8 deletions
diff --git a/source3/include/rpc_samr.h b/source3/include/rpc_samr.h
index ae8bb7a2be..ac56e2dcc6 100644
--- a/source3/include/rpc_samr.h
+++ b/source3/include/rpc_samr.h
@@ -1065,7 +1065,7 @@ typedef struct samr_group_info1
{
UNIHDR hdr_acct_name;
- uint32 unknown_1; /* 0x0000 0003 - number of group members? */
+ uint32 group_attr; /* 0x0000 0003 - group attribute */
uint32 num_members; /* 0x0000 0001 - number of group members? */
UNIHDR hdr_acct_desc;
@@ -1085,7 +1085,7 @@ typedef struct samr_group_info2
typedef struct samr_group_info3
{
- uint32 unknown_1; /* 0x0000 0003 - number of group members? */
+ uint32 group_attr; /* 0x0000 0003 - group attribute */
} GROUP_INFO3;
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c
index e0efb72aab..ed6abc398b 100644
--- a/source3/rpc_parse/parse_samr.c
+++ b/source3/rpc_parse/parse_samr.c
@@ -2141,7 +2141,7 @@ void init_samr_group_info1(GROUP_INFO1 * gr1,
{
DEBUG(5, ("init_samr_group_info1\n"));
- gr1->unknown_1 = 0x3;
+ gr1->group_attr = (SE_GROUP_MANDATORY|SE_GROUP_ENABLED_BY_DEFAULT); /* why not | SE_GROUP_ENABLED ? */
gr1->num_members = num_members;
init_unistr2(&gr1->uni_acct_name, acct_name, UNI_FLAGS_NONE);
@@ -2174,7 +2174,7 @@ BOOL samr_io_group_info1(const char *desc, GROUP_INFO1 * gr1,
if(!smb_io_unihdr("hdr_acct_name", &gr1->hdr_acct_name, ps, depth))
return False;
- if(!prs_uint32("unknown_1", ps, depth, &gr1->unknown_1))
+ if(!prs_uint32("group_attr", ps, depth, &gr1->group_attr))
return False;
if(!prs_uint32("num_members", ps, depth, &gr1->num_members))
return False;
@@ -2238,7 +2238,7 @@ void init_samr_group_info3(GROUP_INFO3 *gr3)
{
DEBUG(5, ("init_samr_group_info3\n"));
- gr3->unknown_1 = 0x3;
+ gr3->group_attr = (SE_GROUP_MANDATORY|SE_GROUP_ENABLED_BY_DEFAULT); /* why not | SE_GROUP_ENABLED ? */
}
/*******************************************************************
@@ -2256,7 +2256,7 @@ BOOL samr_io_group_info3(const char *desc, GROUP_INFO3 *gr3, prs_struct *ps, int
if(!prs_align(ps))
return False;
- if(!prs_uint32("unknown_1", ps, depth, &gr3->unknown_1))
+ if(!prs_uint32("group_attr", ps, depth, &gr3->group_attr))
return False;
return True;
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index 563c3f864f..34779348a4 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -1980,7 +1980,7 @@ NTSTATUS _samr_query_usergroups(pipes_struct *p, SAMR_Q_QUERY_USERGROUPS *q_u, S
continue;
gids = TALLOC_REALLOC_ARRAY(p->mem_ctx, gids, DOM_GID, num_gids+1);
- gids[num_gids].attr=7;
+ gids[num_gids].attr= (SE_GROUP_MANDATORY|SE_GROUP_ENABLED_BY_DEFAULT|SE_GROUP_ENABLED);
gids[num_gids].g_rid = rid;
num_gids += 1;
}
diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c
index a761ea3163..7727330388 100644
--- a/source3/rpcclient/cmd_samr.c
+++ b/source3/rpcclient/cmd_samr.c
@@ -404,13 +404,22 @@ static void display_group_info1(GROUP_INFO1 *info1)
printf("\tGroup Name:\t%s\n", temp);
unistr2_to_ascii(temp, &info1->uni_acct_desc, sizeof(temp)-1);
printf("\tDescription:\t%s\n", temp);
- printf("\tunk1:%d\n", info1->unknown_1);
+ printf("\tGroup Attribute:%d\n", info1->group_attr);
printf("\tNum Members:%d\n", info1->num_members);
}
/****************************************************************************
display group info
****************************************************************************/
+static void display_group_info3(GROUP_INFO3 *info3)
+{
+ printf("\tGroup Attribute:%d\n", info3->group_attr);
+}
+
+
+/****************************************************************************
+ display group info
+ ****************************************************************************/
static void display_group_info4(GROUP_INFO4 *info4)
{
fstring desc;
@@ -429,6 +438,10 @@ static void display_group_info_ctr(GROUP_INFO_CTR *ctr)
display_group_info1(&ctr->group.info1);
break;
}
+ case 3: {
+ display_group_info3(&ctr->group.info3);
+ break;
+ }
case 4: {
display_group_info4(&ctr->group.info4);
break;