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
7c73536c
Commit
7c73536c
authored
Jul 02, 2007
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use module_dir instead of lp_path().
parent
33cbd577
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
log.c
log.c
+2
-1
t_stub.c
t_stub.c
+1
-5
util.c
util.c
+6
-3
No files found.
log.c
View file @
7c73536c
...
...
@@ -52,6 +52,7 @@ extern iconv_t ic_chck;
extern
iconv_t
ic_send
,
ic_recv
;
#endif
extern
char
curr_dir
[];
extern
char
*
module_dir
;
extern
unsigned
int
module_dirlen
;
static
int
log_initialised
;
...
...
@@ -580,7 +581,7 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
n
=
timestring
(
time
(
NULL
));
break
;
case
'P'
:
n
=
lp_path
(
module_id
)
;
n
=
module_dir
;
break
;
case
'u'
:
n
=
auth_user
;
...
...
t_stub.c
View file @
7c73536c
...
...
@@ -28,6 +28,7 @@ int human_readable = 0;
int
module_dirlen
=
0
;
mode_t
orig_umask
=
002
;
char
*
partial_dir
;
char
*
module_dir
;
struct
filter_list_struct
server_filter_list
;
void
rprintf
(
UNUSED
(
enum
logcode
code
),
const
char
*
format
,
...)
...
...
@@ -73,11 +74,6 @@ struct filter_list_struct server_filter_list;
return
0
;
}
char
*
lp_path
(
UNUSED
(
int
mod
))
{
return
NULL
;
}
const
char
*
who_am_i
(
void
)
{
return
"tester"
;
...
...
util.c
View file @
7c73536c
...
...
@@ -28,6 +28,7 @@ extern int module_id;
extern
int
modify_window
;
extern
int
relative_paths
;
extern
int
human_readable
;
extern
char
*
module_dir
;
extern
unsigned
int
module_dirlen
;
extern
mode_t
orig_umask
;
extern
char
*
partial_dir
;
...
...
@@ -749,7 +750,7 @@ unsigned int clean_fname(char *name, BOOL collapse_dot_dot)
* rootdir will be ignored to avoid expansion of the string.
*
* The rootdir string contains a value to use in place of a leading slash.
* Specify NULL to get the default of
lp_path(module_id)
.
* Specify NULL to get the default of
"module_dir"
.
*
* The depth var is a count of how many '..'s to allow at the start of the
* path. If symlink is set, combine its value with the "p" value to get
...
...
@@ -778,7 +779,7 @@ char *sanitize_path(char *dest, const char *p, const char *rootdir, int depth,
int
plen
=
strlen
(
p
);
if
(
*
p
==
'/'
)
{
if
(
!
rootdir
)
rootdir
=
lp_path
(
module_id
)
;
rootdir
=
module_dir
;
rlen
=
strlen
(
rootdir
);
depth
=
0
;
p
++
;
...
...
@@ -883,8 +884,10 @@ int push_dir(const char *dir, int set_path_only)
if
(
len
==
1
&&
*
dir
==
'.'
)
return
1
;
if
((
*
dir
==
'/'
?
len
:
curr_dir_len
+
1
+
len
)
>=
sizeof
curr_dir
)
if
((
*
dir
==
'/'
?
len
:
curr_dir_len
+
1
+
len
)
>=
sizeof
curr_dir
)
{
errno
=
ENAMETOOLONG
;
return
0
;
}
if
(
!
set_path_only
&&
chdir
(
dir
))
return
0
;
...
...
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