Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
74a63029
Commit
74a63029
authored
15 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
server: Properly initialize mode and uid for file and directory objects.
parent
bbb3a85c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
server/change.c
+3
-1
3 additions, 1 deletion
server/change.c
server/file.c
+2
-1
2 additions, 1 deletion
server/file.c
server/file.h
+1
-1
1 addition, 1 deletion
server/file.h
with
6 additions
and
3 deletions
server/change.c
+
3
−
1
View file @
74a63029
...
...
@@ -1108,7 +1108,7 @@ static int dir_add_to_existing_notify( struct dir *dir )
#endif
/* USE_INOTIFY */
struct
object
*
create_dir_obj
(
struct
fd
*
fd
)
struct
object
*
create_dir_obj
(
struct
fd
*
fd
,
unsigned
int
access
,
mode_t
mode
)
{
struct
dir
*
dir
;
...
...
@@ -1123,6 +1123,8 @@ struct object *create_dir_obj( struct fd *fd )
dir
->
inode
=
NULL
;
grab_object
(
fd
);
dir
->
fd
=
fd
;
dir
->
mode
=
mode
;
dir
->
uid
=
~
(
uid_t
)
0
;
set_fd_user
(
fd
,
&
dir_fd_ops
,
&
dir
->
obj
);
dir_add_to_existing_notify
(
dir
);
...
...
This diff is collapsed.
Click to expand it.
server/file.c
+
2
−
1
View file @
74a63029
...
...
@@ -147,6 +147,7 @@ static struct object *create_file_obj( struct fd *fd, unsigned int access, mode_
if
(
!
file
)
return
NULL
;
file
->
access
=
access
;
file
->
mode
=
mode
;
file
->
uid
=
~
(
uid_t
)
0
;
file
->
fd
=
fd
;
grab_object
(
fd
);
set_fd_user
(
fd
,
&
file_fd_ops
,
&
file
->
obj
);
...
...
@@ -206,7 +207,7 @@ static struct object *create_file( const char *nameptr, data_size_t len, unsigne
if
(
!
fd
)
goto
done
;
if
(
S_ISDIR
(
mode
))
obj
=
create_dir_obj
(
fd
);
obj
=
create_dir_obj
(
fd
,
access
,
mode
);
else
if
(
S_ISCHR
(
mode
)
&&
is_serial_fd
(
fd
))
obj
=
create_serial
(
fd
);
else
...
...
This diff is collapsed.
Click to expand it.
server/file.h
+
1
−
1
View file @
74a63029
...
...
@@ -120,7 +120,7 @@ extern mode_t sd_to_mode( const struct security_descriptor *sd, const SID *owner
extern
void
do_change_notify
(
int
unix_fd
);
extern
void
sigio_callback
(
void
);
extern
struct
object
*
create_dir_obj
(
struct
fd
*
fd
);
extern
struct
object
*
create_dir_obj
(
struct
fd
*
fd
,
unsigned
int
access
,
mode_t
mode
);
/* completion */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment