weird access function in rsync code.
Daniel.Li
daniel_li at usish.com
Fri May 22 09:01:32 GMT 2009
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 function "int recv_files(int f_in, char
> > *local_name)" and hard coded with following line.
> >
> > 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 somewhere else?
>
I checked uid/gid just before my code, uid=0 gid=0. And I use hard coded
path.
I also check F_OK, it's 0. What could cause it fail? Really have no idea
now. Still Google...... Hope someone give me some tips here.
>
> Paul
--
Daniel Li
More information about the rsync
mailing list