Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
c2cb2962
Commit
c2cb2962
authored
Mar 06, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Mar 07, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement NtAllocateLocallyUniqueId with server call.
parent
c54a0fc2
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
76 additions
and
11 deletions
+76
-11
nt.c
dlls/ntdll/nt.c
+13
-10
server_protocol.h
include/wine/server_protocol.h
+21
-1
protocol.def
server/protocol.def
+12
-0
request.h
server/request.h
+2
-0
token.c
server/token.c
+9
-0
trace.c
server/trace.c
+18
-0
make_requests
tools/make_requests
+1
-0
No files found.
dlls/ntdll/nt.c
View file @
c2cb2962
...
...
@@ -1090,25 +1090,28 @@ NTSTATUS WINAPI NtShutdownSystem(SHUTDOWN_ACTION Action)
/******************************************************************************
* NtAllocateLocallyUniqueId (NTDLL.@)
*
* FIXME: the server should do that
*/
NTSTATUS
WINAPI
NtAllocateLocallyUniqueId
(
PLUID
Luid
)
{
static
LUID
luid
=
{
SE_MAX_WELL_KNOWN_PRIVILEGE
,
0
}
;
NTSTATUS
status
;
FIXM
E
(
"%p
\n
"
,
Luid
);
TRAC
E
(
"%p
\n
"
,
Luid
);
if
(
!
Luid
)
return
STATUS_ACCESS_VIOLATION
;
luid
.
LowPart
++
;
if
(
luid
.
LowPart
==
0
)
luid
.
HighPart
++
;
Luid
->
HighPart
=
luid
.
HighPart
;
Luid
->
LowPart
=
luid
.
LowPart
;
SERVER_START_REQ
(
allocate_locally_unique_id
)
{
status
=
wine_server_call
(
req
);
if
(
!
status
)
{
Luid
->
LowPart
=
reply
->
luid
.
low_part
;
Luid
->
HighPart
=
reply
->
luid
.
high_part
;
}
}
SERVER_END_REQ
;
return
STATUS_SUCCESS
;
return
status
;
}
/******************************************************************************
...
...
include/wine/server_protocol.h
View file @
c2cb2962
...
...
@@ -187,6 +187,12 @@ typedef struct
unsigned
short
attr
;
}
char_info_t
;
typedef
struct
{
unsigned
int
low_part
;
int
high_part
;
}
luid_t
;
#define MAX_ACL_LEN 65535
struct
security_descriptor
...
...
@@ -4005,6 +4011,17 @@ struct get_token_impersonation_level_reply
};
struct
allocate_locally_unique_id_request
{
struct
request_header
__header
;
};
struct
allocate_locally_unique_id_reply
{
struct
reply_header
__header
;
luid_t
luid
;
};
enum
request
{
REQ_new_process
,
...
...
@@ -4224,6 +4241,7 @@ enum request
REQ_query_symlink
,
REQ_get_object_info
,
REQ_get_token_impersonation_level
,
REQ_allocate_locally_unique_id
,
REQ_NB_REQUESTS
};
...
...
@@ -4448,6 +4466,7 @@ union generic_request
struct
query_symlink_request
query_symlink_request
;
struct
get_object_info_request
get_object_info_request
;
struct
get_token_impersonation_level_request
get_token_impersonation_level_request
;
struct
allocate_locally_unique_id_request
allocate_locally_unique_id_request
;
};
union
generic_reply
{
...
...
@@ -4670,8 +4689,9 @@ union generic_reply
struct
query_symlink_reply
query_symlink_reply
;
struct
get_object_info_reply
get_object_info_reply
;
struct
get_token_impersonation_level_reply
get_token_impersonation_level_reply
;
struct
allocate_locally_unique_id_reply
allocate_locally_unique_id_reply
;
};
#define SERVER_PROTOCOL_VERSION 2
79
#define SERVER_PROTOCOL_VERSION 2
80
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/protocol.def
View file @
c2cb2962
...
...
@@ -203,6 +203,12 @@ typedef struct
unsigned short attr;
} char_info_t;
typedef struct
{
unsigned int low_part;
int high_part;
} luid_t;
#define MAX_ACL_LEN 65535
struct security_descriptor
...
...
@@ -2870,3 +2876,9 @@ enum message_type
@REPLY
int impersonation_level; /* impersonation level of the impersonation token */
@END
/* Allocate a locally-unique identifier */
@REQ(allocate_locally_unique_id)
@REPLY
luid_t luid;
@END
server/request.h
View file @
c2cb2962
...
...
@@ -327,6 +327,7 @@ DECL_HANDLER(open_symlink);
DECL_HANDLER
(
query_symlink
);
DECL_HANDLER
(
get_object_info
);
DECL_HANDLER
(
get_token_impersonation_level
);
DECL_HANDLER
(
allocate_locally_unique_id
);
#ifdef WANT_REQUEST_HANDLERS
...
...
@@ -550,6 +551,7 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] =
(
req_handler
)
req_query_symlink
,
(
req_handler
)
req_get_object_info
,
(
req_handler
)
req_get_token_impersonation_level
,
(
req_handler
)
req_allocate_locally_unique_id
,
};
#endif
/* WANT_REQUEST_HANDLERS */
...
...
server/token.c
View file @
c2cb2962
...
...
@@ -365,6 +365,15 @@ static inline void allocate_luid( LUID *luid )
*
luid
=
prev_luid_value
;
}
DECL_HANDLER
(
allocate_locally_unique_id
)
{
LUID
luid
;
allocate_luid
(
&
luid
);
reply
->
luid
.
low_part
=
luid
.
LowPart
;
reply
->
luid
.
high_part
=
luid
.
HighPart
;
}
static
inline
void
luid_and_attr_from_privilege
(
LUID_AND_ATTRIBUTES
*
out
,
const
struct
privilege
*
in
)
{
out
->
Luid
=
in
->
luid
;
...
...
server/trace.c
View file @
c2cb2962
...
...
@@ -239,6 +239,11 @@ static void dump_apc_result( const apc_result_t *result )
fputc
(
'}'
,
stderr
);
}
static
void
dump_luid
(
const
luid_t
*
luid
)
{
fprintf
(
stderr
,
"%d.%u"
,
luid
->
high_part
,
luid
->
low_part
);
}
static
void
dump_context
(
const
CONTEXT
*
context
)
{
#ifdef __i386__
...
...
@@ -3454,6 +3459,16 @@ static void dump_get_token_impersonation_level_reply( const struct get_token_imp
fprintf
(
stderr
,
" impersonation_level=%d"
,
req
->
impersonation_level
);
}
static
void
dump_allocate_locally_unique_id_request
(
const
struct
allocate_locally_unique_id_request
*
req
)
{
}
static
void
dump_allocate_locally_unique_id_reply
(
const
struct
allocate_locally_unique_id_reply
*
req
)
{
fprintf
(
stderr
,
" luid="
);
dump_luid
(
&
req
->
luid
);
}
static
const
dump_func
req_dumpers
[
REQ_NB_REQUESTS
]
=
{
(
dump_func
)
dump_new_process_request
,
(
dump_func
)
dump_get_new_process_info_request
,
...
...
@@ -3672,6 +3687,7 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
(
dump_func
)
dump_query_symlink_request
,
(
dump_func
)
dump_get_object_info_request
,
(
dump_func
)
dump_get_token_impersonation_level_request
,
(
dump_func
)
dump_allocate_locally_unique_id_request
,
};
static
const
dump_func
reply_dumpers
[
REQ_NB_REQUESTS
]
=
{
...
...
@@ -3892,6 +3908,7 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
(
dump_func
)
dump_query_symlink_reply
,
(
dump_func
)
dump_get_object_info_reply
,
(
dump_func
)
dump_get_token_impersonation_level_reply
,
(
dump_func
)
dump_allocate_locally_unique_id_reply
,
};
static
const
char
*
const
req_names
[
REQ_NB_REQUESTS
]
=
{
...
...
@@ -4112,6 +4129,7 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
"query_symlink"
,
"get_object_info"
,
"get_token_impersonation_level"
,
"allocate_locally_unique_id"
,
};
static
const
struct
...
...
tools/make_requests
View file @
c2cb2962
...
...
@@ -44,6 +44,7 @@ my %formats =
"char_info_t"
=>
"&dump_char_info"
,
"apc_call_t"
=>
"&dump_apc_call"
,
"apc_result_t"
=>
"&dump_apc_result"
,
"luid_t"
=>
"&dump_luid"
,
);
my
@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