mirror of
https://review.haiku-os.org/haiku
synced 2025-02-07 06:16:11 +01:00
nfs4: Allow opening symbolic links
This commit is contained in:
parent
5a451a5405
commit
5fb2be8872
@ -183,7 +183,7 @@ nfs4_open(fs_volume* volume, fs_vnode* vnode, int openMode, void** _cookie)
|
||||
{
|
||||
Inode* inode = reinterpret_cast<Inode*>(vnode->private_node);
|
||||
|
||||
if (inode->Type() == S_IFDIR) {
|
||||
if (inode->Type() == S_IFDIR || inode->Type() == S_IFLNK) {
|
||||
*_cookie = NULL;
|
||||
return B_OK;
|
||||
}
|
||||
@ -214,7 +214,7 @@ nfs4_free_cookie(fs_volume* volume, fs_vnode* vnode, void* _cookie)
|
||||
{
|
||||
Inode* inode = reinterpret_cast<Inode*>(vnode->private_node);
|
||||
|
||||
if (inode->Type() == S_IFDIR)
|
||||
if (inode->Type() == S_IFDIR || inode->Type() == S_IFLNK)
|
||||
return B_OK;
|
||||
|
||||
OpenFileCookie* cookie = reinterpret_cast<OpenFileCookie*>(_cookie);
|
||||
@ -234,6 +234,9 @@ nfs4_read(fs_volume* volume, fs_vnode* vnode, void* _cookie, off_t pos,
|
||||
if (inode->Type() == S_IFDIR)
|
||||
return B_IS_A_DIRECTORY;
|
||||
|
||||
if (inode->Type() == S_IFLNK)
|
||||
return B_BAD_VALUE;
|
||||
|
||||
OpenFileCookie* cookie = reinterpret_cast<OpenFileCookie*>(_cookie);
|
||||
|
||||
return inode->Read(cookie, pos, buffer, length);
|
||||
|
Loading…
x
Reference in New Issue
Block a user