Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
7bff3542
Commit
7bff3542
authored
May 23, 2005
by
Robert Shearman
Committed by
Alexandre Julliard
May 23, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Add new server type "struct security_descriptor".
- Add tracing for this new type.
parent
8016f6cc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
142 additions
and
0 deletions
+142
-0
server_protocol.h
include/wine/server_protocol.h
+15
-0
protocol.def
server/protocol.def
+15
-0
trace.c
server/trace.c
+112
-0
No files found.
include/wine/server_protocol.h
View file @
7bff3542
...
...
@@ -162,6 +162,21 @@ typedef struct
unsigned
short
attr
;
}
char_info_t
;
#define MAX_ACL_LEN 65535
struct
security_descriptor
{
unsigned
int
control
;
size_t
owner_len
;
size_t
group_len
;
size_t
sacl_len
;
size_t
dacl_len
;
};
...
...
server/protocol.def
View file @
7bff3542
...
...
@@ -178,6 +178,21 @@ typedef struct
unsigned short attr;
} char_info_t;
#define MAX_ACL_LEN 65535
struct security_descriptor
{
unsigned int control; /* SE_ flags */
size_t owner_len;
size_t group_len;
size_t sacl_len;
size_t dacl_len;
/* VARARGS(owner,SID); */
/* VARARGS(group,SID); */
/* VARARGS(sacl,ACL); */
/* VARARGS(dacl,ACL); */
};
/****************************************************************/
/* Request declarations */
...
...
server/trace.c
View file @
7bff3542
...
...
@@ -424,6 +424,118 @@ static void dump_varargs_LUID_AND_ATTRIBUTES( size_t size )
remove_data
(
size
);
}
static
void
dump_inline_sid
(
const
SID
*
sid
,
size_t
size
)
{
DWORD
i
;
/* security check */
if
((
size
<
sizeof
(
SID
))
||
(
FIELD_OFFSET
(
SID
,
SubAuthority
[
sid
->
SubAuthorityCount
])
>
size
))
return
;
fputc
(
'{'
,
stderr
);
fprintf
(
stderr
,
"S-%u-%lu"
,
sid
->
Revision
,
MAKELONG
(
MAKEWORD
(
sid
->
IdentifierAuthority
.
Value
[
5
],
sid
->
IdentifierAuthority
.
Value
[
4
]
),
MAKEWORD
(
sid
->
IdentifierAuthority
.
Value
[
3
],
sid
->
IdentifierAuthority
.
Value
[
2
]
)
)
);
for
(
i
=
0
;
i
<
sid
->
SubAuthorityCount
;
i
++
)
fprintf
(
stderr
,
"-%lu"
,
sid
->
SubAuthority
[
i
]
);
fputc
(
'}'
,
stderr
);
}
static
void
dump_inline_acl
(
const
ACL
*
acl
,
size_t
size
)
{
const
ACE_HEADER
*
ace
;
ULONG
i
;
fputc
(
'{'
,
stderr
);
if
(
size
)
{
if
(
size
<
sizeof
(
ACL
))
return
;
size
-=
sizeof
(
ACL
);
ace
=
(
const
ACE_HEADER
*
)(
acl
+
1
);
for
(
i
=
0
;
i
<
acl
->
AceCount
;
i
++
)
{
const
SID
*
sid
=
NULL
;
if
(
size
<
sizeof
(
ACE_HEADER
))
return
;
if
(
size
<
ace
->
AceSize
)
return
;
size
-=
ace
->
AceSize
;
fprintf
(
stderr
,
"{AceType="
);
switch
(
ace
->
AceType
)
{
case
ACCESS_DENIED_ACE_TYPE
:
sid
=
(
const
SID
*
)
&
((
const
ACCESS_DENIED_ACE
*
)
ace
)
->
SidStart
;
fprintf
(
stderr
,
"ACCESS_DENIED_ACE_TYPE"
);
break
;
case
ACCESS_ALLOWED_ACE_TYPE
:
sid
=
(
const
SID
*
)
&
((
const
ACCESS_ALLOWED_ACE
*
)
ace
)
->
SidStart
;
fprintf
(
stderr
,
"ACCESS_ALLOWED_ACE_TYPE"
);
break
;
case
SYSTEM_AUDIT_ACE_TYPE
:
sid
=
(
const
SID
*
)
&
((
const
SYSTEM_AUDIT_ACE
*
)
ace
)
->
SidStart
;
fprintf
(
stderr
,
"SYSTEM_AUDIT_ACE_TYPE"
);
break
;
case
SYSTEM_ALARM_ACE_TYPE
:
sid
=
(
const
SID
*
)
&
((
const
SYSTEM_ALARM_ACE
*
)
ace
)
->
SidStart
;
fprintf
(
stderr
,
"SYSTEM_ALARM_ACE_TYPE"
);
break
;
default:
fprintf
(
stderr
,
"unknown<%d>"
,
ace
->
AceType
);
break
;
}
fprintf
(
stderr
,
",AceFlags=%x,Sid="
,
ace
->
AceFlags
);
if
(
sid
)
dump_inline_sid
(
sid
,
size
);
ace
=
(
const
ACE_HEADER
*
)((
const
char
*
)
ace
+
ace
->
AceSize
);
fputc
(
'}'
,
stderr
);
}
}
fputc
(
'}'
,
stderr
);
}
static
void
dump_inline_security_descriptor
(
const
struct
security_descriptor
*
sd
,
size_t
size
)
{
fputc
(
'{'
,
stderr
);
if
(
size
>=
sizeof
(
struct
security_descriptor
))
{
size_t
offset
=
sizeof
(
struct
security_descriptor
);
fprintf
(
stderr
,
"control=%08x"
,
sd
->
control
);
fprintf
(
stderr
,
",owner="
);
if
((
sd
->
owner_len
>
FIELD_OFFSET
(
SID
,
SubAuthority
[
255
]))
||
(
offset
+
sd
->
owner_len
>
size
))
return
;
dump_inline_sid
(
(
const
SID
*
)((
const
char
*
)
sd
+
offset
),
sd
->
owner_len
);
offset
+=
sd
->
owner_len
;
fprintf
(
stderr
,
",group="
);
if
((
sd
->
group_len
>
FIELD_OFFSET
(
SID
,
SubAuthority
[
255
]))
||
(
offset
+
sd
->
group_len
>
size
))
return
;
dump_inline_sid
(
(
const
SID
*
)((
const
char
*
)
sd
+
offset
),
sd
->
group_len
);
offset
+=
sd
->
group_len
;
fprintf
(
stderr
,
",sacl="
);
if
((
sd
->
sacl_len
>=
MAX_ACL_LEN
)
||
(
offset
+
sd
->
sacl_len
>
size
))
return
;
dump_inline_acl
(
(
const
ACL
*
)((
const
char
*
)
sd
+
offset
),
sd
->
sacl_len
);
offset
+=
sd
->
sacl_len
;
fprintf
(
stderr
,
",dacl="
);
if
((
sd
->
dacl_len
>=
MAX_ACL_LEN
)
||
(
offset
+
sd
->
dacl_len
>
size
))
return
;
dump_inline_acl
(
(
const
ACL
*
)((
const
char
*
)
sd
+
offset
),
sd
->
dacl_len
);
offset
+=
sd
->
dacl_len
;
}
fputc
(
'}'
,
stderr
);
}
static
void
dump_varargs_security_descriptor
(
size_t
size
)
{
const
struct
security_descriptor
*
sd
=
cur_data
;
dump_inline_security_descriptor
(
sd
,
size
);
remove_data
(
size
);
}
typedef
void
(
*
dump_func
)(
const
void
*
req
);
/* Everything below this line is generated automatically by tools/make_requests */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment