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
4c4a2962
Commit
4c4a2962
authored
Dec 29, 2009
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow "./configure --with-protect-args" to make -s the default.
parent
e89a0fc0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
configure.in
configure.in
+6
-0
options.c
options.c
+12
-2
No files found.
configure.in
View file @
4c4a2962
...
...
@@ -78,6 +78,12 @@ fi
AC_ARG_WITH(included-popt,
AC_HELP_STRING([--with-included-popt], [use bundled popt library, not from system]))
AC_ARG_WITH(protected-args,
AC_HELP_STRING([--with-protected-args], [make --protected-args option the default]))
if test x"$with_protected_args" = x"yes"; then
AC_DEFINE_UNQUOTED(RSYNC_USE_PROTECTED_ARGS, 1, [Define to 1 if --protected-args should be the default])
fi
AC_ARG_WITH(rsync-path,
AC_HELP_STRING([--with-rsync-path=PATH], [set default --rsync-path to PATH (default: rsync)]),
[ RSYNC_PATH="$with_rsync_path" ],
...
...
options.c
View file @
4c4a2962
...
...
@@ -93,7 +93,7 @@ char *files_from = NULL;
int
filesfrom_fd
=
-
1
;
char
*
filesfrom_host
=
NULL
;
int
eol_nulls
=
0
;
int
protect_args
=
0
;
int
protect_args
=
-
1
;
int
human_readable
=
1
;
int
recurse
=
0
;
int
allow_inc_recurse
=
1
;
...
...
@@ -1278,7 +1278,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
#ifdef ICONV_OPTION
if
(
!
am_daemon
&&
!
protect_args
&&
(
arg
=
getenv
(
"RSYNC_ICONV"
))
!=
NULL
&&
*
arg
)
if
(
!
am_daemon
&&
protect_args
<=
0
&&
(
arg
=
getenv
(
"RSYNC_ICONV"
))
!=
NULL
&&
*
arg
)
iconv_opt
=
strdup
(
arg
);
#endif
...
...
@@ -1333,6 +1333,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
#ifdef ICONV_OPTION
iconv_opt
=
NULL
;
#endif
protect_args
=
0
;
poptFreeContext
(
pc
);
pc
=
poptGetContext
(
RSYNC_NAME
,
argc
,
argv
,
long_daemon_options
,
0
);
...
...
@@ -1778,6 +1779,15 @@ int parse_arguments(int *argc_p, const char ***argv_p)
}
}
if
(
protect_args
<
0
)
{
#ifdef RSYNC_USE_PROTECTED_ARGS
if
(
!
am_server
)
protect_args
=
1
;
else
#endif
protect_args
=
0
;
}
if
(
human_readable
>
1
&&
argc
==
2
&&
!
am_server
)
{
/* Allow the old meaning of 'h' (--help) on its own. */
usage
(
FINFO
);
...
...
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