Re: weird access function in rsync code.

2009-05-24 Thread Daniel.Li
On Fri, 2009-05-22 at 22:06 +0800, Daniel.Li wrote: > On Fri, 2009-05-22 at 13:10 +0200, Paul Slootman wrote: > > On Fri 22 May 2009, Daniel.Li wrote: > > > On Fri, 2009-05-22 at 10:47 +0200, Paul Slootman wrote: > > > > > > > > > > access("/home/admin/test",F_OK) > > > > > > > > > > Result: Fail

Re: weird access function in rsync code.

2009-05-22 Thread Daniel.Li
On Fri, 2009-05-22 at 13:10 +0200, Paul Slootman wrote: > On Fri 22 May 2009, Daniel.Li wrote: > > On Fri, 2009-05-22 at 10:47 +0200, Paul Slootman wrote: > > > > > > > > access("/home/admin/test",F_OK) > > > > > > > > Result: Failed with -1, just mean the test folder is NOT existed, but it > > >

Re: weird access function in rsync code.

2009-05-22 Thread Paul Slootman
On Fri 22 May 2009, Daniel.Li wrote: > On Fri, 2009-05-22 at 10:47 +0200, Paul Slootman wrote: > > > > > > access("/home/admin/test",F_OK) > > > > > > Result: Failed with -1, just mean the test folder is NOT existed, but it > > > does exist. > > > Perhaps at that point rsync has chroot()ed somew

Re: weird access function in rsync code.

2009-05-22 Thread Daniel.Li
On Fri, 2009-05-22 at 10:47 +0200, Paul Slootman wrote: > On Fri 22 May 2009, Daniel.Li wrote: > > > When I use "access" function to find out if the folder exist in rsync > > code. I found that it's will NOT act as normal function. > > > > I have tried 2 test: > > > > a) embedded in rsync functi

Re: weird access function in rsync code.

2009-05-22 Thread Paul Slootman
On Fri 22 May 2009, Daniel.Li wrote: > When I use "access" function to find out if the folder exist in rsync > code. I found that it's will NOT act as normal function. > > I have tried 2 test: > > a) embedded in rsync function "int recv_files(int f_in, char > *local_name)" and hard coded with f

Re: weird access function in rsync code.

2009-05-22 Thread Daniel.Li
Really weird! root folder is OK, but others returned -1. Why? I'm in recv_files access / ret = 0 I'm in recv_files access /home ret = -1 I'm in recv_files access /home/admin ret = -1 I'm in recv_files access /home/admin/test ret = -1 Thoese folder does exist. I use rsync --daemon to launch the p

weird access function in rsync code.

2009-05-22 Thread Daniel.Li
Dear List, When I use "access" function to find out if the folder exist in rsync code. I found that it's will NOT act as normal function. I have tried 2 test: a) embedded in rsync function "int recv_files(int f_in, char *local_name)" and hard coded with following line. access("/home/admin/test