Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
09b7f5db
Commit
09b7f5db
authored
Jan 29, 2000
by
Andrew Tridgell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move the read only daemon test to after the protocol setup
parent
6d7b6081
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
14 deletions
+16
-14
clientserver.c
clientserver.c
+7
-14
main.c
main.c
+9
-0
No files found.
clientserver.c
View file @
09b7f5db
...
@@ -101,8 +101,10 @@ int start_socket_client(char *host, char *path, int argc, char *argv[])
...
@@ -101,8 +101,10 @@ int start_socket_client(char *host, char *path, int argc, char *argv[])
}
}
io_printf
(
fd
,
"
\n
"
);
io_printf
(
fd
,
"
\n
"
);
if
(
remote_version
<
23
)
{
if
(
remote_version
==
22
||
(
remote_version
>
17
&&
!
am_sender
))
if
(
remote_version
==
22
||
(
remote_version
>
17
&&
!
am_sender
))
io_start_multiplex_in
(
fd
);
io_start_multiplex_in
(
fd
);
}
return
client_run
(
fd
,
fd
,
-
1
,
argc
,
argv
);
return
client_run
(
fd
,
fd
,
-
1
,
argc
,
argv
);
}
}
...
@@ -163,9 +165,6 @@ static int rsync_module(int fd, int i)
...
@@ -163,9 +165,6 @@ static int rsync_module(int fd, int i)
module_id
=
i
;
module_id
=
i
;
if
(
lp_read_only
(
i
))
read_only
=
1
;
am_root
=
(
getuid
()
==
0
);
am_root
=
(
getuid
()
==
0
);
if
(
am_root
)
{
if
(
am_root
)
{
...
@@ -316,15 +315,9 @@ static int rsync_module(int fd, int i)
...
@@ -316,15 +315,9 @@ static int rsync_module(int fd, int i)
argp
=
argv
+
optind
;
argp
=
argv
+
optind
;
optind
=
0
;
optind
=
0
;
if
(
remote_version
<
23
)
{
if
(
remote_version
==
22
||
(
remote_version
>
17
&&
am_sender
))
if
(
remote_version
==
22
||
(
remote_version
>
17
&&
am_sender
))
io_start_multiplex_out
(
fd
);
io_start_multiplex_out
(
fd
);
if
(
read_only
)
{
extern
int
am_sender
;
if
(
!
am_sender
)
{
rprintf
(
FERROR
,
"ERROR: module is read only
\n
"
);
return
-
1
;
}
}
}
if
(
!
ret
)
{
if
(
!
ret
)
{
...
...
main.c
View file @
09b7f5db
...
@@ -350,10 +350,19 @@ static void do_server_recv(int f_in, int f_out, int argc,char *argv[])
...
@@ -350,10 +350,19 @@ static void do_server_recv(int f_in, int f_out, int argc,char *argv[])
extern
int
delete_mode
;
extern
int
delete_mode
;
extern
int
delete_excluded
;
extern
int
delete_excluded
;
extern
int
am_daemon
;
extern
int
am_daemon
;
extern
int
module_id
;
extern
int
am_sender
;
if
(
verbose
>
2
)
if
(
verbose
>
2
)
rprintf
(
FINFO
,
"server_recv(%d) starting pid=%d
\n
"
,
argc
,(
int
)
getpid
());
rprintf
(
FINFO
,
"server_recv(%d) starting pid=%d
\n
"
,
argc
,(
int
)
getpid
());
if
(
am_daemon
&&
lp_read_only
(
module_id
)
&&
!
am_sender
)
{
rprintf
(
FERROR
,
"ERROR: module is read only
\n
"
);
exit_cleanup
(
RERR_SYNTAX
);
return
;
}
if
(
argc
>
0
)
{
if
(
argc
>
0
)
{
dir
=
argv
[
0
];
dir
=
argv
[
0
];
argc
--
;
argc
--
;
...
...
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