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
d18711e2
Commit
d18711e2
authored
Mar 29, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Mar 30, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Store the token source.
parent
a3ec0a94
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
token.c
server/token.c
+10
-3
No files found.
server/token.c
View file @
d18711e2
...
@@ -82,6 +82,7 @@ struct token
...
@@ -82,6 +82,7 @@ struct token
SID
*
user
;
/* SID of user this token represents */
SID
*
user
;
/* SID of user this token represents */
unsigned
primary
;
/* is this a primary or impersonation token? */
unsigned
primary
;
/* is this a primary or impersonation token? */
ACL
*
default_dacl
;
/* the default DACL to assign to objects created by this user */
ACL
*
default_dacl
;
/* the default DACL to assign to objects created by this user */
TOKEN_SOURCE
source
;
/* source of the token */
};
};
struct
privilege
struct
privilege
...
@@ -413,7 +414,7 @@ static void token_destroy( struct object *obj )
...
@@ -413,7 +414,7 @@ static void token_destroy( struct object *obj )
static
struct
token
*
create_token
(
unsigned
primary
,
const
SID
*
user
,
static
struct
token
*
create_token
(
unsigned
primary
,
const
SID
*
user
,
const
SID_AND_ATTRIBUTES
*
groups
,
unsigned
int
group_count
,
const
SID_AND_ATTRIBUTES
*
groups
,
unsigned
int
group_count
,
const
LUID_AND_ATTRIBUTES
*
privs
,
unsigned
int
priv_count
,
const
LUID_AND_ATTRIBUTES
*
privs
,
unsigned
int
priv_count
,
const
ACL
*
default_dacl
)
const
ACL
*
default_dacl
,
TOKEN_SOURCE
source
)
{
{
struct
token
*
token
=
alloc_object
(
&
token_ops
);
struct
token
*
token
=
alloc_object
(
&
token_ops
);
if
(
token
)
if
(
token
)
...
@@ -472,6 +473,8 @@ static struct token *create_token( unsigned primary, const SID *user,
...
@@ -472,6 +473,8 @@ static struct token *create_token( unsigned primary, const SID *user,
}
}
else
else
token
->
default_dacl
=
NULL
;
token
->
default_dacl
=
NULL
;
token
->
source
=
source
;
}
}
return
token
;
return
token
;
}
}
...
@@ -576,12 +579,13 @@ struct token *token_create_admin( void )
...
@@ -576,12 +579,13 @@ struct token *token_create_admin( void )
{
alias_admins_sid
,
SE_GROUP_ENABLED
|
SE_GROUP_ENABLED_BY_DEFAULT
|
SE_GROUP_MANDATORY
},
{
alias_admins_sid
,
SE_GROUP_ENABLED
|
SE_GROUP_ENABLED_BY_DEFAULT
|
SE_GROUP_MANDATORY
},
{
alias_users_sid
,
SE_GROUP_ENABLED
|
SE_GROUP_ENABLED_BY_DEFAULT
|
SE_GROUP_MANDATORY
},
{
alias_users_sid
,
SE_GROUP_ENABLED
|
SE_GROUP_ENABLED_BY_DEFAULT
|
SE_GROUP_MANDATORY
},
};
};
static
const
TOKEN_SOURCE
admin_source
=
{
"SeMgr"
,
{
0
,
0
}};
/* note: we just set the user sid to be the interactive builtin sid -
/* note: we just set the user sid to be the interactive builtin sid -
* we should really translate the UNIX user id to a sid */
* we should really translate the UNIX user id to a sid */
token
=
create_token
(
TRUE
,
&
interactive_sid
,
token
=
create_token
(
TRUE
,
&
interactive_sid
,
admin_groups
,
sizeof
(
admin_groups
)
/
sizeof
(
admin_groups
[
0
]),
admin_groups
,
sizeof
(
admin_groups
)
/
sizeof
(
admin_groups
[
0
]),
admin_privs
,
sizeof
(
admin_privs
)
/
sizeof
(
admin_privs
[
0
]),
admin_privs
,
sizeof
(
admin_privs
)
/
sizeof
(
admin_privs
[
0
]),
default_dacl
);
default_dacl
,
admin_source
);
}
}
if
(
alias_admins_sid
)
if
(
alias_admins_sid
)
...
@@ -1006,7 +1010,10 @@ DECL_HANDLER(duplicate_token)
...
@@ -1006,7 +1010,10 @@ DECL_HANDLER(duplicate_token)
&
token_ops
)))
&
token_ops
)))
{
{
/* FIXME: use req->impersonation_level */
/* FIXME: use req->impersonation_level */
struct
token
*
token
=
create_token
(
req
->
primary
,
src_token
->
user
,
NULL
,
0
,
NULL
,
0
,
src_token
->
default_dacl
);
struct
token
*
token
=
create_token
(
req
->
primary
,
src_token
->
user
,
NULL
,
0
,
NULL
,
0
,
src_token
->
default_dacl
,
src_token
->
source
);
if
(
token
)
if
(
token
)
{
{
struct
privilege
*
privilege
;
struct
privilege
*
privilege
;
...
...
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