Skip to content

Commit

Permalink
Rework the NFSv4 path lookup framework so it handles symlinks properly.
Browse files Browse the repository at this point in the history
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
  • Loading branch information
sahlberg committed Jul 13, 2017
1 parent df94ae9 commit 3ced39f
Show file tree
Hide file tree
Showing 16 changed files with 877 additions and 363 deletions.
2 changes: 2 additions & 0 deletions include/libnfs-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,8 @@ int nfs3_write_async(struct nfs_context *nfs, struct nfsfh *nfsfh,
uint64_t count, const void *buf, nfs_cb cb,
void *private_data);

int nfs4_chdir_async(struct nfs_context *nfs, const char *path,
nfs_cb cb, void *private_data);
int nfs4_mount_async(struct nfs_context *nfs, const char *server,
const char *export, nfs_cb cb, void *private_data);
int nfs4_stat64_async(struct nfs_context *nfs, const char *path,
Expand Down
6 changes: 4 additions & 2 deletions lib/libnfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -972,9 +972,11 @@ nfs_chdir_async(struct nfs_context *nfs, const char *path,
switch (nfs->version) {
case NFS_V3:
return nfs3_chdir_async(nfs, path, cb, private_data);
case NFS_V4:
return nfs4_chdir_async(nfs, path, cb, private_data);
default:
nfs_set_error(nfs, "%s does not support NFSv4",
__FUNCTION__);
nfs_set_error(nfs, "%s does not support NFSv%d",
__FUNCTION__, nfs->version);
return -1;
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/nfs_v3.c
Original file line number Diff line number Diff line change
Expand Up @@ -3582,7 +3582,7 @@ nfs3_mkdir_continue_internal(struct nfs_context *nfs,
struct nfs_cb_data *data)
{
char *str = data->continue_data;
int mode = data->continue_int;
int mode = (int)data->continue_int;
MKDIR3args args;

str = &str[strlen(str) + 1];
Expand Down
Loading

0 comments on commit 3ced39f

Please sign in to comment.