symlink: create cygwin symlinks

when given a NfsSymlinkTargetName EA on create, marshall the unicode target name to the daemon, which issues a CREATE rpc to create the symlink

modified the driver's marshall_unicode_as_utf8() function to handle the NULL string buffer for non-symlink opens

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2012-05-07 12:24:00 -04:00 committed by Olga Kornievskaia
parent 453c0cc875
commit 0afc5ebb4d
5 changed files with 83 additions and 20 deletions

View file

@ -290,6 +290,18 @@ int nfs_to_windows_error(int status, int default_error)
}
}
int map_symlink_errors(int status)
{
switch (status) {
case NFS4ERR_BADCHAR:
case NFS4ERR_BADNAME: return ERROR_INVALID_REPARSE_DATA;
case NFS4ERR_WRONG_TYPE: return ERROR_NOT_A_REPARSE_POINT;
case NFS4ERR_ACCESS: return ERROR_ACCESS_DENIED;
case NFS4ERR_NOTEMPTY: return ERROR_NOT_EMPTY;
default: return nfs_to_windows_error(status, ERROR_BAD_NET_RESP);
}
}
bool_t next_component(
IN const char *path,
IN const char *path_end,