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
74a63029
Commit
74a63029
authored
Aug 17, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Properly initialize mode and uid for file and directory objects.
parent
bbb3a85c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
change.c
server/change.c
+3
-1
file.c
server/file.c
+2
-1
file.h
server/file.h
+1
-1
No files found.
server/change.c
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
);
...
...
server/file.c
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
...
...
server/file.h
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 */
...
...
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