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
0ccffd7c
Commit
0ccffd7c
authored
Jan 21, 2006
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable popt aliases when we're a server so that any user-redefined
options can't cause a compatibility problem.
parent
57b66a24
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
10 deletions
+21
-10
options.c
options.c
+21
-10
No files found.
options.c
View file @
0ccffd7c
...
...
@@ -373,7 +373,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
OPT_FILTER
,
OPT_COMPARE_DEST
,
OPT_COPY_DEST
,
OPT_LINK_DEST
,
OPT_HELP
,
OPT_INCLUDE
,
OPT_INCLUDE_FROM
,
OPT_MODIFY_WINDOW
,
OPT_MIN_SIZE
,
OPT_CHMOD
,
OPT_READ_BATCH
,
OPT_WRITE_BATCH
,
OPT_ONLY_WRITE_BATCH
,
OPT_MAX_SIZE
,
OPT_REFUSED_BASE
=
9000
};
OPT_
SERVER
,
OPT_
REFUSED_BASE
=
9000
};
static
struct
poptOption
long_options
[]
=
{
/* longName, shortName, argInfo, argPtr, value, descrip, argDesc */
...
...
@@ -499,7 +499,7 @@ static struct poptOption long_options[] = {
{
"no-blocking-io"
,
0
,
POPT_ARG_VAL
,
&
blocking_io
,
0
,
0
,
0
},
{
"protocol"
,
0
,
POPT_ARG_INT
,
&
protocol_version
,
0
,
0
,
0
},
{
"checksum-seed"
,
0
,
POPT_ARG_INT
,
&
checksum_seed
,
0
,
0
,
0
},
{
"server"
,
0
,
POPT_ARG_NONE
,
&
am_server
,
0
,
0
,
0
},
{
"server"
,
0
,
POPT_ARG_NONE
,
0
,
OPT_SERVER
,
0
,
0
},
{
"sender"
,
0
,
POPT_ARG_NONE
,
0
,
OPT_SENDER
,
0
,
0
},
/* All the following options switch us into daemon-mode option-parsing. */
{
"config"
,
0
,
POPT_ARG_STRING
,
0
,
OPT_DAEMON
,
0
,
0
},
...
...
@@ -771,6 +771,25 @@ int parse_arguments(int *argc, const char ***argv, int frommain)
print_rsync_version
(
FINFO
);
exit_cleanup
(
0
);
case
OPT_SERVER
:
if
(
!
am_server
)
{
/* Disable popt aliases on the server side and
* then start parsing the options again. */
poptFreeContext
(
pc
);
pc
=
poptGetContext
(
RSYNC_NAME
,
*
argc
,
*
argv
,
long_options
,
0
);
am_server
=
1
;
}
break
;
case
OPT_SENDER
:
if
(
!
am_server
)
{
usage
(
FERROR
);
exit_cleanup
(
RERR_SYNTAX
);
}
am_sender
=
1
;
break
;
case
OPT_DAEMON
:
if
(
am_daemon
)
{
strcpy
(
err_buf
,
"Attempt to hack rsync thwarted!
\n
"
);
...
...
@@ -892,14 +911,6 @@ int parse_arguments(int *argc, const char ***argv, int frommain)
one_file_system
++
;
break
;
case
OPT_SENDER
:
if
(
!
am_server
)
{
usage
(
FERROR
);
exit_cleanup
(
RERR_SYNTAX
);
}
am_sender
=
1
;
break
;
case
'F'
:
switch
(
++
F_option_cnt
)
{
case
1
:
...
...
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